LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Root User in Ubuntu (https://www.linuxquestions.org/questions/linux-desktop-74/root-user-in-ubuntu-882021/)

scottpioso 05-21-2011 07:10 PM

Root User in Ubuntu
 
Hi,

I am now getting back into Linux after years in the US Navy and I can't remember a great deal. However, I used to run RH9 years ago and I could log in as root. Now, with Ubuntu, I cannot nor do I see where I can manipulate the password for it so I may log in as Root. Can someone help? Thanks.

snowday 05-21-2011 07:22 PM

The root account is locked (no password) in Ubuntu and you are supposed to use "sudo" instead.

See here for more info:

https://help.ubuntu.com/community/RootSudo
http://xkcd.com/149/

scottpioso 05-21-2011 07:24 PM

okay, thanks. So, how would I log in as that user? Thanks.

TobiSGD 05-21-2011 07:25 PM

In Ubuntu the root-password is randomly generated to prevent a login as root. You can become superuser with sudo. If you want to set a new password for root, so that you can login as root, do
Code:

sudo passwd root
Keep in mind that it is not recommended to login to the GUI as root.

scottpioso 05-21-2011 07:26 PM

Thanks, I will try that.

snowday 05-21-2011 07:28 PM

Quote:

Originally Posted by scottpioso (Post 4363281)
okay, thanks. So, how would I log in as that user? Thanks.

sudo is not a user. sudo allows your current user to execute a command with root priviledges. The password is your user password. This is explained in the link I provided above. :)

The Russian 05-28-2011 04:50 PM

And if you'd like to run commands AS root, use this: sudo bash

TobiSGD 05-28-2011 04:57 PM

Quote:

Originally Posted by The Russian (Post 4369663)
And if you'd like to run commands AS root, use this: sudo bash

If you use sudo to start a program you are running it as root.

The Russian 05-28-2011 04:59 PM

Quote:

Originally Posted by TobiSGD (Post 4369671)
If you use sudo to start a program you are running it as root.

Indeed. I like using it better so I don't have to use sudo, I'd rather have the entire shell be root, then have to use sudo for one thing at a time.

Stephen R. Besch 06-01-2011 10:24 AM

Quote:

Originally Posted by The Russian (Post 4369672)
Indeed. I like using it better so I don't have to use sudo, I'd rather have the entire shell be root, then have to use sudo for one thing at a time.

Then simply type su at the command prompt.


All times are GMT -5. The time now is 07:52 AM.