Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <39EC321A.DF4CEE34@cygnus.com> Date: Tue, 17 Oct 2000 13:03:54 +0200 From: Corinna Vinschen Reply-To: cygwin X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14-SMP i686) X-Accept-Language: de, en MIME-Version: 1.0 To: cygwin Subject: Re: FW: 'id' on NT/2000 References: <44632C76B97BD211AF6B00805FADCAB2027CAA04 AT exchange DOT saltaire DOT pace DOT co DOT uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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:cygwin AT sources DOT redhat DOT com Red Hat, Inc. mailto:vinschen AT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com