歡迎您光臨本站 註冊首頁

【求助】testsaslauthd NO "authentication failed"

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

【求助】testsaslauthd NO "authentication failed"

請教各位老師:

CentOS

mysql-5.0.45-7.el5已安裝並確認mysql-devel包已經安裝

pam-devel-0.99.6.2-3.27.el5

lzo-2.03

pam_mysql 0.7RC

openvpn-2.1_rc20(源碼編譯安裝)

其實看標題我也知道是個老問題了,無奈著兩天始終在網上沒找到能解決自身問題的方案,現在對兩個地方有疑問:

【一】pam_mysql編譯出處理問題,結果如下,看看哪可能存在問題:

./configure --with-mysql=/usr/local/mysql_inno --with-openssl --with-cyrus-sasl2

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... no
checking for md5.h... (cached) yes
checking for MD5Data... no
checking for crypt in -lcrypt... yes
checking for crypt... yes

編譯之後在/usr/lib/security/下生成了pam_mysql.so這個文件,並將其複製到/lib/security/下

其他配置按教程走的,然後testsaslauthd,顯示NO "authentication failed"

【二】/etc/pam.d/openvpn配置文件
==================Cut Here=================
  2 auth    sufficient    /lib/security/pam_mysql.so                    user=vpn     passwd=vpn123 host=localhost db=vpn \
  3         table=vpnuser usercolumn=name passwdcolumn=password \
  4         where=active=1 sqllog=0 crypt=2
  5 account required        /lib/security/pam_mysql.so               user=vpn     passwd=vpn123 host=localhost db=vpn \
  6         table=vpnuser usercolumn=name passwdcolumn=password \
  7         where=active=1 sqllog=0 crypt=2
  8
  9
10
11 ==================Cut Here=================
12 crypt(0) -- Used to decide to use MySQL's PASSWORD() function or crypt()
13             0 = No encryption. Passwords in database in plaintext. NOT recom    mended!
14             1 = Use crypt
15             2 = Use MySQL PASSWORD() function
16
17 verbose=1

末了,查看message日誌

1239 Oct 22 17:26:12 CMS_25 saslauthd: pam_sm_authenticate called.
1240 Oct 22 17:26:12 CMS_25 saslauthd: dbuser changed.
1241 Oct 22 17:26:12 CMS_25 saslauthd: dbpasswd changed.
1242 Oct 22 17:26:12 CMS_25 saslauthd: host changed.
1243 Oct 22 17:26:12 CMS_25 saslauthd: database changed.
1244 Oct 22 17:26:12 CMS_25 saslauthd: table changed.
1245 Oct 22 17:26:12 CMS_25 saslauthd: usercolumn changed.
1246 Oct 22 17:26:12 CMS_25 saslauthd: passwdcolumn changed.
1247 Oct 22 17:26:12 CMS_25 saslauthd: where changed.
1248 Oct 22 17:26:12 CMS_25 saslauthd: sqllog changed.
1249 Oct 22 17:26:12 CMS_25 saslauthd: crypt changed.
1250 Oct 22 17:26:12 CMS_25 saslauthd: db_connect  called.
1251 Oct 22 17:26:12 CMS_25 saslauthd: returning 0 .
1252 Oct 22 17:26:12 CMS_25 saslauthd: db_checkpasswd called.
1253 Oct 22 17:26:12 CMS_25 saslauthd: pam_mysql: where clause = active=1
1254 Oct 22 17:26:12 CMS_25 saslauthd: SELECT password FROM vpnuser WHERE      name='test01' AND (active=1)
1255 Oct 22 17:26:12 CMS_25 saslauthd: returning 7 .
1256 Oct 22 17:26:12 CMS_25 saslauthd: returning 7 after db_checkpasswd.
1257 Oct 22 17:26:12 CMS_25 saslauthd: do_auth         : auth failure:


不知各位老師是否有何建議?謝謝

[ 本帖最後由 heavenmade1201 於 2009-10-23 14:13 編輯 ]
《解決方案》

回復 #1 heavenmade1201 的帖子

各個組建的版本信息

[火星人 ] 【求助】testsaslauthd NO "authentication failed"已經有645次圍觀

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