Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
I just installed Ubuntu, and I don't believe I set up a root password. However, when I try to log in as root, it asks for a password, and if I leave it blank, it won't log in.
How do I log in as root without the password so that I can change it?
Would putting in the install cd and then mounting my harddrive, and using chroot to make the harddrive root work?
I have already answered you question in a previous post. Login as usual as a normal user, start a console/terminal, then do "sudo passwd root", enter a new password for root and your problem is solved.
>>I have already answered you question in a previous post. Login as usual as a normal user, start a console/terminal, then do "sudo passwd root", enter a new password for root and your problem is solved.>>
and I answered this by saying that it errors when I type sudo in. It doesn't let me do anything with it.
edit:
<<You can give root a password by doing "sudo root passwd" as a normal user.>>
actually, that's what you said. It was backwards, which may be why it didn't work. I'll go check it out the other way and see what happens.
tried it, doesn't work. The sudo command doesn't work at all because it doesn't recognize batman, which is my computer name. the reason I need to log in as root is because the file "/dev/hosts" needs to be editted I believe. However, because that file is wrong, I can't log in as root.
I think this is my problem. Basically I need to mount my filesystem and and get root access without any passwords. any ideas?
I think I got it all figured out now. Basically I had to put in the install cd, let it find my harddrive, mount my linux partition, and then make the changes to the /etc/hosts file that I needed to, reboot, and wala. Now I can use the sudo command just fine, and I can su to user and stuff. Thanx everyone for the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.