歡迎您光臨本站 註冊首頁

ldap無法驗證ftp?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

ldap無法驗證ftp?

我用的環境是 ubuntu9.04+ slapd + vsftpd
最近在弄ldap伺服器,驗證ftp, 現在的問題是:如果LDAP伺服器和ftp伺服器是同一台機器的話,用ldap驗證ftp用戶沒有問題,當LDAP伺服器和FTP部署在不同機器上時,就不能認證了,相關配置文件信息如下:
   /etc/vsftpd.conf
--------------------------------
  listen=YES
  local_enable=YES
  write_enable=YES
  dirmessage_enable=YES
  xferlog_enable=YES
  connect_from_port_20=YES
  chroot_local_user=YES
  secure_chroot_dir=/var/run/vsftpd
  pam_service_name=vsftpd
  rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
  rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

/etc/pam.d/vsftpd
-------------------------------
# Standard behaviour for ftpd(8).
auth  sufficient   /lib/security/pam_ldap.so use_first_pass
account  sufficient  /lib/security/pam_ldap.so
password  sufficient  /lib/security/pam_ldap.so

auth    required        pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed

auth   required  /lib/security/pam_shells.so
account  required  /lib/security/pam_unix.so
session  required /lib/security/pam_loginuid.so
@include common-account
@include common-session

@include common-auth
auth    required        pam_shells.so

ftp 伺服器中的
/etc/ldap.conf
--------------------------------
host 10.1.0.117  (LDAP伺服器地址)
base dc=example,dc=com
ldap_version 3
binddn cn=admin,dc=example,dc=com
rootbinddn cn=admin,dc=example,dc=com
scope sub
pam_password md5

看了ldap伺服器和ftp伺服器的syslog都沒有提示錯誤 ,但就是不能認證:
beck@beck-desktop:~$ ftp 10.1.0.116
Connected to 10.1.0.116.
220 (vsFTPd 2.0.7)
Name (10.1.0.116:beck): zzh
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.

有那位大狹能幫忙解釋下是什麼原因???

是不是沒有進行SASL驗證的原因阿,因為存在這網路通信的問題???
我看了ldap幫助文檔,說要安裝Cyrus-sasl?  請問Cyrus-sasl如何使用

[火星人 ] ldap無法驗證ftp?已經有769次圍觀

http://coctec.com/docs/service/show-post-18270.html