Operating System - HP-UX
1833861 Members
1966 Online
110063 Solutions
New Discussion

HPUX 11/Trusted System - Deactivate & Reactivate Users

 
Daniel M. Gonzales
Frequent Advisor

HPUX 11/Trusted System - Deactivate & Reactivate Users

Anyway to deactivate & reactivate users via the command line? So far, have only been able to do this via SAM.
4 REPLIES 4
Tim Malnati
Honored Contributor

Re: HPUX 11/Trusted System - Deactivate & Reactivate Users

About the easiest/fastest way from the command line is to change the user's password with passwd. I'm quite sure you can dig through the SAM scripts to find out exactly what it's doing and perform the same that SAM does. I suppose if you are going through a lot of this, it may be worth the trouble though. I'm not near an HPUX machine at the moment to do the same.
Denver Osborn
Honored Contributor

Re: HPUX 11/Trusted System - Deactivate & Reactivate Users

Here's one way I know of to deactivate/reactivate user from command line (tested it out)

To deactivate user
# /usr/lbin/modprpw -a alock=YES

TO reactivate user
# /usr/lbin/modprpw -a alock=NO

If lockout is not all zeros, I think the account will be disabled, but I don't know what all the different values are for lockout. lockout is not a valid parameter to set with modprpw only view with getprpw.

# /usr/lbin/getprpw -r -m lockout

Hope this can help.
Denver Osborn
Honored Contributor

Re: HPUX 11/Trusted System - Deactivate & Reactivate Users

additional note, if getprpw shows alock=NO and lockout=0001000 for a deactivated user account, you'll have to reactivate it with

# /usr/lbin/modprpw -k
Insu Kim
Honored Contributor

Re: HPUX 11/Trusted System - Deactivate & Reactivate Users

For truested system.
to deactivate,
# /usr/lbin/getprpw -r -m lockout
# /usr/lbin/modprpw -m alock=YES
to reactivate -> #/usr/lbin/modprpw -k

For non-trusted
to deactivate,
# /usr/sam/lbin/usermod.sam -p "*"
to reactivate -> # passwd XXX

Regards,
Never say "no" first.