1752808 Members
5996 Online
108789 Solutions
New Discussion юеВ

reset password aging

 
li_18
Occasional Advisor

reset password aging

Is that any way to reset password age to zero by command line?

That is in SAM, Accounts for Users and Groups -> Modify Security Policies -> [Password Aging Policies]
"Reset Password Age to Zero"

Thanks!
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: reset password aging

passwd -n -x

This resets aging.

example

passwd -n 7 -x 60 schmobagel

This resets the minimum time between changes to 7 days and the max to 60 days for user schmobagel

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
RAC_1
Honored Contributor

Re: reset password aging

If system is not in trusted mode,

passwd -n 0 -x 0 "user_name"
man passwd for details.

Anil
There is no substitute to HARDWORK
twang
Honored Contributor

Re: reset password aging

you may take a look at the man page for hints,
# man -k passwd
the following is an example from man page,
Force user2 to establish a new password on the next login which will expire in 70 days and prohibit the user from changing the password until 7 days have transpired:
# passwd -r files -f -x 70 -n 7 user2


HGN
Honored Contributor

Re: reset password aging

Hi

If the system is in trusted mode you can change thro sam if not

use passwd -n 0 -x X The User ID
The number next to n is minimum days and value next to x is maximum days

Rgds

HGN
Mark Greene_1
Honored Contributor

Re: reset password aging

If the system IS Trusted, you can do a global reset from the command line with this:

/usr/lbin/modprpw -V

This will reset all login IDs' last successful change date to the current date, essentially zeroing the exipration counter.

If you are running an 11i system, you can man modprpw for all the info. The command exists on 11.0 systems, but there's no man page included.

mark
the future will be a lot like now, only later
Rubinstein
Occasional Visitor

Re: reset password aging

I realize this is an ancient topic thread but it is the first thing that came up when I Googled for this answer, and I actually don't think any of the responses answered the actual question that was asked - resetting the password age rather than modifying the password aging policy.

The solution I found was to grep the password hash for the user out of /etc/shadow, and then to use "usermod -p '<hash>' '<username>'" to explicitly reset the password hash to this same value. This updated the password age field to current without modifying the user's password.