Subject: Re: changing root shell hell
To: Andrew Brown <atatat@atatdot.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 12/29/2003 09:38:32
On Mon, 29 Dec 2003, Andrew Brown wrote:
> >su -m root -c "chsh -s /bin/csh"
>
> unless his non-standard shell actually takes arguments like that and
> does the right thing with them, that may not work. su just passes
> extra arguments directly to the invoked shell.
The -m makes it use the current shell. So it is okay. (I have used this
many times to run things as "nobody" who doesn't have a real shell.)
Nevertheless, my solution doesn't work for this problem because su -m also
checks /etc/shells to see if the user switching to has a valid shell.
Jeremy C. Reed
http://www.reedmedia.net/