quickshell-web/modules_old/Quickshell.Services.Pam/index.json

5 lines
1.8 KiB
JSON
Raw Normal View History

2024-09-27 23:35:19 +00:00
{
"name": "Quickshell.Services.Pam",
"description": "Pam authentication",
"details": "## Writing pam configurations\n\nIt is a good idea to write pam configurations specifically for quickshell\nif you want to do anything other than match the default login flow.\n\nA good example of this is having a configuration that allows entering a password\nor fingerprint in any order.\n\n### Structure of a pam configuration.\nPam configuration files are a list of rules, each on a new line in the following form:\n```\n<type> <control_flag> <module_path> [options]\n```\n\nEach line runs in order.\n\nPamContext currently only works with the `auth` type, as other types require root\naccess to check.\n\n#### Control flags\nThe control flags you're likely to use are `required` and `sufficient`.\n- `required` rules must pass for authentication to succeed.\n- `sufficient` rules will bypass any remaining rules and return on success.\n\nNote that you should have at least one required rule or pam will fail with an undocumented error.\n\n#### Modules\nPam works with a set of modules that handle various authentication mechanisms.\nSome common ones include `pam_unix.so` which handles passwords and `pam_fprintd.so`\nwhich handles fingerprints.\n\nThese modules have options but none are required for basic functionality.\n\n### Examples\n\nAuthenticate with only a password:\n```\nauth required pam_unix.so\n```\n\nAuthenticate with only a fingerprint:\n```\nauth required pam_fprintd.so\n```\n\nTry to authenticate with a fingerprint first, but if that fails fall back to a password:\n```\nauth sufficient pam_fprintd.so\nauth required pam_unix.so\n```\n\nRequire both a fingerprint and a password:\n```\nauth required pam_fprintd.so\nauth required pam_unix.so\n```\n\n\nSee also: [Oracle: PAM configuration file](https://docs.oracle.com/cd/E19683-01/816-4883/pam-32/index.html)"
}