[PLUG] root login

Robert Citek robert.citek at gmail.com
Tue Jan 9 20:18:08 UTC 2007


Rich Shepard wrote:
> On Tue, 9 Jan 2007, Robert Citek wrote:
> 
>> $ sudo su -
> 
>   You don't need sudo. In a virtual console, type 'su -' and press [Enter].
> You'll see a prompt for root's password. Enter that and you have a root
> login shell at root's home directory. Using 'su' without the dash raises
> your status to that of superuser, but in the current shell.

True for most Unix/Linux.  However, under {Ku,Edu,Xu}buntu and Mac OS X,
there is no root password:

$ sudo grep root /etc/shadow
root:*:13417:0:99999:7:::

So, typing 'su -' alone will not give you a root shell because there is
to password that grants you access to it.  One must use sudo.

As for su alone, that will not run root's startup scripts.  So, if there
are any special configurations to root environment, e.g. from
/root/.profile or /root/.bashrc, those will not get initialized.

Regards,
- Robert




More information about the PLUG mailing list