+ 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
    13,895
    Blog Entries
    8
    Thank Post
    728
    Thanked 1,369 Times in 1,199 Posts
    Rep Power
    363

    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. IDG Tech News
  3. #2

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,303
    Blog Entries
    6
    Thank Post
    1,249
    Thanked 456 Times in 296 Posts
    Rep Power
    156
    open up terminal form the applications menu

    just do "sudo passwd"

    and it should get you to create a root password

  4. #3

    localzuk's Avatar
    Join Date
    Dec 2006
    Location
    Minehead
    Posts
    15,290
    Blog Entries
    24
    Thank Post
    490
    Thanked 1,946 Times in 1,523 Posts
    Rep Power
    660
    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.

  5. Thanks to localzuk from:

    FN-GM (16th February 2009)

  6. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    13,895
    Blog Entries
    8
    Thank Post
    728
    Thanked 1,369 Times in 1,199 Posts
    Rep Power
    363
    Thanks, i get you. Getting my head around linux will be a big learning curve.

  7. #5

    Join Date
    Feb 2006
    Location
    Isle of Wight, UK
    Posts
    149
    Thank Post
    28
    Thanked 28 Times in 25 Posts
    Rep Power
    19
    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

  8. Thanks to SteveMC from:

    RabbieBurns (17th February 2009)

  9. #6

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,303
    Blog Entries
    6
    Thank Post
    1,249
    Thanked 456 Times in 296 Posts
    Rep Power
    156
    is that the same as "su -" ?

  10. #7

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,856
    Thank Post
    412
    Thanked 776 Times in 649 Posts
    Rep Power
    170
    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.

  11. Thanks to powdarrmonkey from:

    RabbieBurns (17th February 2009)

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

  13. #9

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,303
    Blog Entries
    6
    Thank Post
    1,249
    Thanked 456 Times in 296 Posts
    Rep Power
    156
    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

  14. #10

    Join Date
    Apr 2006
    Posts
    139
    Thank Post
    0
    Thanked 19 Times in 10 Posts
    Rep Power
    35
    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.

  15. #11

    sparkeh's Avatar
    Join Date
    May 2007
    Location
    Leicestershire
    Posts
    4,296
    Blog Entries
    22
    Thank Post
    620
    Thanked 841 Times in 584 Posts
    Rep Power
    254
    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

  16. #12

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,122
    Blog Entries
    2
    Thank Post
    111
    Thanked 516 Times in 446 Posts
    Rep Power
    117
    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
  •