It is easy to create users in Linux, but these operations are not often performed. after a long time, it is easy to forget. By the way, configure FTP.
StatementRun CentOS release 5.6 as the Super Administrator root.
Create a new user
1. create a user and specify the group and main directory
Useradd-d/home/lch-g root lch
You can also add other parameters, such as specifying the user to use shell.
2. set the password
Passwd lch
3. view, change, and add user groups
[Root @ localhost ~] # Groups lch: root www #-G change group [root @ localhost ~] # Usermod-G root lch [root @ localhost ~] # Groups lch: root #-g add Group [root @ localhost ~] # Usermod-g www lch [root @ localhost ~] # Groups lch: www root
4. delete a user
# Add the-r parameter to delete userdel-r lch.
Change ftp configuration file
Modify the configuration file/etc/vsftpd. conf and set or delete the comment:
Userlist_enable = NOanonymous_enable = NOchroot_list_enable = YESchroot_list_file =/etc/vsftpd/chroot_list
Open/etc/vsftpd/user_list and add a line:
Lch
Create a file/etc/vsftpd/chroot_list and add a line
Lch
Start FTP service
Service vsftpd start
There are also two parameters: stop and restart.