Operating System - HP-UX
1825747 Members
2379 Online
109687 Solutions
New Discussion

Re: Unlock passwd command

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

Unlock passwd command

Hi,

passwd -l is used to lock the user account. Is there any parameter for passwd to unlock the user account?

Or I have to use getprpw and modprpw. By the way, what is these 2 command actual means? What I know is when the root password is disabled at client pc, I have to login as root in console and key in the command /usr/lbin/modprpw -k root.

regards.
5 REPLIES 5
Con O'Kelly
Honored Contributor
Solution

Re: Unlock passwd command

Hi

If you are using a trusted system then you as you already seen, you need to use to unlock accounts:
# /usr/lbin/modprpw -lk

This unlocks the user account.

These 2 commands are for trusted systems and are used to view (getprpw) or change (modprpw) entires in trusted database (/tcb).

Cheers
Con
Michael Tully
Honored Contributor

Re: Unlock passwd command

The '/usr/lbin/modprpw -k ' can be used to both lock and unlock accounts on trusted systems.
Anyone for a Mutiny ?
Con O'Kelly
Honored Contributor

Re: Unlock passwd command

Hi

I think "-k" can only be used to unlock an account.

To lock an account use:
/usr/lbin/modprpw -m alock=YES

Cheers
Con
Ngoh Chean Siung
Super Advisor

Re: Unlock passwd command

Hi,

/usr/lbin/modprpw -k can be used to unlock user account.

I tried to view user accoung lock status by issuing this command /usr/lbin/getprpw -r -m lockout

1) What is -r, -m stand for? Is all the parameters available same as the parameters for passwd command?

2) The word "lockout" is a syntax, right?

regards.
Con O'Kelly
Honored Contributor

Re: Unlock passwd command

Hi

I find it easier just to use:
# /usr/lbin/getprpw

Check 'alock' and 'lockout' field.
If the account is not locked you will see:
alock=NO lockout=0000000

If an account is locked for any reason you will see a '1' in the lockout field.
For example:
lockout=00010000
-> means account is locked for exceeding unsuccessful login attempts.

I'm attaching a doc that explains it in more detail.

Cheers
Con