@@ -108,8 +108,14 @@ recommended that you start a separate shell with root privileges while
108
108
configuring PAM to be able to revert changes if something goes wrong.
109
109
Test your configuration thoroughly before closing the root shell.
110
110
111
+ [[moduleArguments]]
111
112
=== Module Arguments
112
113
114
+ The following table documents the set of arguments recognized by the module.
115
+ Hard-wired defaults can be overridden by a <<confFile,configuration file>>.
116
+ The definitions from the configuration file can be in turn overridden by
117
+ individual files under `/etc/pam.d/`.
118
+
113
119
[horizontal]
114
120
debug::
115
121
Enables debug output
@@ -240,6 +246,12 @@ FIDO devices. It is not possible to mix native credentials and SSH
240
246
credentials. Once this option is enabled all credentials will be parsed
241
247
as SSH.
242
248
249
+ conf_file=file::
250
+ Set an alternative location for the <<confFile,configuration file>>.
251
+ The supplied path must be absolute, and must correspond to an existing
252
+ regular file.
253
+ The file can be empty.
254
+
243
255
IMPORTANT: On dynamic networks (e.g. where hostnames are set by DHCP),
244
256
users should not rely on the default origin and appid
245
257
("pam://$HOSTNAME") but set those parameters explicitly to the same
@@ -404,6 +416,36 @@ defined in the authorization mapping file. If during an authentication attempt
404
416
a connected device is removed or a new device is plugged in, the authentication
405
417
restarts from the top of the list.
406
418
419
+ [[confFile]]
420
+ == Configuration file
421
+
422
+ A configuration file can be supplied in order to provide system-level default
423
+ values for the `pam_u2f.so` module arguments.
424
+
425
+ - The file can contain the same arguments as <<moduleArguments,defined above>>,
426
+ one per line, exception made for the `conf_file=` argument which can only appear
427
+ under `/etc/pam.d/`.
428
+
429
+ - Lines starting with `#` are interpreted as comments and skipped, together with
430
+ empty lines.
431
+
432
+ - In every line heading white-spaces (intended as in `isspace(3)`) are ignored.
433
+ Everything from the first non-white-space character till the end of line is
434
+ interpreted verbatim. Note that it is not possible to add trailing comments
435
+ to lines.
436
+
437
+ - Square brackets around arguments, usually needed under `/etc/pam.d` to get
438
+ spaces correctly recognized, must not be supplied.
439
+
440
+ The default path of the system-level configuration file is
441
+ `/etc/security/pam_u2f.conf`. The file is allowed to be missing or empty, in
442
+ which case the `pam_u2f.so` configuration will default to the hard-wired
443
+ values.
444
+
445
+ Individual files under `/etc/pam.d/` can specify a different configuration file
446
+ by means of the `conf_file=` argument, without affecting other
447
+ `/etc/pam.d/` files.
448
+
407
449
== SELinux Note
408
450
409
451
Due to an issue with Fedora Linux, and possibly with other
0 commit comments