How to lock /unlock user Account in FreeBSD

‘pw ‘ command is responsible to  create, remove, modify & display system users and groups ,it is also used to lock and unlock user account  in FreeBSD. To lock/unlock an account you are loged in as a root.How to lock a user account:

If you want to lock the  user account named ‘Intzar’,you can use ‘pw’ command with ‘lock’ option.

Syntax :   pw lock (user name)

root@:~ # pw lock Intzar

root@:~ #

If user account has been locked .you can’t access it.

root@:~ # su Intzar

su: Sorry

root@:~ #

How to unlock a user account:

If you want to unlock the  user account named ‘Intzar’,you can use ‘pw’ command with ‘unlock’ option.

Syntax :   pw unlock (user name)

root@:~ # pw unlock Intzar
root@:~ #

After unlock the user account you access it

root@:~ # su Intzar

$

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s