Operating System - HP-UX
1833744 Members
2747 Online
110063 Solutions
New Discussion

Activating users accounts from the command prompt

 
SOLVED
Go to solution
Ayanda
Occasional Contributor

Activating users accounts from the command prompt

Can anyone help me , How do I activate/enable a user's account on the trusted system from the command prompt without using SAM
If anyone is in Christ , he is a new creature the Old has gone , The new has come
5 REPLIES 5
Mark Greene_1
Honored Contributor

Re: Activating users accounts from the command prompt

see the man page for useradd

HTH
mark
the future will be a lot like now, only later
Pete Randall
Outstanding Contributor

Re: Activating users accounts from the command prompt

Or search the forum on "useradd".

Pete

Pete
Jeff Schussele
Honored Contributor

Re: Activating users accounts from the command prompt

Hi Ayanda,

To enable/unlock an existing account use
#modprpw -k username

To create a new account
#useradd -u xxxx -g yyyy -d /home/username -m -s /usr/bin/ksh -c "Any Comments Here" username

Then generate a random PW for the user's initial login - they should change it.
#modprpw -x username

HTH,
Jeff

Where xxxx is the user's ID & yyyy is the group ID. Of course shell other than ksh can be specified.
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Uday_S_Ankolekar
Honored Contributor
Solution

Re: Activating users accounts from the command prompt

Hello,

Try /usr/lbin/modprpw -k username to activate a user

-USA..
Good Luck..
Daimian Woznick
Trusted Contributor

Re: Activating users accounts from the command prompt

To check if the account is disabled run the command:

/usr/lbin/getprpw -m lockout

The seven digits should all be 0. If any are a 1, the account is disabled. As mentioned before modprpw with the k option will enable it.

The different fields in the lockout entry mean:

password lifetime exceeded
time between logins execeeded
account lifetime exceeded
unsuccessful login attempts exceeeded
null password set and not allowed
admin lock
password is "*"

Hope this helps you.