Further investigation:
mkpasswd indeed creates a passwd file that does the job (thank you Larry Hall). But we
observe that having no /etc/passwd file at all appears to work just as well! What
doesn't work is an /etc/passwd that doesn't contain the right user.
I wonder if there are any hidden dangers to running without /etc/passwd? If not, this
would seem to be the easier solution.
> Colin Fine,
> Build Master
>
> * Pace Micro Technology plc
> Victoria Road, Saltaire, Shipley, W. Yorks, England BD18 3LF
> Email [EMAIL PROTECTED]
> * +44 (0) 1274 538 038
> Fax +44 (0) 1274 532 029
>
> The E-mail and any attachments hereto are strictly confidential and intended solely
>for the addressee. If you are not the intended addressee please notify the sender by
>return and delete the message. You must not disclose, forward or copy this E-mail or
>attachments to any third party without the prior consent of the sender.
>
>
>
> -----Original Message-----
> From: Colin Fine
> Sent: 17 October 2000 16:56
> To: 'cygwin'
> Cc: Stephen Lovell; Andy Haynes; Chris Briggs; Jason Anderson; Chris Klein; John
>Skilleter
> Subject: RE: FW: 'id' on NT/2000
>
> 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]