Operating System - HP-UX
1753416 Members
5139 Online
108793 Solutions
New Discussion юеВ

Re: Inconsistency between /etc/passwd and /etc/shadow file.

 
Venkat_11
Regular Advisor

Inconsistency between /etc/passwd and /etc/shadow file.

We have around 1000+ user accounts on HPUX server HPUX 11.11 and we recently implemented /etc/shadow file by installing Shadow depot. And all of the sudden from this morning we started getting this error message when we try to change password for a user and then we tried from SAM with out any luck.

server1:root# passwd user1
Invalid login name.


The error message we seeing on SAM when we tried accessing user account.

"There is an inconsistency between the file "/etc/passwd" and the file /etc/shadow". Login "xxx(user id)" has no corresponding entry in the file "/etc/shadow". This can be corrected by running "pwconv(1M)" command Re-enter Users subarea after correcting this problem."

And here are the additional details from the server. We notice a difference of 4 accounts between /etc/passwd and /etc/shadow.

server1:root# swlist -l fileset | grep -i shadow
# PHCO_27035 1.0 shadow.h cumulative patch
# ShadowPW B.11.11.03 HP-UX 11.11 Shadow Password Enablement Product
ShadowPW.SHADOW B.11.11.03 Shadow Password Enablement
ShadowPW.SHADOW-MAN B.11.11.03 Shadow Password Enablement Man Pages

server1:root# more /etc/passwd | wc -l
5352
server1:root# more /etc/shadow | wc -l
5356

How can i fix the inconsistency between these two files...??If i run pwconv does it require reboot?? because when i ran pwconv with out reboot it caused more damage as it didn't allowed any of the users to login to the sever....and i had to fix by restoring the backup files...

Please Advice...Thanks..
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Hi:

Do you have PHCO_36562 installed? This SAM patch has some fixes for the shadow password feature.

Regards!

...JRF...
Venkat_11
Regular Advisor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Thanks for the response ..PHCO_36562 patch is installed.
Steven E. Protter
Exalted Contributor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Shalom,

Sanity Check:

pwck

Does it show problems?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Hi (again):

It is recommended to do a 'pwck' on your legacy '/etc/passwd' file *before* conversion. Did you do that/

You can also run 'pwconv' in a preview (test) mode:

# pwconv -t

Did you try that?

Regards!

...JRF...
TTr
Honored Contributor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Also check if there is a manual or cron job that makes changes to /etc/passwd such as adding or changing users and may be putting /etc/passwd and /etc/shadow out of sync.
Venkat_11
Regular Advisor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Thanks for all the replies. The issue is fixed after we deleting the extra line in /etc/shadow.
Venkat_11
Regular Advisor

Re: Inconsistency between /etc/passwd and /etc/shadow file.

Thanks.