System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

modprpw -V not refreshing all users

Todd Bowden
Valued Contributor

modprpw -V not refreshing all users

To all,

Im trying to run /usr/lbin/modprpw -V on HP-UX 11.31 and its not refreshing the "spwchg" to the current time, however the -v works. Just wondering if anyone else has seen this issue?

Todd
10 REPLIES
Viktor Balogh
Honored Contributor

Re: modprpw -V not refreshing all users

how about '/usr/lbin/modprpw -l -v' ?
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: modprpw -V not refreshing all users

Also check the return value with 'echo $?'

RETURN VALUE

0 Success.
1 User not privileged.
2 Incorrect usage.
3 Can not find the entry or file.
4 Can not change the entry.
5 Not a Trusted System.
6 Not a NIS+ user.

****
Unix operates with beer.
Todd Bowden
Valued Contributor

Re: modprpw -V not refreshing all users

I will say that /usr/lbin/modprpw -v works.

Here is the return code from /usr/lbin/modprpw -l -V

# /usr/lbin/modprpw -l -V
# echo $?
0
Tim Nelson
Honored Contributor

Re: modprpw -V not refreshing all users

if worst comes to worst.

awk -F : '$3 > 100 {print $1}' /etc/passwd |while read username
do
modprpw -V $username
done
Viktor Balogh
Honored Contributor

Re: modprpw -V not refreshing all users

@Tim:

-v is for setting it individually
-V is for all users at once

so:

awk -F : '$3 > 100 {print $1}' /etc/passwd |while read username
do
modprpw -v $username
done

(ok, I also mixed it in my first post)
****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: modprpw -V not refreshing all users

@Todd:

Do you have NIS or NIS+? Or other central authentication method? That's why I suggested the -l switch. According to the return value it should have been worked. Did it?

What does pwck spit out? Maybe there is an inconsistency with your user database.
****
Unix operates with beer.
Todd Bowden
Valued Contributor

Re: modprpw -V not refreshing all users

NIS or NIS+ is not running.

My only errors with "pwck" are about login directories not being found. So are you telling me that on your system /usr/lbin/modprpw -V works. I have tried this on 2 systems running 2 different versions of HP-UX and it doesnt work.

Re: modprpw -V not refreshing all users

have you checked all the users, After modprpw -V ?
Sr Tech Lead
Tech Mahindra
Data Canter Tubli Bahrain
Todd Bowden
Valued Contributor

Re: modprpw -V not refreshing all users

That is the first thing I checked.
Viktor Balogh
Honored Contributor

Re: modprpw -V not refreshing all users

>So are you telling me that on your system /usr/lbin/modprpw -V works.

No, I'm not telling you this. I don't have a trusted 11.31 testserver to try this out. I am only trying to give you some advice that might be useful.
****
Unix operates with beer.