免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: wenzk

[vpn] [原创]OpenVPN使用User/Pass验证登录 (消费者权益日献大礼) [复制链接]

论坛徽章:
0
发表于 2005-06-16 20:31 |显示全部楼层

[原创]OpenVPN使用User/Pass验证登录 (消费者权益日献大礼)

我对这个不了解:(

论坛徽章:
0
发表于 2006-01-27 10:35 |显示全部楼层
insert into vpnuer (name,password) values('elm',password('elm'));
这里的vpnuer应该为vpnuser,请楼主改一下哦

论坛徽章:
0
发表于 2006-04-15 22:14 |显示全部楼层
请问,我按照您的方法操作到验证pam_mysql是否正常的时候,提示size read failed ,我到日志里看到
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/pam_mysql.so)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/pam_mysql.so: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/pam_mysql.so
Apr 15 20:09:28 adsl saslauthd[6245]: PAM (openvpn) illegal module type: crypt(0)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM pam_parse: expecting return value; [...--]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/Used)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/Used: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/Used
Apr 15 20:09:28 adsl saslauthd[6245]: PAM (openvpn) illegal module type: 0
Apr 15 20:09:28 adsl saslauthd[6245]: PAM pam_parse: expecting return value; [...=]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/No)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/No: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/No
Apr 15 20:09:28 adsl saslauthd[6245]: PAM (openvpn) illegal module type: 1
Apr 15 20:09:28 adsl saslauthd[6245]: PAM pam_parse: expecting return value; [...=]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/Use)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/Use: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/Use
它是什么文件找不到呢,麻烦帮我看看!谢谢!

论坛徽章:
0
发表于 2006-04-17 01:54 |显示全部楼层
没有这个文件 /lib/security/pam_mysql.so
首先检查是否已经安装pam_mysql,如果安装了
看看是否在/usr/lib下或者其他什么地方,cp过去就OK了

论坛徽章:
0
发表于 2006-04-17 14:09 |显示全部楼层
谢谢您的回答,我看了,/lib/security/目录里有pam_mysql.so这个文件,编译这个文件的时候有些警告,没有错误提示,编译出来后我就cp到/lib/security/里了,但就是验证不成功,我用的是redhat AS4 U1 ,不知道哪个文件找不到!谢谢你!

论坛徽章:
0
发表于 2006-04-17 22:36 |显示全部楼层
看看message文件,看什么错误

论坛徽章:
0
发表于 2006-04-18 09:49 |显示全部楼层
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/pam_mysql.so)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/pam_mysql.so: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/pam_mysql.so
Apr 15 20:09:28 adsl saslauthd[6245]: PAM (openvpn) illegal module type: crypt(0)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM pam_parse: expecting return value; [...--]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/Used)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/Used: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/Used
Apr 15 20:09:28 adsl saslauthd[6245]: PAM (openvpn) illegal module type: 0
Apr 15 20:09:28 adsl saslauthd[6245]: PAM pam_parse: expecting return value; [...=]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/No)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/No: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/No
Apr 15 20:09:28 adsl saslauthd[6245]: PAM (openvpn) illegal module type: 1
Apr 15 20:09:28 adsl saslauthd[6245]: PAM pam_parse: expecting return value; [...=]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM unable to dlopen(/lib/security/Use)
Apr 15 20:09:28 adsl saslauthd[6245]: PAM [dlerror: /lib/security/Use: cannot open shared object file: No such file or directory]
Apr 15 20:09:28 adsl saslauthd[6245]: PAM adding faulty module: /lib/security/Use


这就是messages日志里的记录,麻烦帮我看看,谢谢!

论坛徽章:
0
发表于 2006-04-19 15:21 |显示全部楼层
$ ldd /lib/security/pam_mysql.so
        libz.so.1 => /usr/lib/libz.so.1 (0x00792000)
        libmysqlclient.so.10 => /usr/lib/mysql/libmysqlclient.so.10 (0x00b1c000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00b54000)
        libc.so.6 => /lib/tls/libc.so.6 (0x007b4000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x009c9000)
        libm.so.6 => /lib/tls/libm.so.6 (0x00997000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x003d4000)
$


把这个结果帖出来

论坛徽章:
0
发表于 2006-04-19 15:31 |显示全部楼层
[root@adsl security]# ldd pam_mysql.so
        libz.so.1 => /usr/lib/libz.so.1 (0x00b06000)
        libmysqlclient.so.14 => /usr/lib/mysql/libmysqlclient.so.14 (0x00824000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00111000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00508000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00675000)
        libm.so.6 => /lib/tls/libm.so.6 (0x0015c000)
        libssl.so.4 => /lib/libssl.so.4 (0x00e1c000)
        libcrypto.so.4 => /lib/libcrypto.so.4 (0x00b8e000)
        /lib/ld-linux.so.2 (0x001aa000)
        libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x0031f000)
        libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x001c1000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0x00dfe000)
        libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00638000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x0013f000)
        libdl.so.2 => /lib/libdl.so.2 (0x00ff4000)
有少文件吗?谢谢!

论坛徽章:
0
发表于 2006-04-30 09:33 |显示全部楼层
使用crypt=0好用 而用其他的crypt=1,crypt=2都不好用
crypt=0 时的帐户是未加密的,crypt=2时的帐户是加密的
crypt=2的log为
Apr 30 09:23:49 debian openvpn[3567]: pam_mysql - SELECT password FROM vpnuser WHERE name = 'elmk' AND (active=1)
pam_mysql - pam_mysql_sql_log() called.
pam_mysql - pam_mysql_sql_log() returning 0.
pam_mysql - pam_mysql_check_passwd() returning 6.
pam_mysql - pam_sm_authenticate() returning 7.
pam_mysql - pam_mysql_release_ctx() called.
pam_mysql - pam_mysql_destroy_ctx() called.
pam_mysql - pam_mysql_close_db() called.
pam_mysql - option verbose is set to "1"
pam_mysql - pam_mysql_close_db() called.
pam_mysql - pam_sm_authenticate() called.
pam_mysql - pam_mysql_converse() called.
pam_mysql - pam_mysql_open_db() called.
pam_mysql - pam_mysql_open_db() returning 0.
pam_mysql - pam_mysql_check_passwd() called.
pam_mysql - pam_mysql_format_string() called
pam_mysql - pam_mysql_quick_escape() called.

[ 本帖最后由 tqbhit 于 2006-4-30 09:38 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

SACC2019中国系统架构师大会

【数字转型 架构演进】SACC2019中国系统架构师大会,7折限时优惠重磅来袭!
2019年10月31日~11月2日第11届中国系统架构师大会(SACC2019)将在北京隆重召开。四大主线并行的演讲模式,1个主会场、20个技术专场、超千人参与的会议规模,100+来自互联网、金融、制造业、电商等领域的嘉宾阵容,将为广大参会者提供一场最具价值的技术交流盛会。

限时七折期:2019年8月31日前


----------------------------------------

大会官网>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP