Thank you, that helps a lot.
It didn't occur to me that it might not get this information out of Windows.
Presumably /etc/passwd is created from the local user list when you install cygwin. My
username is not local to the machine at all (it is a network id), so did not get put
into passwd, and similarly when Stephen created an additional user he did not add it
to /etc/passwd.
I think that is a gotcha, that ought to be mentioned somewhere!
> ----------
> From: Corinna Vinschen[SMTP:[EMAIL PROTECTED]]
> Reply To: cygwin
> Sent: 17 October 2000 12:03
> To: cygwin
> Subject: Re: FW: 'id' on NT/2000
>
> Colin Fine wrote:
> >
> > > We have a problem with cygnus, originally on W2000, but we have now duplicated
>it on NT4 as well.
> > >
> > > The problem is that in some circumstances the 'id' command returns the user name
>'administrator' instead of the correct logged-in user. Since /etc/profile uses this
>to set USER and the home directory, this is rather significant!
> > >
> > > It is consistent for a particular machine/user, but we don't know what makes the
>difference. So for example:
> > > On my dual boot (W95/W2000) PC, on the W95 side, cygwin correctly sets me up as
>fine_c (my Windows login), but on W2000, it insists I am administrator, though I am
>still logged in as fine_c.
> > >
> > > On an NT4 machine, a colleague finds that cygwin correctly picks up his login
>name; but if he creates another user (test) n the machine and logs in using that,
>cygwin again thinks that user is administrator.
> > >
> > > Does anybody recognise this? Or know which Windows call 'id' uses?
>
> id doesn't use a Windows call but only Cygwin POSIX calls. As a result
> it needs correct settings in /etc/passwd.
>
> On your collegues machine:
> Did you insert the "test" user into /etc/passwd?
>
> On your machine:
> If you dual boot your machine with the same /etc directory you will have
> another problem _if_ you are using ntsec. Both OS'es have different SIDs
> and the same user will have different SIDs on different OSes. You will
> have to either provide different /etc/passwd files or to change your
> systems SID on one of the OSes so that it's equal to the SID of the
> other system. You can for example use the NewSID tool on
> www.sysinternals.com with a slight change (Fixed SID instead of random
> SID).
>
> Corinna
>
> --
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Developer mailto:[EMAIL PROTECTED]
> Red Hat, Inc.
> mailto:[EMAIL PROTECTED]
>
--
Want to unsubscribe from this list?
Send a message to [EMAIL PROTECTED]