Date: Sun, 27 Jun 1999 14:25:47 -0700 From: Doug <Doug@gorean.org> To: Don Sutter <drs@hevanet.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Change root shell Message-ID: <377696DB.959F18AB@gorean.org> References: <000701bebf5f$6713c5e0$703ca3ce@don>
next in thread | previous in thread | raw e-mail | index | archive | help
Don Sutter wrote: > > I'm trying to figure out how to change the shell from csh to bash when I > login as root. Just a small hint, por favor? I would not change the shell itself, since having root's login shell be something other than sh or csh (the two shells compiled and installed by the system) can lead to big problems. One way to make sure that you can always log in, but to make your preferred shell available is to add a command to exec your preferred shell to your login .file. So, for example if root's login shell is /bin/sh, but I prefer bash, I put the following in at the very end of /root/.profile: if [ -x /usr/local/bin/bash ]; then exec /usr/local/bin/bash fi You can do the same thing for csh by adding a similar test to /root/.login, in fact there is an example there that performs the same test for fortune, just using a different syntax. For the benefit of those who said, "I just copy my shell to /bin and I never have any problems," that only works if your shell is compiled static. If it's compiled dynamic and the libraries are in /usr/lib, you are still out of luck if you can't mount /usr. Hope this helps, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?377696DB.959F18AB>