pam_shells.so




OS version:Red Hat Enterprise Linux Server release 6.4
Kernel version:2.6.32-358.el6.x86_64


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


準備工作:
[root@Zhai ~]# tail -n 2 /etc/passwd

pam_test1:x:501:502::/home/pam_test1:/bin/csh
pam_test2:x:502:503::/home/pam_test2:/bin/bash


[root@Zhai ~]# vi /etc/shells

/bin/sh
/bin/bash
/sbin/nologin
/bin/dash
/bin/tcsh


[root@Zhai ~]# service vsftpd start
[root@Zhai ~]# ifconfig | grep "inet addr"

inet addr:192.168.60.2  Bcast:192.168.60.255  Mask:255.255.255.0
inet addr:127.0.0.1  Mask:255.0.0.0




案例1:
[root@Zhai ~]# cat /etc/pam.d/vsftpd

#%PAM-1.0
auth       required     pam_shells.so
account    include      password-auth




121212737.jpg




案例2:
[root@Zhai ~]# man pam_shells

RETURN VALUES
       PAM_AUTH_ERR
           Access to the system was denied.
       PAM_SUCCESS
           The users login shell was listed as valid shell in /etc/shells.
       PAM_SERVICE_ERR
           The module was not able to get the name of the user.


[root@Zhai ~]# cat /etc/pam.d/vsftpd

#%PAM-1.0
auth       [success=ok default=die]     pam_shells.so
account    include      password-auth




121330284.jpg




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


The detailed information:man pam_shells



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章