Linux开发:PAM2 配置文件

PAM配置文件是用于粘合应用程序和PAM服务模块,通过其中的配置,可以动态的选择PAM服务模块,从而增加认证的可配置性和灵活性。

PAM配置文件通常保存在/etc/pam.d/目录下,当应用程序进行认证时,会选择对应的PAM配置文件,而PAM配置文件又对PAM服务具体使用哪些模块(动态链接库)进行了描述,从而动态的加载PAM模块完成认证。

1.PAM配置文件的位置

在Ubuntu22.04上,PAM配置文件保存在/etc/pam.d/目录中:

/etc/pam.d$ ls -l

总计 140

-rw-r--r-- 1 root root  384 11月 11  2021 chfn

-rw-r--r-- 1 root root   92 11月 11  2021 chpasswd

-rw-r--r-- 1 root root  581 11月 11  2021 chsh

-rw-r--r-- 1 root root 1312  1月 27 12:49 common-account

-rw-r--r-- 1 root root 1300  1月 27 12:49 common-auth

-rw-r--r-- 1 root root 1778  1月 27 12:49 common-password

-rw-r--r-- 1 root root 1458  1月 27 12:49 common-session

-rw-r--r-- 1 root root 1435  1月 27 12:49 common-session-noninteractive

-rw-r--r-- 1 root root  606  3月 18  2021 cron

-rw-r--r-- 1 root root   69  2月 22  2022 cups

-rw-r--r-- 1 root root 1192  4月 21  2022 gdm-autologin

-rw-r--r-- 1 r

你可能感兴趣的:(Linux开发,linux)