Unable to login. Doesnt accept password.
Hello Everyone
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. |
Quote:
Boot into single user mode and ensure that the root account exists: Code:
grep '^root:' /etc/passwd Quote:
Quote:
|
Thanks for replying. I had lost the hope of getting any reply.
Sorry to reply so late. before i enter the single user mode, it prints MAKE DEV: no such user as root MAKE DEV: no such user as root id: Cannot find name for user ID 0 After entering the single user mode i typed the following commands and got this: sh-3.2# grep |^root:' /etc/passwd > sh-3.2# grep |^root:' /etc/shadow > Absolutely nothing other than the greater than sign.!!! Also when i do su, it says su: user root does not exist I am so screwed. what should i do? Thanks.:( |
Please have a look again at my example.
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. Make backups of these files first. Code:
cp -p /etc/passwd /etc/passwd.20090504 Code:
passwd |
Certainly got the syntax wrong!
Will check and let you know later as i am at work. Thanks |
Got an output!
I just checked the following commands in single user mode:
grep '^root:' /etc/passwd root:x::0:root:/root:/bin/bash grep '^root:' /etc/shadow root::14363:0:99999:7::: The second field in the second output is as it is. It is blank What else should i try out. Please let me know. :( |
The second field in the /etc/shadow file should contain the encrypted password.
If you modify the /etc/shadow entry for the root account to: Quote:
Once you have managed to log in with the root account, you can change the password ;) |
Hi,
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! Thanks. Please let me know what do do? |
Do you have SELINUX turned on?
I think it's on as the default in Fedora. Please post the contents of /etc/sysconfig/selinux |
Fine...
will check and let you know later in the evening, after work Thanks for replying. |
Hi Disillusionist, Back again...
I tried the following in single user mode. sh-3.2#/etc/sysconfig/selinux sh: /etc/sysconfig/selinux:permission denied Thanks once again for replying. I am so screwed, cannot login to my system. Please help. |
Try:
Code:
cat /etc/sysconfig/selinux Quote:
Quote:
EDIT: Try changing the root entry in /etc/password first (as per the following post) |
Just noticed something in one of your previous posts:
Quote:
root:x:0:0:root:/root:/bin/bash If your entry wasn't a typo, then that would explain why you cannot log in as root. |
Hurray!
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 . .. How should i do it? THanks once again |
If you run:
Code:
ls -l /home EDIT: Please continue onto next Page ;) |
All times are GMT -5. The time now is 03:58 AM. |