View Full Version : root shell login shows -bash-3.2#

24th November 2007, 07:35 PM
when i login as root via ssh or locally it logges in, but instead of showing root@myhostname
it shows -bash-3.2#

i deleted some files in the root folder.. would that do it?

and if so how would i return the root login to root@myhostname?

24th November 2007, 08:49 PM
the login prompt is set in /etc/bashrc and is called from ~/.bashrc. Do you have those files on ypur remote machine?
I have read (and believe) that sshing as root is not a good idea on a security front. ssh as a user then su is a safer option.


18th December 2007, 04:25 PM
I had the same problem after upgrading to Fedora 8. Somehow my /root/.bashrc was renamed to /root/.bashrc.rpmsave and my .bash_profile was gone. Here's how I fixed it:

# mv /root/.bashrc.rpmsave /root/.bashrc
# cp /etc/skel/.bash_profile /root

By the way to disable direct root login through ssh set the variable "PermitRootLogin: no" in /etc/ssh/sshd_config.