Create a user in Linux and configure FTP for access

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.