[ubuntu-in] ubuntu9.04 authentication failed -to go to root.

Ninad Pundalik ninadsp16289 at gmail.com
Wed Jun 30 11:46:15 BST 2010


Hi,
> > ocr-read-only-408$ su
> > Password:
> > su: Authentication failure
@Sriranga: 'su' is the command that logs you into the root shell and
hence, the password required would be that of the root user.  If you
have not set a password for the root, then it is a randomly generated
password (AFAIK) at install by Ubuntu.  If you wish to set the root
password, you must do that first with 'sudo passwd', first give your
account's password (so that sudo is authenticated) and then enter the
new password for root twice.  I'd recommend the command I've given in
the next line, if an interactive root login is a must.

> Instead of su, use "sudo bash" to become root on a shell console. When
> prompted for password, give your own password and you should be root.
@Nishant:  The recommended way to get to a root shell without using
'su' is to use 'sudo -i' (read the sudo manpage for further details
about this option).  It ensures that environment variables like
SUDO_USER and other SUDO_* variables are correctly setup in the shell.

NOTE: Unless you know what you are doing, logging into root
interactively (with either su or sudo -i) is not recommended by
Ubuntu.  Using sudo for each command ensures that an audit trail
remains, should something go wrong.  There are people who debate the
advantages of sudo, and you may google it up, to read both sides of
the story, as I am not experienced enough to take any side and support
it.

Ninad S. Pundalik
Twitter: @ni_nad | Identica : @ninad | http://ninadpundalik.co.cc/blog
GPG Key Fingerprint: 2DF7 B856 C75E C9F9 0504 C0EF D456 1946 7C45 2C6



More information about the ubuntu-in mailing list