1748090 Members
4873 Online
108758 Solutions
New Discussion юеВ

Re: NIS passwd expiring

 
SOLVED
Go to solution
Douglass A Anderson
Frequent Advisor

NIS passwd expiring

I have a NIS user on hpux 11iV1 that says their password expires every 2 weeks. all others are set to 4 weeks or more. How do I verify what they are saying and change it correctly?
10 REPLIES 10
Dennis Handly
Acclaimed Contributor
Solution

Re: NIS passwd expiring

Take a look at the ypcat output:
ypcat passwd | grep -e usernamebad -e usernamegood

The password field has the password aging info encoded after the ",". See passwd(4).
Or paste the result here and we can decode it for you.
Douglass A Anderson
Frequent Advisor

Re: NIS passwd expiring

Good.

pltal03:4QZq1iOWPtmfE,3.6U:2958:232:Packing Store Randall Reimers,1400,,:/home/dept1400/pltal03:/bin/ksh
pltal01:jzKTxhPsu2VwQ,3.nS:2956:232:Foampack Randall Reimers,1400,,:/home/dept1400/pltal01:/bin/ksh

Bad.

pltsx01:PaL2LuboZT9qw,3.cU:2401:805:Sioux Tools,000922,,:/home/dept000922/pltsx01:/bin/ksh
Dennis Handly
Acclaimed Contributor

Re: NIS passwd expiring

$ ~/bin/passwd_expires 3.6U 3.nS 3.cU
Max weeks to expire: 5
Min weeks to reset: 0
Password was reset on: Wed May 27 17:00:00 2009
Password expires on: Wed Jul 1 17:00:00 2009
Max weeks to expire: 5
Min weeks to reset: 0
Password was reset on: Wed Oct 10 17:00:00 2007
Password expires on: Wed Nov 14 16:00:00 2007
Max weeks to expire: 5
Min weeks to reset: 0
Password was reset on: Wed Jan 6 16:00:00 2010
Password expires on: Wed Feb 10 16:00:00 2010

Two of the passwords have expired.
They all have 5 weeks before expiration. (That's that leading "3".)
Douglass A Anderson
Frequent Advisor

Re: NIS passwd expiring

That helped.
do you have the bin/passwd_expires script?
Douglass A Anderson
Frequent Advisor

Re: NIS passwd expiring

can Expire be turned off?
Dennis Handly
Acclaimed Contributor

Re: NIS passwd expiring

>do you have the passwd_expires script?

It's a C source, attached.

>can Expire be turned off?

passwd -x -1 pltsx01 # works on 11.23

You can use vipw(1m) to just edit the password field and remove the password aging field.

Or you can use SAM to remove it under Modify Password Options: No Restrictions
Dennis Handly
Acclaimed Contributor

Re: NIS passwd expiring

>ME: passwd -x -1 pltsx01 # works on 11.23

It doesn't look like you can do this with NIS: -r nis
(You may have to edit the file on the NIS master.)

>You can use vipw(1m) to just edit the password ...
>Or you can use SAM to remove it under Modify ...

This won't work so well for NIS either.
Douglass A Anderson
Frequent Advisor

Re: NIS passwd expiring

how do I edit and which file on the NIS master?
Jupinder Bedi
Respected Contributor

Re: NIS passwd expiring

vipw will work for editing the /etc/password file and dont forget to run the following command after changes

cd /var/yp
make all
All things excellent are as difficult as they are rare