Re: bash by default for root user



In article <4d0hikF178i7kU1@xxxxxxxxxxxxxx>, Florian Anwander wrote:
Hello Nyco


We wish to use bash as the default shell for the superuser root.
But it is located in /usr/local/bin/bash... which is in /usr, and not
in /... I fear we couldn't login in single-user mode...
Have you tried this? Which is your solution?

I addedd the following to ~root/.profile

if [ -f /usr/local/bin/bash ] ; then
export SHELL=/usr/local/bin/bash
echo "/usr is mounted, so we can use the bash\n"
/usr/local
^^^^^^^^^^

I assumme this should be /usr/local/bin/bash? Typically, you also want to exec:

exec /usr/local/bin/bash

exit

else
export SHELL=/sbin/sh
echo "bash is not available, so we keep /sbin/sh\n"
fi

best regard, Florian


Kevin
--
Unix Guy Consulting, LLC
Unix and Linux Automation, Shell, Perl and CGI scripting
http://www.unix-guy.com
.