CentOS user and group management
Add an account02.03.Useradd-m ltw parameter-m is used to set the system to automatically create the user root directory when adding an account04.05.adduser06.07.Modify the logon name of an ltw account08.09.usermod -l litingwei ltw10.11.Modify the logon directory of the litingwei account (Note: You must manually create the litingwei directory before modification)12.13.usermod -d /home/litingwei litingwei14.15.Lock user litingwei account password16.17.The account is unavailable after usermod-L litingwei is locked.18.19.Unlock user litingwei account and password20.21.usermod -U litingwei22.23.24.25.Add a group26.27.groupadd superman28.29.Modify a superman Group30.31.groupmod -g355superman32.33.Delete a superman Group34.35.groupdel superman36.37.38.Modify the root password (the root password has not been set. You can use it only after setting the password)39.40.passwd root41.42.43.Root, litingwei account Switch44.45.su - root46.47.Or sudo-I to switch to root48.49.50.Delete the litingwei account51.52.Userdel-r litingwei (-r is deleted together with the user directory)