+ 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
    15,380
    Thank Post
    797
    Thanked 1,585 Times in 1,388 Posts
    Blog Entries
    10
    Rep Power
    427

    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,476
    Thank Post
    1,305
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    198
    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,086
    Thank Post
    511
    Thanked 2,308 Times in 1,784 Posts
    Blog Entries
    24
    Rep Power
    803
    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
    15,380
    Thank Post
    797
    Thanked 1,585 Times in 1,388 Posts
    Blog Entries
    10
    Rep Power
    427
    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
    21
    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,476
    Thank Post
    1,305
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    198
    is that the same as "su -" ?

  9. #7

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,855
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    181
    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
    286
    Thank Post
    14
    Thanked 28 Times in 23 Posts
    Rep Power
    17
    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,476
    Thank Post
    1,305
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    198
    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
    37
    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,258
    Thank Post
    1,138
    Thanked 1,462 Times in 980 Posts
    Blog Entries
    22
    Rep Power
    457
    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,144
    Thank Post
    113
    Thanked 518 Times in 447 Posts
    Blog Entries
    2
    Rep Power
    121
    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: 3
    Last Post: 14th August 2008, 12:05 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
  •