Manage a user under Linux

For example, I want to add a user to gaoyu

 

use root user

1. useradd gaoyu

2, passwd gaoyu

 

Then enter the password of the user gaoyu (twice).

 

-------------------------------------

 

delete this user

 

userdel gaoyu

userdel -r gaoyu #Delete along with the user's home directory

 

Usually this command does not need to be given. If the account is only temporarily disabled, set the effective date (the eighth field) of the account in /etc/shadow to 0.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326589450&siteId=291194637
Recommended