Configuring Services
SSSD worked with specialized services that run in tandem with the SSSD process itself. SSSD and its associated services are configured in the sssd.conf
file. on sections. The [sssd]
section also lists the services that are active and should be started when sssd
starts within the services
directive.
SSSD currently provides several services:
- An NSS provider service that answers NSS requests from the
sssd_nss
module. This is configured in the[nss]
section of the configuration.
- A PAM provider service that manages a PAM conversation through the
sssd_pam
PAM module. This is configured in the[pam]
section of the configuration. monitor
, a special service that monitors and starts or restarts all other SSSD services. Its options are specified in the[sssd]
section of the/etc/sssd/sssd.conf
configuration file.
If a DNS lookup fails to return an IPv4 address for a hostname, SSSD attempts to look up an IPv6 address before returning a failure. This only ensures that the asynchronous resolver identifies the correct address.
The hostname resolution behavior is configured in the SSSD provides an NSS module, To configure the NSS service:
The allowed values for this option are 0 to 99, which sets the percentage based on the This configures the entry cache to update entries in the background automatically if they are requested if the time before the next update is a certain percentage of the next interval. For example, if the interval is 300 seconds and the cache percentage is 75, then the entry cache will begin refreshing when a request comes in at 225 seconds - 75% of the interval.
A mistake in the PAM configuration file can lock users out of the system completely. Always back up the configuration files before performing any changes, and keep a session open so that any changes can be reverted.
SSSD provides a PAM module, To configure the PAM service:
So, remove the These modules can be set to lookup family order
option in the sssd.conf
configuration file.
Configuring the NSS Service
sssd_nss
, which instructs the system to use SSSD to retrieve user information. The NSS configuration must include a reference to the SSSD module, and then the SSSD configuration sets how SSSD interacts with NSS.
sssd.conf
file.# vim /etc/sssd/sssd.conf
[sssd]
config_file_version = 2
reconnection_retries = 3
sbus_timeout = 30
services =
nss
, pam[nss]
section, change any of the NSS parameters. These are listed in Table 28.1, "SSSD [nss] Configuration Parameters".
[nss]
filter_groups = root
filter_users = root
reconnection_retries = 3
entry_cache_timeout = 300
entry_cache_nowait_percentage = 75
service sssd restart
Table 28.1. SSSD [nss] Configuration Parameters
entry_cache_timeout
value. The default value is 50%.
Parameter
Value Format
Description
enum_cache_timeout
integer
Specifies how long, in seconds, sssd_nss should cache requests for information about all users (enumerations).
entry_cache_nowait_percentage
integer
Specifies how long sssd_nss should return cached entries before refreshing the cache. Setting this to zero ( 0
) disables the entry cache refresh.
entry_negative_timeout
integer
Specifies how long, in seconds, sssd_nss should cache negative cache hits. A negative cache hit is a query for an invalid database entries, including non-existent entries.
filter_users, filter_groups
string
Tells SSSD to exclude certain users from being fetched from the NSS database. This is particularly useful for system accounts such as root
.
filter_users_in_groups
Boolean
Sets whether users listed in the filter_users
list appear in group memberships when performing group lookups. If set to FALSE
, group lookups return all users that are members of that group. If not specified, this value defaults to TRUE
, which filters the group member lists.Configuring the PAM Service
sssd_pam
, which instructs the system to use SSSD to retrieve user information. The PAM configuration must include a reference to the SSSD module, and then the SSSD configuration sets how SSSD interacts with PAM.
/etc/pam.d/system-auth-ac
file, which is symlinked to /etc/pam.d/system-auth
. Any changes made to /etc/pam.d/system-auth
are overwritten the next time that authconfig
is run./etc/pam.d/system-auth
symlink.
[root@server ~]# rm /etc/pam.d/system-auth
rm: remove symbolic link `/etc/pam.d/system-auth'? y
/etc/pam.d/system-auth-local
file. One easy way to do this is simply to copy the /etc/pam.d/system-auth-ac
file.
[root@server ~]# cp /etc/pam.d/system-auth-ac /etc/pam.d/system-auth-local
/etc/pam.d/system-auth-local
file and /etc/pam.d/system-auth
.
[root@server ~]# ln -s /etc/pam.d/system-auth-local /etc/pam.d/system-auth
/etc/pam.d/system-auth-local
file, and add all of the SSSD modules to the PAM configuration:
#%PAM-1.0
...
auth sufficient pam_sss.so use_first_pass
auth required pam_deny.so
...
account [default=bad success=ok user_unknown=ignore] pam_sss.so
account required pam_permit.so
...
password sufficient pam_sss.so use_authtok
password required pam_deny.so
...
session sufficient pam_sss.so
session required pam_unix.so
include
statements, as necessary.
sssd.conf
file.
# vim /etc/sssd/sssd.conf
[sssd]
config_file_version = 2
reconnection_retries = 3
sbus_timeout = 30
services = nss,
pam
[pam]
section, change any of the PAM parameters. These are listed in Table 28.2, "SSSD [pam] Configuration Parameters".
[pam]
reconnection_retries = 3
offline_credentials_expiration = 2
offline_failed_login_attempts = 3
offline_failed_login_delay = 5
service sssd restart
Table 28.2. SSSD [pam] Configuration Parameters
Parameter
Value Format
Description
offline_credentials_expiration
integer
Sets how long, in days, to allow cached logins if the authentication provider is offline. This value is measured from the last successful online login. If not specified, this defaults to zero ( 0
), which is unlimited.
offline_failed_login_attempts
integer
Sets how many failed login attempts are allowed if the authentication provider is offline. If not specified, this defaults to zero ( 0
), which is unlimited.
offline_failed_login_delay
integer
Sets how long to prevent login attempts if a user hits the failed login attempt limit. If set to zero ( 0
), the user cannot authenticate while the provider is offline once he hits the failed attempt limit. Only a successful online authentication can re-enable offline authentication. If not specified, this defaults to five (5).