Subject: Re: root shell?
To: Armen Babikyan <synapse@xeo.net>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 08/01/1997 08:24:57
>
> as something else to try, make a new user "toor" or something and give him
> the same groupid, userid and home directory of root, except with the
> change of shell. this would basically log you in as "root" but under a
> different shell.
Stock NetBSD comes with toor defined in /etc/passwd.
> i do this on my system, anyone know if it's a bad idea? i don't have any
> problems with it...
I created a "croot" account. The name comes from systems where sh is
root's shell, and the admins wanted csh. It's usually a bad idea to
change root's shell. There can be all sorts of hidden depenancies which
break when you change the shell. Just add an extra account. It's easy.
There's one minor problem with dt. I sent in a patch, but I haven't
checked to see if it's in the latest version. Basically the code does
a name-based lookup in the passwd db to get the shell. Then when a child
forks, it does a UID-based lookup. Well, the shell name was stored as a
pointer to the static lookup field where libc returns lookups. This area
is overwritten each lookup. As root's name was one character shorter,
the shell name went from /bin/tcsh to bin/csh, which didn't exist. Thus
Command-O wouldn't open shells.
There was quite a discussion on current-users about having multiple
UID 0 accounts. Some folks said it was VERY BAD. Others said it was
VERY CONVENIENT. I agree with the latter folks. :-)
> this also seems to work well with systems that have multiple
> root-users...i like tcsh better than bash :)
Indeed. :-)
Take care,
Bill