Note:
(Disabling and locking a user account both mean the same thing.)
To disable / lock the user account use below command:
1 2 3 4 5 6 |
sudo passwd -l [user_name] e.g. sudo passwd -l samual |
To put an expire date to an user account so that it automatically gets disabled / locked.
1 2 3 4 5 6 |
sudo passwd -e YYYY-MM-DD [user_name] e.g. sudo passwd -e 2013-05-31 samual |
To re-enable a disabled user, issue the passwd command with the -u option.
1 2 3 4 5 6 |
sudo passwd -u [username] e.g. sudo passwd -u training |
To enable the root account and change the root password use below steps.
1 2 3 |
1) su - 2) passwd |
Enter the new password for root account and then exit. if this does not solve the issue let me know.
Please feel free to let me know if you need anything else or any further clarification.
原创文章,作者:ifyoung,如若转载,请注明出处:https://www.drugfoodai.com/user-in-ubuntu.html