Enabling locked accounts in HPUX

You can’t use vi to re-enable an account if you are using password aging or “trusted” password databases, and the user is aged out or locked out due to too many login failures.

To enable a disabled HP-UX account via the command line, run one of these commands:

/usr/lbin/modprpw -l -k username

/usr/lbin/modprpw -l -x username

The first one re-enables the account; the second one re-enables the account and generates a new random password; -l means you are using a “local” files database. You’d need different options if you are using NIS. Run modprpw with no arguments to see the possibilities (not what they mean, but at least you know what they are).