0

I have RHEL 5 on virtual machine installed.

I was creating the new user by making entry in /etc/passwd.

I deleted the /etc/shadow file and used pwconv command to make new shadow file.

Now when i restarted the system , it is not accepting any password

whats should i do

EEAA
  • 108,414
  • 18
  • 172
  • 242

3 Answers3

7

You deleted all of your users' passwords, because they aren't stored in /etc/passwd anymore like they were in the olden days. pwconv is only for converting entries from passwd to shadow and vice versa -- you should never have to use it in day-to-day tasks. Boot into single-user mode as DaveN suggested, restore the file from backup, chalk this one up to experience, and learn the right way to manage user accounts on modern Linux systems. The useradd and passwd commands exist for a reason.

jgoldschrafe
  • 4,385
  • 17
  • 18
2

Can you attempt to repair the damage in single user mode with a process similar to http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/4/html/Step_by_Step_Guide/s1-q-and-a-root-passwd.html

DaveN
  • 46
  • 3
0

Which means your system can't find the password in shadow file while authenticating, first you need to create the password for root user after restarting. follow this videos... this helpful for you... https://www.youtube.com/watch?v=jlI4HiRk5-M