To check user account is lock or not:-
First create user account by using following
command:-
Useradd username
Passwd “password”
Example:-
[root@linuxnotes~]# useradd swapnil
[root@linuxnotes~]# passwd swapnil
Changing
password for user swapnil.
New password:*******
BAD PASSWORD:
it is based on a dictionary word
BAD PASSWORD:
is too simple
Retype new
password:********
passwd: all
authentication tokens updated successfully.
[root@linuxnotes~]#
Command to
lock user account :-
[root@linuxnotes~]# passwd -l swapnil
Locking password for user swapnil.
passwd: Success
To test useraccount is lock or not
:-
login as: swapnil
swapnil@linuxnotes.co.in password:
Access denied
swapnil@linuxnotes.co.in password:
To unlock the useraccount:-
[root@linuxnotes~]# passwd -u swapnil
Unlocking password for user swapnil.
passwd: Success
[root@linuxnotes~]#
**Note:- Any type of changes in linux you should login by useraccount root.
.
No comments:
Post a Comment