Subject: Re: HELP ME.... (Really Stooopid Mistake)
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: Monroe Williams <monroe@teleport.com>
List: port-mac68k
Date: 04/19/1996 15:14:23
Bill Studenmund writes:
>> I recently decided that I would much rather have my root account su into
>> tcsh rather than csh.... I su'd root, and chsh -s /vin/tcsh root.
>>
>> Yes, that is not a typo in my post, it is a typo in the command I typed...
>> now, everytime I try to su root, the machine logs me out, because it can't
>> find /vin/tcsh...  I offloaded the passwd and master.passwd files, and
>> fixed the entries in them, but the pwd.db and spwd.db files apparently
>> still contain bad data, as the login still tries to use /vin/tcsh...
>> 
>> Is there anyway to rebuild the .db files (possibly from the mini shell??)
[...]
>A better solution I've seen, and now use, is to make a new account called
>"croot", and make its shell be /bin/tcsh. Use vipw (after you can log in
>as root) to add a new line to the file. Just copy the root line, change
>it to "croot", and change the shell. vipw rebuilds the databases when
>you're done.

Another solution I've taken to using is to 'su -m' instead of just
'su'.  This preserves all of your enviroment variables (login shell,
home directory and thus dot files, etc.), which IMHO makes life much
easier.   

It's possible (if the original poster hasn't fixed his problem yet) that 
he would be able to 'su -m', since it wouldn't use root's login shell
at all...

(I do have a couple of lines in my .bash_login that make sure '.' is
only in my path if I'm not really root, and it would be pretty easy to
take any other security measures you like in a similar fashion...)

-- monroe
------------------------------------------------------------------------
Monroe Williams                                      monroe@teleport.com