The System Security Services Daemon (SSSD) provides access to remote identity and authentication providers. It is commonly used to integrate Linux systems with Active Directory, LDAP directories, and other centralized identity services. This reference provides an overview of SSSD configuration files, common sections, options, and examples to help you set up and manage SSSD effectively.
The main configuration file for SSSD is /etc/sssd/sssd.conf
. This file contains global settings and domain-specific configurations. Ensure that the file has permissions set to 600
and is owned by root:root
to prevent unauthorized access.
# Example permissions
chmod 600 /etc/sssd/sssd.conf
chown root:root /etc/sssd/sssd.conf
The sssd.conf
file consists of different sections:
[sssd]
- Global SSSD options.[domain/<name>]
- Domain-specific settings.[auth_provider/<name>]
- Authentication provider settings.[nss]
- Name Service Switch settings.[pam]
- Pluggable Authentication Module settings.[ifp]
- InfoPipe responder settings.The [sssd]
section contains global options for SSSD.
Option | Description |
---|---|
config_file_version |
The version of the config file syntax. Typically set to 2 . |
services |
A comma-separated list of services to start (e.g., nss, pam, sudo, ssh ). |
domains |
A comma-separated list of configured domains. |
reconnection_retries |
Number of times SSSD tries to reconnect to a provider. |
debug_level |
Sets the debug level (0-10) for logging. |
[sssd]
config_file_version = 2
services = nss, pam
domains = example.com
The [domain/<name>]
section defines settings for a specific domain or identity provider.
Option | Description |
---|---|
id_provider |
Specifies the identity provider type (e.g., ldap , ad , ipa ). |
auth_provider |
Specifies the authentication provider type. |
chpass_provider |
Specifies the password change provider. |
access_provider |
Controls access to the system (e.g., ldap , ad , permit , deny ). |
ldap_uri |
Specifies the LDAP server URI. |
ldap_search_base |
Specifies the base DN for LDAP searches. |
ldap_schema |
Specifies the LDAP schema (e.g., rfc2307 , rfc2307bis ). |
enumerate |
Enables or disables user and group enumeration (true or false ). |
cache_credentials |
Enables caching of user credentials (true or false ). |
[domain/example.com]
id_provider = ldap
auth_provider = ldap
chpass_provider = ldap
access_provider = ldap
ldap_uri = ldaps://ldap.example.com
ldap_search_base = dc=example,dc=com
ldap_schema = rfc2307bis
ldap_default_bind_dn = cn=binduser,dc=example,dc=com
ldap_default_authtok_type = password
ldap_default_authtok = binduserpassword
enumerate = false
cache_credentials = true
[domain/example.com]
id_provider = ad
auth_provider = ad
access_provider = ad
chpass_provider = ad
ad_domain = example.com
krb5_realm = EXAMPLE.COM
krb5_server = dc1.example.com
enumerate = false
cache_credentials = true
The [nss]
section configures the Name Service Switch integration.
Option | Description |
---|---|
filter_groups |
List of groups to exclude from enumeration. |
filter_users |
List of users to exclude from enumeration. |
entry_negative_timeout |
Time in seconds to cache negative lookup results. |
memcache_timeout |
Time in seconds for in-memory cache entries. |
[nss]
filter_groups = root
filter_users = root
entry_negative_timeout = 20
memcache_timeout = 600
The [pam]
section configures the PAM responder, which handles authentication requests.
Option | Description |
---|---|
offline_credentials_expiration |
Time in hours before cached credentials expire. |
pam_cert_auth |
Enables certificate authentication (true or false ). |
pam_pwd_expiration_warning |
Days before password expiration to warn the user. |
[pam]
offline_credentials_expiration = 0
pam_cert_auth = false
pam_pwd_expiration_warning = 7
These sections configure SSSD to provide SSH and Sudo integrations.
[ssh]
ssh_hash_known_hosts = false
[sudo]
sudo_provider = ldap
ldap_sudo_search_base = ou=SUDOers,dc=example,dc=com
Control user access using the access_provider
option.
permit
- Allows all users.deny
- Denies all users.ldap
- Uses LDAP attributes for access control.ad
- Uses Active Directory attributes.simple
- Uses a list of allowed or denied users/groups.[domain/example.com]
access_provider = simple
simple_allow_users = user1, user2
simple_allow_groups = group1, group2
SSSD can cache user credentials to allow offline authentication.
[domain/example.com]
cache_credentials = true
[pam]
offline_credentials_expiration = 0
Setting offline_credentials_expiration
to 0
disables expiration of cached credentials.
When using Kerberos authentication, additional configuration may be required.
[domain/example.com]
auth_provider = krb5
krb5_server = kdc.example.com
krb5_realm = EXAMPLE.COM
krb5_kpasswd = kpasswd.example.com
Set the debug_level
option in different sections to control logging verbosity.
[sssd]
debug_level = 0xFFF0
[domain/example.com]
debug_level = 0xFFF0
[nss]
debug_level = 0xFFF0
[pam]
debug_level = 0xFFF0
Log files are typically located in /var/log/sssd/
.
sss_cache
to clear the SSSD cache:
# Clear all cache
sss_cache -E
# Clear cache for a specific user
sss_cache -u username
sssctl
for status and debug logs:
# Check SSSD status
sssctl status
# View domain information
sssctl domain-list
sssctl domain-status example.com
# Watch logs in real-time
sssctl debug-level 9
# Get user information
getent passwd username
# Check group membership
getent group groupname
# Test PAM authentication
su - username
[sssd]
config_file_version = 2
services = nss, pam
domains = example.com
[nss]
filter_groups = root
filter_users = root
entry_negative_timeout = 20
[pam]
offline_credentials_expiration = 0
pam_pwd_expiration_warning = 7
[domain/example.com]
id_provider = ldap
auth_provider = ldap
chpass_provider = ldap
access_provider = ldap
ldap_uri = ldaps://ldap.example.com
ldap_search_base = dc=example,dc=com
ldap_schema = rfc2307bis
ldap_default_bind_dn = cn=binduser,dc=example,dc=com
ldap_default_authtok_type = password
ldap_default_authtok = binduserpassword
enumerate = false
cache_credentials = true
Ensure that /etc/sssd/sssd.conf
has the correct permissions and ownership:
# Set ownership to root:root
chown root:root /etc/sssd/sssd.conf
# Set permissions to 600
chmod 600 /etc/sssd/sssd.conf
After making changes to the configuration, restart the SSSD service:
# On systemd-based systems
systemctl restart sssd
# On SysVinit systems
service sssd restart
Ensure that SSSD is properly integrated with PAM and NSS.
Edit /etc/nsswitch.conf
and add sss
to the passwd
, shadow
, and group
entries:
passwd: files sss
shadow: files sss
group: files sss
Ensure that PAM is configured to use SSSD, typically by including pam_sss.so
in the PAM stack. This can often be done by installing the appropriate PAM configuration files provided by SSSD.
sssd.conf
and verify permissions.getent
to check if the user is visible to the system.sss_cache -E
./var/log/sssd/
for troubleshooting.