Subject: Re: passwd, LOGNAME, EUID, UID and bash
From: [email-masked]

26 Jan 1997 21:52:57 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: [email-masked]
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Original-To: "Grant Leslie" <[email-masked]>
Original-Cc: [email-masked]
Original-Sender: [email-masked]

Grant --

I already have been handling the HOME dir's and stuff. And bash does read
the passwd file, of course it reads it to the end and sets the UID and EUID
and LOGNAME appropriately to whatever the last entry in the file is (be it
500 or 123 or 590 whatever). It would appear however that it is storing
these in it's own environment sapce, unaffected by the Console's
environment. and it makes them Read only. 

I was assuming that there may be some way to use the -login argument to bash
or soemthing to be able to modify these values somehow. 

Hey, I'd be happy if I could jsut specify a LOGNAME and let bash get he rest
from the passwd file based on that name... 

Even if I go and try and write something like LOGIN.EXE how would I be able
to set these particular values in bash's environment?

The only thing I can think to try is this:

remove the physical /etc directory, and mount a local directory to it 

mount c:\\myetc /etc
in the batch file that will set the HOME directory
I can copy a user specific passwd file to that dir before invoking bash... I
assume this could work, since everyone will see only the passwd file that is
on their local machine.... 

well it's late... g'nite 

At 08:08 PM 1/26/97 -0400, you wrote:
>Without some sort of Init program running cygwin actually runs in a
>single user mode, so you'll have to do your own work to the HOME
>directories to work.. ie a seperate batch file for each user to set
>the HOME env variable for that user, and changes to that directory,
>before starting bash.
>
>As far as the user UID, etc.. I guess you're stuck with everyone
>being 500 for now, and that user will ALWAYS be the owner of
>everything, of course you could make multiple passwd files, and copy
>that to the the /etc/passwd in the batch file which sets up the home
>directory.
>
>I do think I read somewhere that eventually cygwin.dll will map the
>"Un*x" UID and groups to the NT users and groups, which might make
>something like SysVinit and all that goes with it possible, ie. a
>login.exe, gettys, etc.. This would make it something like a "Baby
>Un*x" running under Win32.. if that would even be useful. But having
>the NT user's enviroment set up right, only the NT login would set
>UID etc.. appropriately, meaning stuff like Init would be rather
>unnessecary, I would think.
>	Though I do have to wonder what this would mean to us standalone
>Win95 users, .....
>
>----------
>
>> I set up the passwd file such that it contained such information 
>> 
>> #/etc/passwd
>> name::500:500:name:/usr/name:/bin/sh
>> 
>> Regardless of what I do, bash seems to load the absolude last line
>of this
>> file to set UID, EUID, and LOGNAME. However, it fails to grab HOME
>dir or
>> SHELL entry. Now the way I understand the login dynamic, "login"
>sets these
>> variables, especially since they are not settable once bash is
>running.
>> However, ther is no "login" executable per se. and even if there
>were, I
>> have tried setting these var's before running bash and it resets
>them as it
>> sees fit.
>> 
>> Is this a bug/feature/ or am I doing it wrong?
>> 
>> Bradley
>> 
>> 
>> I'd like to be able to actually have multiple users each with their
>own HOME
>> directories.
>
>
>

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".