Disable
User in Linux
[root@server ~]#useradd test
[root@ server ~]#passwd test
Output of /etc/shadow
file for test user when enable.
test:$1$sLp5L5bu$ESwE39w1dePwy7a28Gq74/:16541:0:99999:7:::
|
Method: 1 Disable
user manually replace with “!”
test:!!$1$sLp5L5bu$ESwE39w1dePwy7a28Gq74/:16541:0:99999:7:::
|
Now, user test can not login in system.
Method: 2 Disable
user in linux by command
[root@server ~]#passwd -l test
Output:
test:!!$1$sLp5L5bu$ESwE39w1dePwy7a28Gq74/:16541:0:99999:7:::
|
To Enable user, use following command.
[root@server ~]#passwd test
test:!!$1$sLp5L5bu$ESwE39w1dePwy7a28Gq74/:16541:0:99999:7:::
|
0 comments:
Post a Comment