Methods to create and delete users in Centos 6.9 environment
- 2020-08-22 23:20:47
- OfStack
This article illustrates how to create and delete users in Centos 6.9 environment. To share for your reference, the details are as follows:
Create a separate directory under the root
mkdir -p /weftp
Create user weftp
useradd -d /weftp/wq weftp
Grant user permission
chown -R weftp /weftp/wq/*
User configuration password
passwd weftp
Delete user
userdel weftp
Delete user directory
rm -rf /weftp/wq
Delete the user mailbox created by the system
rm -rf /var/spool/mail/weftp
Hopefully this article has helped you with CentOS server management.