ubuntu:pam:configure_pam
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ubuntu:pam:configure_pam [2019/12/01 12:45] – created peter | ubuntu:pam:configure_pam [2020/07/15 09:30] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Ubuntu - PAM - Configure PAM ====== | ====== Ubuntu - PAM - Configure PAM ====== | ||
- | The main configuration file for PAM is / | + | The main configuration file for PAM is **/ |
PAM will ignore the file if the directory exists. | PAM will ignore the file if the directory exists. | ||
- | The syntax for the main configuration file is as follows. | + | ---- |
- | The file is made up of a list of rules written on a single line (you can extend rules using the “\” escape character) and comments are preceded with “#” marks and extend to the next end of line. | + | ===== Syntax |
- | The format of each rule is a space separated collection of tokens (the first three are case-insensitive). | + | The syntax for the main configuration file is as follows. |
- | + | ||
- | We will explain the these tokens in subsequent sections. | + | |
- | <code? | + | <code> |
service type control-flag module module-arguments | service type control-flag module module-arguments | ||
</ | </ | ||
Line 25: | Line 23: | ||
* **module-arguments: | * **module-arguments: | ||
- | The syntax of each file in /etc/pam.d/ is similar to that of the main file and is made up of lines of the following form: | + | <WRAP info> |
+ | The file is made up of a list of rules written on a **single** line. | ||
- | < | + | You can extend rules over multiple lines using the “\” escape character. |
+ | aaa \ | ||
+ | bbb | ||
+ | |||
+ | The format of each rule is a **space** separated collection of tokens (the first three are case-insensitive). | ||
+ | |||
+ | Comments are preceded with “#” marks and extend to the next end of line. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Syntax of PAM config files ===== | ||
+ | |||
+ | The syntax of each file in **/ | ||
+ | |||
+ | < | ||
type control-flag module module-arguments | type control-flag module module-arguments | ||
</ | </ | ||
Line 33: | Line 47: | ||
This is a example of a rule definition (without module-arguments) found in the / | This is a example of a rule definition (without module-arguments) found in the / | ||
- | < | + | < |
account required pam_nologin.so | account required pam_nologin.so | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Understanding PAM Management Groups and Control-flags ===== | ||
+ | |||
+ | PAM authentication tasks are separated into four independent management groups. | ||
+ | |||
+ | These groups manage different aspects of a typical user’s request for a restricted service. | ||
+ | |||
+ | A module is associated to one these management group types: | ||
+ | |||
+ | * **account: | ||
+ | * **authentication: | ||
+ | * **password: | ||
+ | * **session: | ||
+ | |||
+ | PAM loadable object files (the modules) are to be located in the following directory: / | ||
+ | |||
+ | The supported control-flags are: | ||
+ | |||
+ | * **requisite: | ||
+ | * **required: | ||
+ | * **sufficient: | ||
+ | * **optional: | ||
+ | |||
+ | In addition to the above are the keywords, there are two other valid control flags: | ||
+ | |||
+ | * **include: | ||
+ | * **substack: | ||
ubuntu/pam/configure_pam.1575204307.txt.gz · Last modified: 2020/07/15 09:30 (external edit)