- 论坛徽章:
- 0
|
pam_mysql error non-crypt()ish MD5 hash is not supported
Large | Medium | Small
09:55 , vkill
环境:archlinux 2.6.25-ARCH pam_mysql-0.7RC1 mysql-5.0.60 openssl-0.9.8h gcc-4.3.1 make-3.81
当我们在日志文件 /var/log/auth.log 中遇到这个错误,照下面的步骤重新编译
Quotation
non-crypt()ish MD5 hash is not supported in this build
pam_mysql编译步骤:
1、安装mysql和openssl
[root@myhost ~]# pacman -S mysql openssl
2、下载pam_mysql
[root@myhost ~]# wget http://prdownloads.sourceforge.n ... mysql-0.7RC1.tar.gz
3、解压并cd到解压后的目录
[root@myhost ~]# tar -zxf pam_mysql-0.7RC1.tar.gz -C /usr/src/
[root@myhost ~]# cd /usr/src/pam_mysql-0.7RC1/
4、做md5.h的符号链接,不做这一步后面md5是不被支持的
[root@myhost pam_mysql-0.7RC1]# ln -s /usr/include/openssl/md5.h /usr/include/md5.h
5、编译pam_mysql,记得一定要加上--with-openssl,具体位置看你的安装情况,archlinux下pacman安装默认是在这里
[root@myhost pam_mysql-0.7RC1]# ./configure --with-openssl=/usr --with-mysql=/usr
//如最后出现下面这段,才表示md5被支持,否则虽然编译生成的pam_mysql.so可以用,但是不支持md5
Quotation
checking if md5.h is derived from Cyrus SASL Version 1... no
checking md5.h usability... yes
checking md5.h presence... yes
checking for md5.h... yes
checking if md5.h is Solaris's... yes
checking for md5_calc in -lmd5... no
checking for crypt in -lcrypt... yes
checking for crypt... yes
[root@myhost pam_mysql-0.7RC1]# make
[root@myhost pam_mysql-0.7RC1]# make install
6、查看编译后pam_mysql.so是否存在
[root@myhost pam_mysql-0.7RC1]# cd ~
[root@myhost ~]# ls /lib/security | grep pam_mysql.so
使用方法和参数详见自带的帮助文件:
[root@myhost ~]# cat /usr/src/pam_mysql-0.7RC1/README
如在使用中使用了 debug 或 verbose=1 参数,调试日志是 /var/log/auth.log
转载:http://blog.vkill.net/ |
|