User Tools

Site Tools


root login with bash

On our systems, the root account is set to be a role, so you can't login as root, just su to root from an user which has the root role. Also, the root user has the bourne shell (/bin/sh), but working with /bin/bash is much easier. Using this command, you can directly log in as root with a bash shell.

ssh -t "su - root -c /bin/bash"'

I set it up as an alias in .bashrc:

alias demo_root='ssh -t "su - root -c /bin/bash"'

This enables me logging in with just:

$ demo_root

The Password prompt on the second line is from the su, for the root password.

info/script/root_login_with_bash.txt · Last modified: 2013-02-04 23:17 (external edit)