"Luckson Bwalya [Asst Head - System Dev & Sup]" wrote:
What i mean by recovery the password for root is that it is reverting to the old status as though i had not changed anything.. When in actual fact the saving is working ok.
That means you didn't remount your disk read-write properly.
To ensure that i have saved the changes i am editing the shadow file again and it shows it in an updated status.
Can you help with these clarification...
After you edit and save /etc/shadow issue a: # cat /etc/shadow | grep root so you can verify that your changes were saved. If you don't see your changes, that means that re-mounting your root filesystem did not work and you edited the file while the root fs is still read only. What does your /etc/shadow show after you edit and save it? Are you typing this? # mount -n -o remount,rw / This is assuming that /etc is in the same partition as /. What are the partitions and mount points of your system? You should check that you have re-mounted the filesystem rw before editing /etc/shadow? Use these commands: # cd /etc # echo writable > deleteme # cat deleteme # rm deleteme If you are able to create and delete the file, then you are in good shape. What editor are you using to edit /etc/shadow? are you proficient in it? Remember, the idea is to remove the password entry for root in /etc/shadow, just get that done. If you still have problems post detailed descriptions of what is happening and please answer the above questions. Rafael