Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 have dual boot windowsxp Sp2 and Fedora 8 (2.6.23.1-42,fc8).I changed my root password by the following method:
1. boot linux kernel: init=/bin/sh
mount -o remount,rw /
/usr/bin/passwd
after changing my root password it said 'Authentication token updated sucessfully'
The problem now is i am unable to login either as a root or as a normal user.It doesnt accept any of the user passwords including root. So I then tried the following method to change my root password.
2. booting kernel: runlevel 1 (single user mode)
passwd : It says'changing passwd for user root.
unix_chkpasswd[1485]: check pass; user unknown.
passwd : Authentication token manipulation error.
So am not able to change the password this way.
Also i tried reading other similar threads and found a way to do it by modifying etc/passwd file. But to my dissappointment cannot make changes in /etc/passwd file when i login into single user mode. when i type command 'who' i get no response other than the prompt.when i do 'su' my prompt changes to [root@null]#
Now i dont know how to log into my system.
Please help me.
I did not use the | (pipe) symbol but an ' (openning single quote)
The reason your command continued the way it did, was because it only had one ' symbol on the line and thought you wanted to continue onto the next line.
EDIT:
If there really is no root user in these files.
You need to add an entry for root in /etc/passwd and /etc/shadow
As I am not sure if you know how to use vi, I am going to append the entries to the files by redirecting echo statements to append to the file.
I changed the second field in the /etc/shadow entry for the root account to:
root:$1$Ab2S4$wqTstArvWel4bnUz4keGN.:14363:0:99999:7::: As you had mentioned.
by vim editor.
And the output grep '^root:' /etc/shadow shows root:$1$Ab2S4$wqTstArvWel4bnUz4keGN.:14363:0:99999:7:::
But am still not able to login as root. When i try to do su - root
it says 'user root does not exist'
And when i try to login through the console mode it says wrong username or password though i gave password as TestPass1.
And i noticed something during boot, it prints 'cannot open database infomation for current process UID'. Unknown user??? no memory or space to allocate. Can this help!
What a delight. I am able to log into my system finally.
Thank you so much Disillusionist, really appreciate your efforts.
I did exactly what you said and was able to log in. And later i tried to modify the /etc/sysconfig/selinux to enforcing, just to see if it will work too and it did.
However am not able to change the user passwd
passwd VeeR
passwd:user Veer does not exist
Also the users which i delete and recreate again with the same name leads me to a failure. it says skel dir cannot write into the home directory of that user.
So i tried to delete the home directory for that user but could not. its not an empty directory. SO tried rm -rf to all files in that particaular dir which worked but two directories are still remaining.Which are
.
..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.