Linux-PamAuthentication Module
Pluggable Authentication Modules for Linux Pluggable Authentication Module
When the user accesses the server, the service program sends the request to the PAM module. The PAM module is in/etc/PAM according to the service name. d directory, select a corresponding service file, and then select a specific PAM module based on the service file content for processing.
Check whether libpam. So is used by the Service Program during compilation through LDD to determine whether the service program supports PAM Authentication.
The specific Pam file is stored in the/lib/security directory, and the service file is stored in the/etc/PAM. d directory.
Pam service file format
Eg:
Auth required pam_security.so
Auth required pam_stack.so service = system-auth
Service indicates that the sub-service file is called.
Module-type:
Auth checks the user and password and assigns Permissions
Check whether the account has expired and whether the account has the right to log on.
Session control from user logon success to exit
Password Control Process
Control-flag:
The required request must be passed; otherwise, exit
If requisite does not pass the authentication, you can continue to perform the next authentication.
If sufficient passes the authentication, no further authentication is required.
Optional Option
Common Pam service files
Login -------/etc/PAM. d/login
Ipop3d -------/etc/PAM. d/pop
Vsftpd -------/etc/PAM. d/FTP (Compilation and installation) or/etc/PAM. d/vsftpd (RPM installation)
Sshd -------/etc/PAM. d/sshd
Su -------/etc/PAM. d/su
IMAP -------/etc/PAM. d/IMAP
/Lib/security directory, the role of each PAM module, can refer to the/usr/share/doc/pam-0.99.3.0 help file.
The same type of module-type forms a stack.
Common PAM modules
Pam_access.so controls the visitor address and account name
Pam_listfile.so controls the visitor's account name or logon location
Pam_limits.so controls the resources allocated to users
Pam_rootok.so allows the Administrator (uid = 0) to pass
Pam_userdb.so sets up independent user account database Authentication
Tty Terminal Device