时间:2021-07-01 10:21:17 帮助过:31人阅读
[root@RedHat-5 pam.d]# tail /var/log/secure Sep 12 11:39:48 RedHat-5 vsftpd: PAM adding faulty module: /lib/security/pam_mysql.so Sep 12 11:42:39 RedHat-5 vsftpd: PAM unable to dlopen(/lib/security/pam_mysql.so) Sep 12 11:42:39 RedHat-5 vsftpd: PAM [error: /lib/security/pam_mysql.so: cannot open shared object file: No such file or directory] Sep 12 11:42:39 RedHat-5 vsftpd: PAM adding faulty module: /lib/security/pam_mysql.so Sep 12 11:42:59 RedHat-5 vsftpd: PAM unable to dlopen(/lib/security/pam_mysql.so) Sep 12 11:42:59 RedHat-5 vsftpd: PAM [error: /lib/security/pam_mysql.so: cannot open shared object file: No such file or directory] Sep 12 11:42:59 RedHat-5 vsftpd: PAM adding faulty module: /lib/security/pam_mysql.so Sep 12 11:44:30 RedHat-5 vsftpd: PAM unable to dlopen(/lib/security/pam_mysql.so) Sep 12 11:44:30 RedHat-5 vsftpd: PAM [error: /lib/security/pam_mysql.so: cannot open shared object file: No such file or directory] Sep 12 11:44:30 RedHat-5 vsftpd: PAM adding faulty module: /lib/security/pam_mysql.so
二.解决方法
经过仔细查看前面的步骤,发现原来make install的时候默认安装在/usr/local/lib下。修改/etc/pam.d/vsftpd.mysql文件
auth required /usr/lib/security/pam_mysql.so user=vsftpd passwd=www.luochen.com host=localhost db=vsftpd table=users usercolumn=name passwdcolumn=password crypt=0 account required /usr/lib/security/pam_mysql.so user=vsftpd passwd=www.luochen.com host=localhost db=vsftpd table=users usercolumn=name passwdcolumn=password crypt=0
在登录,成功!换用其他加密方式,也都可以。
然后试验pam_mysql v0.7新加的config_file配置选项。这个选项用来指定一个配置文件,可以把所有pam_mysql的配置放在这个文件中。这样的话,/etc/pam.d/vsftpd.mysql的内容变成这样:
auth required /usr/lib/security/pam_mysql.so config_file=/etc/security/pam_mysql.conf account required /usr/lib/security/pam_mysql.so config_file=/etc/security/pam_mysql.conf
/etc/security/pam_mysql.conf的内容:
users.host=localhost
users.database=vsftpd
users.db_user=root
users.db_passwd=redhat
users.table=users
users.user_column=name
users.password_column=password
users.password_crypt=3
verbose=1
log.enabled=1
log.table=logs
log.message_column=msg
log.pid_column=pid
log.user_column=user
log.host_column=host
log.rhost_column=rhost
log.time_column=logtime
本文出自 “珞辰的博客” 博客,请务必保留此出处http://luochen2015.blog.51cto.com/9772274/1694057
ftp服务结合pam_mysql 使用错误
标签:error: /lib/security/pam_mysql.so: cannot open shared object file: no such file or directory