Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-31-2007, 05:38 PM
|
#1
|
Member
Registered: Mar 2005
Distribution: Ubuntu
Posts: 344
Rep:
|
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?
|
|
|
03-31-2007, 05:40 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539
Rep:
|
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.
|
|
|
03-31-2007, 05:54 PM
|
#3
|
Member
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91
Rep:
|
The root user account is installed, but is disabled by default.
to enable the root account, at the command, type
Then, type your new root account password.
Cheers
|
|
|
03-31-2007, 06:19 PM
|
#4
|
Member
Registered: Mar 2005
Distribution: Ubuntu
Posts: 344
Original Poster
Rep:
|
Ok thanks your advice worked,
I got a root password now,
|
|
|
03-31-2007, 07:58 PM
|
#6
|
Member
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Rep:
|
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.
|
|
|
03-31-2007, 08:45 PM
|
#7
|
Senior Member
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775
Rep:
|
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.
|
|
|
04-01-2007, 01:27 AM
|
#8
|
Member
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Rep:
|
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.
|
|
|
04-01-2007, 01:32 AM
|
#9
|
Senior Member
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775
Rep:
|
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.
|
|
|
04-01-2007, 01:49 AM
|
#10
|
Member
Registered: Aug 2006
Distribution: Ubuntu
Posts: 91
Rep:
|
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. 
|
|
|
All times are GMT -5. The time now is 12:16 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|