How to increase the deletion of normal user accounts under Linux terminal
Want to know the user information under Linux, the main two files:/etc/passwd and/etc/shadow
I'll talk about it today. Creating and deleting users with commands
Add Users
Typically two steps to increase the user name and the specified user password
[Email protected]/]# useradd test2[[email protected]/]# passwd test2changing password for user test2. New UNIX Password:bad Password:it does not contain enough DIFFERENT charactersretype new UNIX Password:passwd:all Authen Tication tokens updated successfully. #下面这个命令是为用户指定家目录的 [[email protected] home]# useradd test5-d/home/t# More detailed parameters man Useradd
Delete User
Delete the user is relatively simple, the default does not add parameters, the user's home directory will not be deleted,
To remove home directories, add the-R parameter
Userdel test2 [[email protected] home]# ls/homelele swap t T4 test2 test3# Plus-r parameter can also delete home directory [email protected ] home]# useradd test6[[email protected] home]# ls/homelele swap t T4 test2 test3 Userdel-r Test6[[email protected] home]# ls/homelele swap t T4 test2 test3
Linux (CentOS) Increased delete users