Subject: Re: bash problem 2
To: None <port-i386@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 01/13/2000 11:59:01
> when I change the shell for root to bash the chsh program send this
> message:

>     "warning,unknown root shell"

> 1.What can i do to make NetBSD to know this shell?

Find whoever thought /etc/shells was a good idea and apply clue-stick
vigorously?

Seriously, as others have pointed out, unless bash is linked static and
in the root partition, you quite likely don't want it as root's shell.
But that aside, /etc/shells is probably your problem.  You could just
add bash to /etc/shells, but the right fix would be to find the code
that's using /etc/shells and fix it.  (Having a list of "acceptable"
shells is the wrong fix to a non-problem.  It was invented, I believe,
in response to the "chsh to a shell with a newline in its name"
security hole - a problem to which it's the wrong solution - and
promptly got (ab)used for a whole lot of other things, from trying to
decree that only users with certain shells are allowed to ftp in to, as
you saw, producing gratuitous noise messages about root's passwd file
entry.  Worse, the API to it - getusershell() - is broken; the correct
API would be usershellisvalid().  getusershell() makes it impossible,
even by hacking the back-end, for an admin to configure a system such
that any shell is considered acceptable.)

> 2.In wich file can I set the variables like PS1 (bash variables)?

In the bash startup file - probably called something like .bashrc in
the user's homedir.  Check the bash doco; this should be described
there.

> 3.Where can I read for NetBSD architecture to lern order of starting
> of system files?

"less /etc/rc".

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B