Subject: Re: Finding your SID (was Re: problem starting inetd as NT service)
From: Jason Tishler <[email-masked]>
To: "Gerald S. Williams" <[email-masked]>
Cc: [email-masked]
Date: Thu, 09 May 2002 08:49:01 -0400

Jerry,

On Thu, May 09, 2002 at 07:11:55AM -0400, Gerald S. Williams wrote:
> Jason Tishler wrote:
> > Choose the one where ProfileImagePath contains your $USERNAME.
> 
> After expanding variables, I was able to look for where
> ProfileImagePath is equal to $USERPROFILE. YMMV.

Your method is equivalent to mine but better.

> However, I did not know what to do about the group
> number. Based on my system and other e-mail I've seen,
> I just hardcoded 513 for now, but that's probably not
> universally correct.

Since you are in a domain environment, you should use "10513" which is
the gid for "Domain Users" instead.

> Is there any way to get that info from the registry?

I don't think that you have to.  Just use "513" for local accounts and
"10513" for domain accounts.

BTW, you also need to update your /etc/group file as follows:

    $ mkgroup -d | egrep 'Domain (Users|Admins|Guests)' >>/etc/group

I found the SID for my Domain Users account in:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy\GroupMembership\Group0

I'm not sure if the above is generally useful.  Additionally, I'm not
sure how to find the SIDs for the other Domain foo accounts, except
by substituting 512 and 514 (for 513) for Domain Admins and Guests,
respectively.

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/