Skip to content

Commit 3b245e0

Browse files
committed
Update README file and manpages
1 parent 5c71106 commit 3b245e0

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

README

+42
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ recommended that you start a separate shell with root privileges while
108108
configuring PAM to be able to revert changes if something goes wrong.
109109
Test your configuration thoroughly before closing the root shell.
110110

111+
[[moduleArguments]]
111112
=== Module Arguments
112113

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+
113119
[horizontal]
114120
debug::
115121
Enables debug output
@@ -240,6 +246,12 @@ FIDO devices. It is not possible to mix native credentials and SSH
240246
credentials. Once this option is enabled all credentials will be parsed
241247
as SSH.
242248

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+
243255
IMPORTANT: On dynamic networks (e.g. where hostnames are set by DHCP),
244256
users should not rely on the default origin and appid
245257
("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
404416
a connected device is removed or a new device is plugged in, the authentication
405417
restarts from the top of the list.
406418

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+
407449
== SELinux Note
408450

409451
Due to an issue with Fedora Linux, and possibly with other

man/pam_u2f.8.txt

+37
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ will be ignored.
8888
Set to prompt a message and wait before testing the presence of a U2F
8989
device. Recommended if your device doesn't have tactile trigger.
9090

91+
9192
*[prompt=your prompt here]*::
9293
Set individual prompt message for interactive mode. Watch the square
9394
brackets around this parameter to get spaces correctly recognized by
@@ -134,6 +135,13 @@ FIDO devices. It is not possible to mix native credentials and SSH
134135
credentials. Once this option is enabled all credentials will be parsed
135136
as SSH.
136137

138+
*conf_file*=_path_::
139+
Set an alternative location for the configuration file.
140+
The supplied path must be absolute, and must correspond to an existing
141+
regular file.
142+
The file can be empty.
143+
See *CONFIGURATION FILE*.
144+
137145
== EXAMPLES
138146

139147
Second factor authentication deferring user verification configuration to the
@@ -162,6 +170,35 @@ mapping file in an encrypted home directory, will result in the
162170
impossibility of logging into the system. The partition is decrypted
163171
after login and the mapping file can not be accessed.
164172

173+
== CONFIGURATION FILE
174+
A configuration file can be supplied in order to provide system-level default
175+
values for the `pam_u2f.so` module arguments.
176+
177+
- The file can contain the same arguments as defined in the *OPTIONS* section,
178+
one per line, exception made for the `conf_file=` argument, which can only
179+
appear under `/etc/pam.d/`.
180+
181+
- Lines starting with `#` are interpreted as comments and skipped, together with
182+
empty lines.
183+
184+
- In every line heading white-spaces (intended as in `isspace(3)`) are ignored.
185+
Everything from the first non-white-space character till the end of line is
186+
interpreted verbatim. Note that it is not possible to add trailing comments
187+
to lines.
188+
189+
- Square brackets around arguments, usually needed under `/etc/pam.d` to get
190+
spaces correctly recognized, must not be supplied.
191+
192+
The default path of the system-level configuration file is
193+
`/etc/security/pam_u2f.conf`. The file is allowed to be missing or empty, in
194+
which case the `pam_u2f.so` configuration will default to the hard-wired
195+
values.
196+
197+
Individual files under `/etc/pam.d/` can specify a different configuration file
198+
by means of the `conf_file=` argument, without affecting other `/etc/pam.d/`
199+
files.
200+
201+
165202
== NOTES
166203

167204
*Nodetect*

0 commit comments

Comments
 (0)