This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: csih and sspi with guest accounts

Reini Urban wrote:
Reini Urban schrieb:
I'd need to warn the user on XP about an active
"net user Guest" account. "Guest" needs to be localized, hmm.
I have "Gast" in german.

I've uploaded a new version as a 'test' release (csih-0.1.1-1). It includes a (binary) utility program:

getAccountName [-hVL] [-g|-a|-n INT]
returns the (possibly localized) name of the requested account

--help|-h print this help
--version|-V print version information
--license|-L print license information
--guest|-g print name of Guest account
--admin|-a print name of Administrator account
--number|-n NUM print name of the account specified by the

                       supplied integer. This number should be in
                       the range [0,78] inclusive. See
                       WELL_KNOWN_SID_TYPE documentation matching
                       these numbers to specific account types.
Exactly one of the options `-g', `-a', or `-n INT' may be specified.
NOTE: this application works only on Windows XP or above

BTW, this utility is a native program, not a cygwin one. So if you use it directly, you'll need to strip \r before passing the result to "net user". Or, use the csih shell function(s) that wraps this utility,
which does that for you.

I believe having a global shell function for the postinstaller
to check for xp and an active Guest account would make sense for the service helper.

csih_is_2008() would also be appreciated.

The test release also includes:

* New system id function: csih_is_2k(), csih_is_xp(), csih_is_vista()

note that Vista and Server 2008 both report "CYGWIN_NT-6.0", so I don't really have a good way of distinguishing between them.

Also, all of these "system id" functions are "minimum". That is, if your system is Vista, then ALL of the id functions will return true, because they each are defined as:

will return true if the system is XXXX or above

So, to find out if the system is EXACTLY windows XP, you have to check csih_is_xp && ! csih_is_vista

* New function: csih_invoke_helper
    invokes utilities in /usr/lib/csih/
* New function: csih_get_localized_account_name
    Given an WELL_KNOWN_SID_TYPE enumeration value, uses getAccountName
    utility to obtain the localized name associated with the account
* New function: csih_get_guest_account_name
    Shortcut using csih_get_localized_account_name for Guest account
* New function: csih_guest_account_active
    returns true (0) if Guest account is active, false (1) otherwise

Let me know what you think...


-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]