LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-31-2007, 05:38 PM   #1
izquierdista
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 344

Rep: Reputation: 30
How to login as root user


how do I login as root user in Ubuntu 6.10?

I opened the terminal

typed: su

and then I typed in my user password,

but I got an authentication failed message.

I dont know what other password I have to use because whenever I installed ubuntu I was only prompted to create one password which was for the user.

What should I do?
 
Old 03-31-2007, 05:40 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
for ubuntu-based distros i think you have to use sudo to do something as root: 'sudo commandName' then your user password. there is no root user installed.
 
Old 03-31-2007, 05:54 PM   #3
DJNolz83
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91

Rep: Reputation: 15
The root user account is installed, but is disabled by default.

to enable the root account, at the command, type
Code:
sudo password root
Then, type your new root account password.

Cheers
 
Old 03-31-2007, 06:19 PM   #4
izquierdista
Member
 
Registered: Mar 2005
Distribution: Ubuntu
Posts: 344

Original Poster
Rep: Reputation: 30
Ok thanks your advice worked,
I got a root password now,
 
Old 03-31-2007, 06:55 PM   #5
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
There's no need to set a root password in Ubuntu.

Code:
sudo -i
will log you in as root (even without having set a root password). Just use your user password (as long as you're in the admin group).

Read more here:
https://help.ubuntu.com/community/RootSudo
http://www.psychocats.net/ubuntu/permissions
 
Old 03-31-2007, 07:58 PM   #6
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Sometimes it is nice to have a root user. I have always decided, that if a user doesn't want sudo, it doesn't hurt to let him. As long as you don't abuse root's privileges, you are fine.

You can't log in from a VT with "sudo -i", you need a root password, and it is useful to have a root password many times.
 
Old 03-31-2007, 08:45 PM   #7
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Quote:
Originally Posted by Samoth
I have always decided, that if a user doesn't want sudo, it doesn't hurt to let him.
And I've always decided it's a good idea for people to try to use Ubuntu the way it was meant to be used before the user decides she "doesn't want sudo." Informed choice is the only real choice.

Yes, you can set up a root account in Ubuntu, but it's often unnecessary, and sudo can be more convenient. It's at least worth an honest try.

Coming from Mepis, I was also disoriented by the lack of root user login in Ubuntu, but I gave it a fair shot, got used to it, and now I prefer it. But I gave it a fair shot.
Quote:
You can't log in from a VT with "sudo -i", you need a root password
I have no idea what a VT is.
 
Old 04-01-2007, 01:27 AM   #8
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
VT = Virtual Terminal (AKA a TTY).
And yes you can login on a VT/TTY to get a root shell, you login as your normal user, then do "sudo -i"
You say "it is useful to have a root password many times.", really? what times? I've never needed one. Give some examples here.

If you want a root shell from the get-go, just login to single user mode, the root session starts then.

For all the people that say "Yeah, but I want to be able to login as root, without using sudo." can you explain why? I've never needed to. Every operation I've needed to do as root sudo has let me do just fine.
 
Old 04-01-2007, 01:32 AM   #9
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
Thanks for the clarification, binrary_y2k2.

I had no idea what a VT was, but I also have never found a need to enable a root login (other than "recovery mode"). It's one thing to say, "Yeah, I've tried sudo extensively, but I just prefer to log in as root." It's quite another to make it sound as if sudo is some nonsensical system and that getting a root login is just putting things back to normal from some screwed up approach Ubuntu implemented.

The truth is that most people don't give sudo a chance. It's quite convenient.
 
Old 04-01-2007, 01:49 AM   #10
DJNolz83
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91

Rep: Reputation: 15
I think I would be siding with the side that is saying that you dont really NEED a root password, and that sudo would suffice.

I mean, really, how many mistakes can you make as root that would screw everything up? by using sudo, it semi-elminates this problem by FORCING you to type in an extra "parameter" into the command to make it run (as root)
This sort of eliminates a huge F* up in my eyes for the fact that you are then thinking "hey, if i run this, I am running it as root"

The other reason for this is that in the unlikley event you get hacked, it will save you for the fact that you are not logged in as root, therefore, do not have root permissions, and cannot run some programs that can be quite destructive.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to login as user; can login as root. rksanders Debian 24 02-09-2011 08:01 AM
Adding root privaliges to user accounts or auto login as root Val-Ent Linux - General 15 03-02-2010 04:27 PM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM
I have re-installed MK 9.2 but cannot login as user, login as root works. bobinglis Mandriva 2 02-22-2004 11:39 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration