您的位置:首页 > 其它

gateone配置pam认证

2017-12-15 14:58 176 查看
参考:http://blog.csdn.net/rexkang/article/details/40819537

           https://wiki.archlinux.org/index.php/Gateone
1.认证的设置在
conf.d/20authentication.conf


vi /etc/gateone/conf.d/20authentication.conf
auth = "pam"
pam_service = "gateone"

2.配置用户名密码,保存在users.passwd

htpasswd -c -d /etc/gateone/users.passwd user1

3.vi /etc/pam.d/gateone(这个文件里用到了pam_pwdfile.so,和pam_permit.so,需要下载源码编译)
#%PAM-1.0
# Login using a htpasswd file
#@include common-sessionauth
required pam_pwdfile.so          pwdfile etc/gateone/users.passwd
required pam_permit.so



 4.下载pam
 git clone https://github.com/tiwe-de/libpam-pwdfile.git
然后编译,刚开始编译出错,提示缺少文件

security/pam_appl.h:没有那个文件或目录

yum install pam-devel即可解决(我查的其他文章中的yum install git pam-devel pam PyPAM pam-devel,但是我执行完成好像还有错误,然后用yum install pam-devel就解决了)

make && make install
ln /lib/security/pam_pwdfile.so /lib64/security/pam_pwdfile.so

5.然后我们访问https://ip:port就弹出了一个填用户名密码的框
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: