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.
Recently I updated portage by typing 'emerge -u portage'. I then updated the portage tree by typing 'emerge sync'. I was informed that configuration files needed updating and so I typed the relevant command: etc-update. However, I didn't really know what I was doing and I (stupidly) went by my instinct on how to act upon the updates of each of the config files it listed.
Since doing this I have two serious problems:
1) I can't connect to the Internet on Gentoo (I'm currently using Mandrake - my back-up Linux).
2) I can't login as root. I get an 'incorrect password' error, even though I know I'm typing the correct password.
I definitely have backups of my /etc/make.conf and /etc/rc.conf files from before I updated portage. I don't think I have backups of any of the other config files.
Please ask me for the relevant info you'll inevitably want to know in order to help me; I'm sure I can get it.
I tried the 'passwd' command but I can't login as root in the first place so it doesn't work.
I'll try your suggestion about the /etc/shadow file but I would appreciate some elaboration about how to 'fix my internet' from the LiveCD. How should I do that? When I installed Gentoo I didn't need to configure my Internet connection at all - it worked straight away. My network card and the broadband connection that I have shared through my router is always detected automatically on Linux... it has until now anyway.
OK. Somehow I've managed to get the Internet to work again on Gentoo.
Instead of using the LiveCD can I just do it from within Mandrake Linux (installed on the same PC)?
And, in my /etc/shadows file, the root password is not listed explicitly - it just has a lot of odd characters next to where it says 'root'.
Originally posted by Baryonic Being
OK. Somehow I've managed to get the Internet to work again on Gentoo.
Instead of using the LiveCD can I just do it from within Mandrake Linux (installed on the same PC)?
you basiacally rooted your own box. its pretty much the only course of action left when you lose the root passwd. i was going to suggest Knoppix or Knoppix.STD, but using your mandrake install should work. all you will have to do is mount your gentoo partition to your file system under mandrake.
from there you should be able to remove the 'root' shadow entry. this should change the root password to a blank. just make sure you back up your shadow file first, just in case.
Quote:
And, in my /etc/shadows file, the root password is not listed explicitly - it just has a lot of odd characters next to where it says 'root'.
dont worry, this is completely normal. the shadow file holds the password in ciphertext. when you run the passwd command on the console, the system runs your password thru a one way encryption function [usually MD5 or SHA, you can encrypt, but not decrypt a one way hash] to create some ciphertext and puts it in the shadow file. when you login to the system as root, the same one way function is preformed on the password that you typed in, the ciphertext of your password and the contents of your shadow file are compared. if they match, the system logs you in.
I've done that and it hasn't made any difference. Should I delete the entire line containing the word 'root' in the shadow file? Pressing enter as the password doesn't work either.
OK. I've worked it out and I can now log in as root in Gentoo, but I can't 'su' to become root from a normal user. I still get the 'su: Permission denied' error. Now what do I do?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.