Linux practice engineer Study Notes 17

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.