| 1 |
authselect(8) |
| 2 |
============= |
| 3 |
:revdate: 2018-03-18 |
| 4 |
|
| 5 |
NAME |
| 6 |
---- |
| 7 |
|
| 8 |
authselect - select system identity and authentication sources. |
| 9 |
|
| 10 |
SYNOPSIS |
| 11 |
-------- |
| 12 |
authselect [--debug] [--trace] [--warn] command [command options] |
| 13 |
|
| 14 |
DESCRIPTION |
| 15 |
----------- |
| 16 |
*Authselect* is a tool to configure system identity and authentication sources |
| 17 |
and providers by selecting a specific profile. Profile is a set of files that |
| 18 |
describes how the resulting system configuration will look like. When a profile |
| 19 |
is selected, *authselect* will create nsswitch.conf(5) and PAM(8) stack to use |
| 20 |
identity and authentication sources defined by the profile. |
| 21 |
|
| 22 |
If the provided profile set is not sufficient, the administrator may create |
| 23 |
a custom profile by putting it in a special profile directory |
| 24 |
({AUTHSELECT_CUSTOM_DIR}). By doing so, the profile is immediately |
| 25 |
usable by *authselect*. See _authselect-profiles(5)_ for more information |
| 26 |
on extending existing profiles. |
| 27 |
|
| 28 |
OPT-IN TO AUTHSELECT |
| 29 |
-------------------- |
| 30 |
Authselect will not touch your existing configuration unless it has already |
| 31 |
been created by it. If you want to start using authselect to configure your |
| 32 |
system authentication, please call *authselect select* with *--force* parameter |
| 33 |
first (e.g. *authselect select sssd --force*). The *--force* parameter tells |
| 34 |
authselect that it is all right to overwrite existing non-authselect |
| 35 |
configuration (see description below). Using the *--force* parameter will |
| 36 |
automatically generate a backup of your current configuration so if you wish |
| 37 |
to go back you can restore it with *authselect backup-restore* command |
| 38 |
(see description below). |
| 39 |
|
| 40 |
OPT-OUT FROM AUTHSELECT |
| 41 |
----------------------- |
| 42 |
To stop authselect from managing your configuration, run *authselect opt-out*. |
| 43 |
This will remove all authselect configuration from your system and you can then |
| 44 |
modify your configuration manually. |
| 45 |
|
| 46 |
AVAILABLE COMMANDS |
| 47 |
------------------ |
| 48 |
To list all available commands run *authselect* without any parameters. |
| 49 |
To print help for the selected command run *authselect COMMAND --help*. |
| 50 |
|
| 51 |
*select* profile_id [features] [-f, --force] [-q, --quiet] [-b] [--backup=NAME]:: |
| 52 |
Activate desired profile. The _profile_id_ can be a profile name |
| 53 |
(e.g. _sssd_, _winbind_) or _@system-default_ to select the distribution's |
| 54 |
default configuration. See profile description with *show* command, |
| 55 |
to list profile specific optional features. |
| 56 |
|
| 57 |
*--force, -f*::: |
| 58 |
Write changes even if the previous configuration was not created by |
| 59 |
authselect but by other tool or by manual changes. This option will |
| 60 |
automatically backup system files before writing any change unless |
| 61 |
*--nobackup* option is set. |
| 62 |
|
| 63 |
*-b*::: |
| 64 |
Backup system files before activating the selected profile. The backup |
| 65 |
will be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with |
| 66 |
unique string is used as a name of the backup. This is a shortcut |
| 67 |
for *--backup=*. |
| 68 |
|
| 69 |
*--backup=NAME*::: |
| 70 |
Backup system files before activating the selected profile. The backup |
| 71 |
will be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with |
| 72 |
unique string is used as a name if no value is provided. |
| 73 |
|
| 74 |
*--nobackup*::: |
| 75 |
Do not backup system configuration even if *--force* is set. |
| 76 |
|
| 77 |
*--quiet, -q*::: |
| 78 |
The command will not print any informational message such as additional |
| 79 |
profile requirements or backup location. Errors are still being printed. |
| 80 |
|
| 81 |
*apply-changes* [-b] [--backup=NAME]:: |
| 82 |
Re-apply currently selected profile. If the profile templates were updated |
| 83 |
this command can be used to regenerate current system configuration in |
| 84 |
order to apply these changes on the system. This command will only re-apply |
| 85 |
the changes if the existing configuration is a valid authselect |
| 86 |
configuration, otherwise an error is returned. |
| 87 |
|
| 88 |
*-b*::: |
| 89 |
Backup system files before applying changes. The backup |
| 90 |
will be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with |
| 91 |
unique string is used as a name of the backup. This is a shortcut |
| 92 |
for *--backup=*. |
| 93 |
|
| 94 |
*--backup=NAME*::: |
| 95 |
Backup system files before applying changes. The backup will |
| 96 |
be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with unique |
| 97 |
string is used as a name if no value is provided. |
| 98 |
|
| 99 |
*list*:: |
| 100 |
List available profiles. The _@system-default_ option will be shown |
| 101 |
if the system default configuration file exists. |
| 102 |
|
| 103 |
*list-features* profile_id:: |
| 104 |
List all features available in given profile. + |
| 105 |
_Note:_ This will only list the features without any description. Please, |
| 106 |
read the profile documentation with *show* to see what the features do. |
| 107 |
|
| 108 |
*show* profile_id:: |
| 109 |
Print information about the profile. |
| 110 |
|
| 111 |
*requirements* profile_id [features]:: |
| 112 |
Print information about profile requirements. |
| 113 |
|
| 114 |
*current* [-r, --raw]:: |
| 115 |
Print information about currently selected profiles. If *--raw* option |
| 116 |
is specified, the command will print raw parameters as they were passed |
| 117 |
to *select* command instead of formatted output. |
| 118 |
|
| 119 |
*check*:: |
| 120 |
Check the current configuration. |
| 121 |
|
| 122 |
On success, the command prints one of: |
| 123 |
|
| 124 |
* *Current authselect configuration is valid.* -- configuration was |
| 125 |
generated by *authselect*. |
| 126 |
* *System was not configured with authselect.* -- the system is not |
| 127 |
using *authselect*. |
| 128 |
* *No configuration detected.* -- no PAM or nsswitch configuration |
| 129 |
relevant to *authselect*. |
| 130 |
(there might be other pam stacks in /etc/pam.d) |
| 131 |
|
| 132 |
If the configuration is not valid, the command prints found errors. |
| 133 |
|
| 134 |
You can refer to RETURN CODES section for specific error codes returned by the command. |
| 135 |
|
| 136 |
*test* profile_id [options] [features]:: |
| 137 |
Print content of files generated by *authselect* without actually writing |
| 138 |
anything to system configuration. |
| 139 |
|
| 140 |
*-a, --all*::: |
| 141 |
Print content of all files. |
| 142 |
|
| 143 |
*-n, --nsswitch*::: |
| 144 |
Print nsswitch.conf content. |
| 145 |
|
| 146 |
*-s, --system-auth*::: |
| 147 |
Print system-auth content. |
| 148 |
|
| 149 |
*-p, --password-auth*::: |
| 150 |
Print password-auth content. |
| 151 |
|
| 152 |
*-c, --smartcard-auth*::: |
| 153 |
Print smartcard-auth content. |
| 154 |
|
| 155 |
*-f, --fingerprint-auth*::: |
| 156 |
Print fingerprint-auth content. |
| 157 |
|
| 158 |
*-o, --postlogin*::: |
| 159 |
Print postlogin content. |
| 160 |
|
| 161 |
*-d, --dconf-db*::: |
| 162 |
Print dconf database content. |
| 163 |
|
| 164 |
*-l, --dconf-lock*::: |
| 165 |
Print dconf lock content. |
| 166 |
|
| 167 |
*enable-feature* feature [-b] [--backup=NAME] [-q, --quiet]:: |
| 168 |
Enable feature in the currently selected profile. |
| 169 |
|
| 170 |
*-b*::: |
| 171 |
Backup system files before enabling feature. The backup |
| 172 |
will be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with |
| 173 |
unique string is used as a name of the backup. This is a shortcut |
| 174 |
for *--backup=*. |
| 175 |
|
| 176 |
*--backup=NAME*::: |
| 177 |
Backup system files before enabling feature. The backup will |
| 178 |
be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with unique |
| 179 |
string is used as a name if no value is provided. |
| 180 |
|
| 181 |
*--quiet, -q*::: |
| 182 |
The command will not print any informational message such as additional |
| 183 |
profile requirements or backup location. Errors are still being printed. |
| 184 |
|
| 185 |
*disable-feature* feature [-b] [--backup=NAME]:: |
| 186 |
Disable feature in the currently selected profile. |
| 187 |
|
| 188 |
*-b*::: |
| 189 |
Backup system files before disabling feature. The backup |
| 190 |
will be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with |
| 191 |
unique string is used as a name of the backup. This is a shortcut |
| 192 |
for *--backup=*. |
| 193 |
|
| 194 |
*--backup=NAME*::: |
| 195 |
Backup system files before disabling feature. The backup will |
| 196 |
be stored at {AUTHSELECT_BACKUP_DIR}/NAME. Current time with unique |
| 197 |
string is used as a name if no value is provided. |
| 198 |
|
| 199 |
*is-feature-enabled* feature:: |
| 200 |
Check if feature is currently enabled in the selected profile. |
| 201 |
|
| 202 |
*create-profile* NAME [--vendor,-v] [options]:: |
| 203 |
Create a new custom profile named _NAME_. The profile can be based on an |
| 204 |
existing profile in which case the new profile templates are either copied |
| 205 |
from the base profile or symbolic links to these files are created if |
| 206 |
such option is selected. |
| 207 |
|
| 208 |
*--vendor,-v*::: |
| 209 |
The new profile is a vendor profile instead of a custom profile. See |
| 210 |
_authselect-profiles(5)_ for more information on profile types. |
| 211 |
|
| 212 |
*--base-on=BASE-ID, -b=BASE-ID*::: |
| 213 |
The new profile will be based on a profile named _BASE-ID_. The base |
| 214 |
profile location is determined with these steps: |
| 215 |
. If _BASE-ID_ starts with prefix _custom/_ it is a custom profile. |
| 216 |
. Try if _BASE-ID_ is found in vendor profiles. |
| 217 |
. Try if _BASE-ID_ is found in default profiles. |
| 218 |
. Return an error. |
| 219 |
|
| 220 |
*--base-on-default*::: |
| 221 |
The base profile is a default profile even if it is found also within |
| 222 |
vendor profiles. |
| 223 |
|
| 224 |
*--symlink-meta*::: |
| 225 |
Meta files, such as _README_ and _REQUIREMENTS_ will be symbolic links |
| 226 |
to the origin profile files instead of their copy. |
| 227 |
|
| 228 |
*--symlink-nsswitch*::: |
| 229 |
_nsswitch.conf_ template will be symbolic link to the origin profile |
| 230 |
file instead of its copy. |
| 231 |
|
| 232 |
*--symlink-pam*::: |
| 233 |
_PAM_ templates will be symbolic links to the origin profile files |
| 234 |
instead of their copy. |
| 235 |
|
| 236 |
*--symlink-dconf*::: |
| 237 |
_dconf_ templates will be symbolic links to the origin profile files |
| 238 |
instead of their copy. |
| 239 |
|
| 240 |
*--symlink=FILE,-s=FILE*::: |
| 241 |
Create a symbolic link for a template file _FILE_ instead of creating |
| 242 |
its copy. This option can be passed multiple times. |
| 243 |
|
| 244 |
BACKUP COMMANDS |
| 245 |
--------------- |
| 246 |
These commands can be used to manage backed up configurations. |
| 247 |
|
| 248 |
*backup-list* [-r, --raw]:: |
| 249 |
Print available backups. If *--raw* option is specified, the command will |
| 250 |
print only backup names without any formatting and additional information. |
| 251 |
|
| 252 |
*backup-remove* BACKUP:: |
| 253 |
Permanently delete backup named _BACKUP_. |
| 254 |
|
| 255 |
*backup-restore* BACKUP:: |
| 256 |
Restore configuration from backup named _BACKUP_. *Note:* this will |
| 257 |
overwrite current configuration. |
| 258 |
|
| 259 |
OTHER COMMANDS |
| 260 |
-------------- |
| 261 |
|
| 262 |
*opt-out*:: |
| 263 |
Remove authselect configuration. This will restore nsswitch and PAM |
| 264 |
configuration under its system location and authselect will no longer |
| 265 |
manage it. Run *authselect select* to opt-in again. |
| 266 |
|
| 267 |
DISTRIBUTION INTEGRATION |
| 268 |
------------------------ |
| 269 |
|
| 270 |
*@system-default configuration*:: |
| 271 |
Distributions can provide a system default configuration by creating |
| 272 |
{AUTHSELECT_DEFAULT_CONFIG_PATH}. This file defines the profile and |
| 273 |
features that will be activated when _@system-default_ is selected. |
| 274 |
|
| 275 |
COMMON OPTIONS |
| 276 |
-------------- |
| 277 |
These options are available with all commands. |
| 278 |
|
| 279 |
*--debug*:: |
| 280 |
Print debugging information and error messages. |
| 281 |
|
| 282 |
*--trace*:: |
| 283 |
Print information about what the tool is doing. |
| 284 |
|
| 285 |
*--warn*:: |
| 286 |
Print information about unexpected situations that do not affect |
| 287 |
the program execution but may indicate some undesired situations |
| 288 |
(e.g. unexpected file in a profile directory). |
| 289 |
|
| 290 |
TROUBLESHOOTING |
| 291 |
--------------- |
| 292 |
|
| 293 |
How can I tell if my system is using authselect? |
| 294 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 295 |
Use *authselect check*. See description of the `check` subcommand |
| 296 |
for more information. |
| 297 |
|
| 298 |
Is nsswitch.conf supposed to be a symbolic link now? |
| 299 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 300 |
Authselect generates your system configuration from scratch and stores it |
| 301 |
at {AUTHSELECT_CONFIG_DIR}. System files are then created as symbolic links |
| 302 |
to this directory. Symbolic links are used to make it clear that authselect |
| 303 |
is now owning your configuration and should be used instead of any manual |
| 304 |
modification. |
| 305 |
|
| 306 |
Error: Unexpected changes to the configuration were detected. |
| 307 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 308 |
For example: |
| 309 |
.... |
| 310 |
[error] [/etc/authselect/nsswitch.conf] does not exist! |
| 311 |
[error] [/etc/nsswitch.conf] is not a symbolic link! |
| 312 |
[error] [/etc/nsswitch.conf] was not created by authselect! |
| 313 |
[error] Unexpected changes to the configuration were detected. |
| 314 |
[error] Refusing to activate profile unless those changes are removed or overwrite is requested. |
| 315 |
.... |
| 316 |
This means that your configuration is unknown to authselect and as such it |
| 317 |
will not be modified. To fix this, please call *authselect select* with |
| 318 |
*--force* parameter to say that it is all right to overwrite it. |
| 319 |
|
| 320 |
RETURN CODES |
| 321 |
------------ |
| 322 |
The *authselect* can return these exit codes: |
| 323 |
|
| 324 |
* 0: Success. |
| 325 |
* 1: Generic error. |
| 326 |
* 2: Profile or configuration was not found or the system was not configured with authselect. |
| 327 |
* 3: Current configuration is not valid, it was edited without authselect. |
| 328 |
* 4: System configuration must be overwritten to activate an authselect profile, --force parameter is needed. |
| 329 |
* 5: Executed command must be run as root. |
| 330 |
* 6: No configuration was detected. |
| 331 |
|
| 332 |
GENERATED FILES |
| 333 |
--------------- |
| 334 |
Authselect creates and maintains the following files to configure system |
| 335 |
identity and authentication providers properly. |
| 336 |
|
| 337 |
*{AUTHSELECT_NSSWITCH_CONF}*:: |
| 338 |
Name Service Switch configuration file. |
| 339 |
|
| 340 |
*{AUTHSELECT_PAM_DIR}/system-auth*:: |
| 341 |
PAM stack that is included from nearly all individual service configuration |
| 342 |
files. |
| 343 |
|
| 344 |
*{AUTHSELECT_PAM_DIR}/password-auth, smartcard-auth, fingerprint-auth*:: |
| 345 |
These PAM stacks are for applications which handle authentication from |
| 346 |
different types of devices via simultaneously running individual |
| 347 |
conversations instead of one aggregate conversation. |
| 348 |
|
| 349 |
*{AUTHSELECT_PAM_DIR}/postlogin*:: |
| 350 |
The purpose of this PAM stack is to provide a common place for all |
| 351 |
PAM modules which should be called after the stack configured in |
| 352 |
system-auth or the other common PAM configuration files. It is included |
| 353 |
from all individual service configuration files that provide login service |
| 354 |
with shell or file access. _NOTE: the modules in the postlogin |
| 355 |
configuration file are executed regardless of the success or failure of |
| 356 |
the modules in the system-auth configuration file._ |
| 357 |
|
| 358 |
*{AUTHSELECT_DCONF_DIR}/{AUTHSELECT_DCONF_FILE}*:: |
| 359 |
Changes to dconf database. The main use case of this file is to set |
| 360 |
changes for gnome login screen in order to enable or disable smartcard |
| 361 |
and fingerprint authentication. |
| 362 |
|
| 363 |
*{AUTHSELECT_DCONF_DIR}/locks/{AUTHSELECT_DCONF_FILE}*:: |
| 364 |
This file defines locks on values set in dconf database. |
| 365 |
|
| 366 |
SEE ALSO |
| 367 |
-------- |
| 368 |
authselect-profiles(5), authselect-migration(7), nsswitch.conf(5), PAM(8) |