SCAutolib.models.authselect

This module provides methods allowing to configure system for smart-card authentication implemented as context manager. It calls authselect tool (see man authselect(8)) and applies sssd profile with selected ‘Authselect profile features’ (see man authselect-migration(7)).

Classes

class Authselect(required=False, lock_on_removal=False, mk_homedir=False, sudo=False)[source]

Constructor for Authselect class. Only ‘with-smartcard’ feature of sssd profile is set by default and –force option is used if the sssd profile is modified. Previous configuration is backed up and restored on exiting context manager.

Parameters:
  • required (bool) – specifies with-smartcard-required option

  • lock_on_removal (bool) – specifies with-smartcard-lock-on-removal option

  • mk_homedir (bool) – specifies with-mkhomedir option

_restore()[source]

Restore the previous configuration of authselect.

_set()[source]

Set authselect with SSSD profile and set selected Authselect profile features. Features are passed into the constructor.