Operating System - HP-UX
1834459 Members
2823 Online
110067 Solutions
New Discussion

disable/enable user account

 
SOLVED
Go to solution
Ricky B. Nino
Frequent Advisor

disable/enable user account

Hi,

How can I disable then enable specific user account/s?

regards...
Opportunities expand for people willing to put time and effort into learning new skills.
7 REPLIES 7
Michael Tully
Honored Contributor

Re: disable/enable user account

On a trusted system:

# /usr/lbin/modprpw -k

If not trusted, you can use:

# passwd -l
Anyone for a Mutiny ?
Ron Cornwell
Trusted Contributor

Re: disable/enable user account

The easiest way I have found is to change their shell in /etc/passwd to /usr/bin/false. This will prevent them from logging in.
T G Manikandan
Honored Contributor
Solution

Re: disable/enable user account

lock the user

#passwd -l

unlock
#passwd
Christian Gebhardt
Honored Contributor

Re: disable/enable user account

Hi

deactivate:
/usr/lbin/modprpw -l -m alock=YES
activate:
/usr/lbin/getprpw -l -r -m lockout

or via SAM

Hint: If you don't know such a command you can try it with SAM and look at /var/sam/log/samlog.
for the command

Chris
Ricky B. Nino
Frequent Advisor

Re: disable/enable user account

Hi,

My system is NOT trusted. Thefore,

passwd -l to lock
passwd to unlock

works alright...

thanks...
Opportunities expand for people willing to put time and effort into learning new skills.
Michael Tully
Honored Contributor

Re: disable/enable user account

Ricky,

One further thing that I would always do and that is to make the user reset their password after logging in the first time. Using the 'passwd -f' option, the user will prompted to change their own password at the first attempt. This is good security practise.

Cheers
Michael
Anyone for a Mutiny ?
Ricky B. Nino
Frequent Advisor

Re: disable/enable user account

Hi,

Just recently learned about this... Another way to disable/enable user account.

to disable:
-----------
/usr/sam/lbin/usermod.sam -p "*"

to enable:
----------
/usr/sam/lbin/usermod.sam -p ,..

hope you'll find this useful too...

Michael, thanks for the addtional info/tip.

regards...
Opportunities expand for people willing to put time and effort into learning new skills.