1855256 Members
5723 Online
104109 Solutions
New Discussion

Re: no /etc/shadow file

 
DareDevil_1
Advisor

no /etc/shadow file

hi,

pertaining to the same issue.our system is a trusted one and some1 had deleted the shadow file.we were able to login in to the server but we were not able to reset/set password.

why is that?
7 REPLIES 7
Jeeshan
Honored Contributor

Re: no /etc/shadow file

pwconv command makes the shadow file.
a warrior never quits
DareDevil_1
Advisor

Re: no /etc/shadow file

tried tht, this is the msg i got.

# pwconv
Updating the tcb to match /etc/passwd, if needed.
The system cannot be converted while shadow passwords are in use.
Roberto Arias
Valued Contributor

Re: no /etc/shadow file

restore file from backup, is the best
The man is your friend
ASIFKHAN
Frequent Advisor

Re: no /etc/shadow file

If /etc/shadow file was present earlier then ,
you can make it again by using
#pwconv
command but if it is not working then see that patch is there ,which supports this (#pwconv) command to run.
if that patch was not there then pwconv won't run.

And the reason why u were not able to set/reset the password at o.s. level might be the file permissions of /etc/passwd file or same password might be in use at that time by some other person.
ASIFKHAN
Frequent Advisor

Re: no /etc/shadow file

if /etc/shadow is not there then please first make that file by
#cat >> /etc/shadow
and then run
#pwconv
bcoz pwconv simply copies content of /etc/pasawd into /etc/shadow .

I hope it will help u...
bye
MAK
ASIFKHAN
Frequent Advisor

Re: no /etc/shadow file

if /etc/shadow is not there then please first make that file by
#cd /etc

#cat >> shadow

and then run

#pwconv

bcoz pwconv simply copies content of /etc/pasawd into /etc/shadow .

I hope it will help u...
bye
MAK
Shrikant Lavhate
Esteemed Contributor

Re: no /etc/shadow file

>MAK
There is no need to create shadow file with cat.
because man page says:

The pwconv command without options does the following:

Creates the file /etc/shadow if it does not exist; otherwise, it removes all entries for usernames which are not present in /etc/passwd.

DareDevil,
as suggested above pmconv is the only option other than recovering file from backup copy. You can try this command under test mode like:
#pmconv -t

It will only print error but wont modify any file. For more details rad man page.

Best Luck.
Will it remain a personal, if I broadcast it here!