Subject: Re: HELP ME.... (Really Stooopid Mistake)
To: Tank <Tank@pg.net>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 04/11/1996 17:02:33
> 
> Hi Gang-
> 
> 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??)
> 
> I know it's a STOOOOPID error, but knowing that isn't helping me fix it any
> faster....

If you can log in using your UID, try changing YOUR password. I bet one
of two things will happen: /etc/passwd will be changed (to show your
new password) and the .db re-built to include both your and root's new
password (yea!), or /etc/passwd will be changed to match what's in the
.db files.

Another option is to use the installer to create a /vin directory, and put
a copy of tcsh in there.

In general, I've found it's best to NEVER change root's shell. Since
neither tcsh nor csh are really useful for shell programs (and are similar
to each other), you won't have many problems. But many parts of the system
might make subtle dependencies on root's shell being csh (or sh).

Also, I believe csh is compiled using static libraries. If things get
bad, and you loose shared libraries, tcsh is useless as root's shell;
your machine will have died a hard and permanent death.

On bigger systems, /usr is its own system. All the shared libraries
live there. In single-user mode, /usr is NOT mounted, so no program
using shared libraries (as are most by default) will work. Thus
ps, csh, fsck, and a few other programs have to be re-compiled when
the kernel changes a lot (when a new libkvm is needed).

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.