+ Post New Thread
Results 1 to 12 of 12
*nix Thread, Default Root Password? in Technical; Hi Im just dipping my toe into the Linux world. I have installed Ubuntu server in a VM on my ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454

    Default Root Password?

    Hi

    Im just dipping my toe into the Linux world.

    I have installed Ubuntu server in a VM on my mac. Install went fine and i like how good it was i could install Lamp during the install.

    I would like to set a root password, during the install i did not set one.

    What is the default password?

    Thanks

    Z

  2. #2

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    open up terminal form the applications menu

    just do "sudo passwd"

    and it should get you to create a root password

  3. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    17,867
    Thank Post
    518
    Thanked 2,486 Times in 1,928 Posts
    Blog Entries
    24
    Rep Power
    838
    To expand a bit, Ubuntu doesn't enable root by default, but gives the initial user sudo privileges. So, you can make use of sudo to set a root password if you need to, but ideally, you shouldn't need to.

  4. Thanks to localzuk from:

    FN-GM (16th February 2009)

  5. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,054
    Thank Post
    888
    Thanked 1,729 Times in 1,492 Posts
    Blog Entries
    12
    Rep Power
    454
    Thanks, i get you. Getting my head around linux will be a big learning curve.

  6. #5

    Join Date
    Feb 2006
    Location
    Isle of Wight, UK
    Posts
    149
    Thank Post
    28
    Thanked 28 Times in 25 Posts
    Rep Power
    22
    Quote Originally Posted by localzuk View Post
    To expand a bit, Ubuntu doesn't enable root by default, but gives the initial user sudo privileges. So, you can make use of sudo to set a root password if you need to, but ideally, you shouldn't need to.
    And if you find yourself having to type a long sequence of commands that all need super-user (otherwise known as 'su' or 'root') privileges, you can type:

    Code:
    sudo -s
    Which will switch you to the root user until you type

    Code:
    exit
    Stephen

  7. Thanks to SteveMC from:

    RabbieBurns (17th February 2009)

  8. #6

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    is that the same as "su -" ?

  9. #7

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by RabbieBurns View Post
    is that the same as "su -" ?
    Yeee-no. Kinda. It effectively gives you the same power as su, but doesn't spawn a new login shell and replace your environment variables, doesn't need you to know (or share) the root password, only allows allowed commands to be executed, etc. But to all intents and purposes, unless you share the machine with somebody else, yes.

  10. Thanks to powdarrmonkey from:

    RabbieBurns (17th February 2009)

  11. #8
    kesomir's Avatar
    Join Date
    Mar 2008
    Location
    London
    Posts
    288
    Thank Post
    15
    Thanked 28 Times in 23 Posts
    Rep Power
    18
    I use
    Code:
    sudo su
    to switch to root and then
    Code:
    passwd
    to set the root password.

  12. #9

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    Quote Originally Posted by powdarrmonkey View Post
    Yeee-no. Kinda. It effectively gives you the same power as su, but doesn't spawn a new login shell and replace your environment variables, doesn't need you to know (or share) the root password, only allows allowed commands to be executed, etc. But to all intents and purposes, unless you share the machine with somebody else, yes.
    Thanks, learn something new every day

  13. #10

    Join Date
    Apr 2006
    Posts
    138
    Thank Post
    0
    Thanked 19 Times in 10 Posts
    Rep Power
    38
    Quote Originally Posted by localzuk View Post
    To expand a bit, Ubuntu doesn't enable root by default, but gives the initial user sudo privileges. So, you can make use of sudo to set a root password if you need to, but ideally, you shouldn't need to.
    This is not completely accurate. The root account is not disabled; it has an invalid password hash, so that the authentication process will fail.

  14. #11

    sparkeh's Avatar
    Join Date
    May 2007
    Posts
    6,804
    Thank Post
    1,298
    Thanked 1,659 Times in 1,112 Posts
    Blog Entries
    22
    Rep Power
    507
    This is worth a read to learn about Ubuntu/root/sudo: RootSudo

    Explains why Ubuntu does it like this, when to use sudo, gksudo and sudo -i

    HTH

  15. #12

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,157
    Thank Post
    116
    Thanked 529 Times in 452 Posts
    Blog Entries
    2
    Rep Power
    124
    Quote Originally Posted by FN-GM View Post
    Thanks, i get you. Getting my head around linux will be a big learning curve.
    It might even be worth it :-)

    The sudo stuff is a bit like "run as administrator" in Vista; sudo -s is like running a command prompt as administrator.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 4
    Last Post: 6th May 2014, 07:25 PM
  2. Replies: 33
    Last Post: 16th July 2008, 12:08 PM
  3. Replies: 8
    Last Post: 13th October 2007, 01:05 PM
  4. Now they want my server root password.
    By tickmike in forum General Chat
    Replies: 29
    Last Post: 9th September 2006, 11:23 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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