root password?
Peter Garrett
peter.garrett at optusnet.com.au
Sun Feb 3 08:44:49 UTC 2008
On Sat, 02 Feb 2008 20:59:58 -0800
"Knute Johnson" <knute at frazmtn.com> wrote:
> I installed 7.10 onto a USB jump drive and tried to create a new
> user. In the process I did something bad to the sudoers file. I
> can't edit it because I can't sudo. I can't login as root because I
> don't know the password. What's the password for root on the live
> CD?
There isn't one - just type
sudo -i
for a root prompt on the Ubuntu live CD.
However, to recover your /etc/sudoers file, you could boot in
"recovery" mode from the hard drive - this will give you a root prompt
from which you can run the command
visudo
to edit /etc/sudoers . By default on Ubuntu, visudo uses the "nano"
editor, which is not exactly what you'd expect ;) Nano is pretty easy to
use though - type your changes, hit ctrl+x and you will be asked if you
want to save on exit. The default sudoers file looks like this ( these are
the important lines)
# User privilege specification
root ALL=(ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Obviously, your desired sudo user also needs to be in the "admin" group for
that to work. If that isn't the case, just type ( as root)
adduser <yourusername> admin
Peter
--
"INX Is Not X" Live CD based on Ubuntu 7.04 : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080203/d042c9e0/attachment.sig>
More information about the ubuntu-users
mailing list