PAM control flag與module的問題請教 - Linux

Table of Contents

大家好

最近在研究Linux PAM的部分

但對於module interface跟control flags的機制想請問

例如:

用google上常見的案例來看

/etc/pam.d/system-auth

#%PAM-1.0
auth required pam_securetty.so
auth required pam_unix.so shadow nullok
auth required pam_nologin.so
account required pam_unix.so
password required pam_cracklib.so retry=3
password required pam_unix.so shadow nullok use_authtok
session required pam_unix.so

這邊有幾個問題想問
1. 我個人找資料的想法是PAM

是對某個module name 在不同interface階段做不同的control flags

例如把pam_unix.so抓出來看
就是pam_unix.so會在這每個階段中做對應的動作(required)

auth required pam_unix.so shadow nullok
account required pam_unix.so
password required pam_unix.so shadow nullok use_authtok
session required pam_unix.so

想問的是
System-auth這個config檔
他是一路從

auth required pam_securetty.so
逐行執行到session required pam_unix.so
結束

還是各別的module name自己執行到對應的interface呢


2. 第二個問題
如果我把其中一個interface的 control flag改成 sufficient
例如把auth的control flag改成 sufficient後

auth sufficient pam_unix.so shadow nullok
account required pam_unix.so
password required pam_unix.so shadow nullok use_authtok
session required pam_unix.so

因為查資料的想法是sufficient

只要在auth處理完之後success

就表示後面的其他三個module interface就不在執行了嗎?

大概問題是這樣
謝謝大家QQ







--

All Comments

Kelly avatarKelly2021-09-03
看不到1的問題在哪裡,sufficient 當成是 or 吧.