LDAP Authentication Vsftp method

Source: Internet
Author: User
Tags ftp ldap

[root@li382-107 ~]# Yum Install vsftpd-y

[root@li382-107 ~]# vim/etc/pam_ldap.conf #更改如下2行:

Base dc=jc,dc=com

URI ldap://192.168.1.10

[root@li382-107 ~]# vim/etc/pam.d/vsftpd #添加2行:

Auth sufficient pam_ldap.so #把这行放在第一个auth项

Account sufficient pam_ldap.so #把这行放在第一个account项

[root@li382-107 ~]# vim/etc/vsftpd/vsftpd.conf #配置如下:

Anonymous_enable=no #不允许匿名用户访问

Anon_upload_enable=yes

Anon_mkdir_write_enable=yes #开启这项和上一项才能上传文件和文件夹

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/Ftp/

Chroot_local_user=yes

Guest_enable=yes

Guest_username=ftp

Local_root=/data

[root@li382-107 ~]#/etc/init.d/vsftpd Restart

[root@li382-107 ~]# yum-y Install FTP

[root@li382-107/]# chown-r ftp.ftp/data/*

#测试: JC is my LDAP account.

[Root@li382-107 ~]# FTP 127.0.0.1

Connected to 127.0.0.1 (127.0.0.1).

2.2.2 (VSFTPD)

Name (127.0.0.1:root): JC

331 Please specify the password.

Password:

230 Login successful.

Remote system type is UNIX.

Using binary mode to transfer files.

Ftp> LL

? Invalid command

Ftp> ls

Entering passive Mode (127,0,0,1,193,186).

Here comes the directory listing.

Directory send OK.

Ftp>

This article is from the "Imysql" blog, please be sure to keep this source http://jiechao2012.blog.51cto.com/3251753/1224143

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.