Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Anyone know how the default root password is generated in Ubuntu?

  1. #1
    Join Date
    Oct 2008
    Location
    Wisconsin
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Anyone know how the default root password is generated in Ubuntu?

    I've been using Ubuntu for a few years, happily typing sudo or gksu for any of my administrative tasks, never thinking much about my root profile.

    I've recently installed Arch and Gentoo a few times and discovered the convenience of logging into a root shell for doing heavy, maintenance-related activities. I fully understand the risks involved and don't do this regularly, and I normally only have it in a terminal or a TTY (since messing with the contents of your home folder with root privilages creates a permissions nightmare when you log back into your profile).

    So, I was creating a new partition table and directory structure in Ubuntu, and I thought, "Hey, this would be much better with a root shell." I attempted to login as root using my password, and discovered that this was not the root password. I used... some commands that are not allowed to passed along on the Ubuntu message board (seriously. I almost got bant from the #ubuntu IRC channel because I was going to tell a guy)... and I changed the root password, logged in as root, did my business, etc, etc, /etc/fstab, and all is well.

    This got me wondering, where does the default root password in Ubuntu come from. I guess it must be randomly generated at install or something, being that having a set default would be a major security problem, but I haven't a clue what goes into that. It kinda bugs me that a Linux system, based on the ideology of empowering the user, doesn't allow you to set the root password durring the install, but I guess it makes sense, given the target audience.

    So what's up?

  2. #2
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Anyone know how the default root password is generated in Ubuntu?

    Root has no password at all in Ubuntu; that's the essence of using sudo for everything. If you look (as root) at /etc/shadow on a default installation, you'll see there is no password entry for the root user.

  3. #3
    Join Date
    Sep 2009
    Beans
    Hidden!

    Re: Anyone know how the default root password is generated in Ubuntu?

    [Edited]

    Nevermind.
    Last edited by gutterslob; August 25th, 2011 at 03:26 PM.

  4. #4
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Anyone know how the default root password is generated in Ubuntu?

    The root account password is locked by default: community/RootSudo

    More precisely the encrypted password is: !

    See: man passwd and man 5 shadow.

  5. #5
    Join Date
    Sep 2009
    Beans
    236

    Re: Anyone know how the default root password is generated in Ubuntu?

    hey, i've found that if you start-up into repair mode. and then go down to 'start with root command prompt' then use startx you can start into root without entering any password at all. i don't know if this is a security hole or a design feature.

  6. #6
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: Anyone know how the default root password is generated in Ubuntu?

    Quote Originally Posted by F.G. View Post
    i don't know if this is a security hole or a design feature.
    This has been discussed many many times.

    https://wiki.ubuntu.com/SecurityTeam/FAQ#Rescue_Mode

    Physical access is root access

  7. #7
    Join Date
    Nov 2010
    Beans
    16

    Re: Anyone know how the default root password is generated in Ubuntu?

    You can always change the sudo timeout in visudo..

  8. #8
    Join Date
    Jun 2011
    Location
    The Shadow Gallery
    Beans
    6,744

    Re: Anyone know how the default root password is generated in Ubuntu?

    Quote Originally Posted by F.G. View Post
    hey, i've found that if you start-up into repair mode. and then go down to 'start with root command prompt' then use startx you can start into root without entering any password at all. i don't know if this is a security hole or a design feature.

    Supposed to be that way.

    Physical access is root access.

    Use least privilege at all times and dont let anyone have access to your machine if you are security conscious.

    Security 101
    Backtrack - Giving machine guns to monkeys since 2006
    Kali-Linux - Adding a grenade launcher to the machine guns since 2013

  9. #9
    Join Date
    Jan 2008
    Beans
    7,744

    Re: Anyone know how the default root password is generated in Ubuntu?

    This command will give you a "root shell" for system maintenance:

    Code:
    sudo -i
    It's equivalent to using "su -" in a distro with a root password.

  10. #10
    Join Date
    Oct 2008
    Location
    Wisconsin
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Anyone know how the default root password is generated in Ubuntu?

    Quote Originally Posted by F.G. View Post
    hey, i've found that if you start-up into repair mode. and then go down to 'start with root command prompt' then use startx you can start into root without entering any password at all. i don't know if this is a security hole or a design feature.
    Yeah, like everyone has already been hinting, anyone with a USB stick and physical access can pretty much do whatever they want to anyone's machine. That's why a Live media of Ubuntu is so popular for fixing windows and Mac; it gives access to areas of the system that are normally sealed away.

    Quote Originally Posted by snowpine View Post
    This command will give you a "root shell" for system maintenance:

    Code:
    sudo -i
    It's equivalent to using "su -" in a distro with a root password.
    I just learned that recently, after I had changed my root password, but it is good to know. I'll probably use that in the next install.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •