nsswitch.conf file configuration, with which you can only request user information from a single server of any particular type (LDAP, NIS, etc.). With SSSD, you can create multiple domains of the same, or of different types of identity provider.
/var/lib/sss/db/ directory.
cache_DOMAINNAME.ldb.
kate in the ldap.example.com domain from the user kate in the ldap.myhome.com domain. You can use SSSD to make requests using fully-qualified usernames. If you request information for kate, you will receive the information from whichever domain is listed first in the look-up order. If you request information for kate@ldap.myhome.com, however, you will receive the correct user information.
# yum install sssd
config_file_version parameter during the startup procedure. If this value is correct, the installation continues,otherwise it aborts.
/etc/sssd/sssd.conf file to the new format, and copy the existing version to /etc/sssd/sssd.conf.bak.
upgrade_config.py [
-f INFILE
] [
-o OUTFILE
] [
-verbose
] [
--no-backup
]
-f INFILE — the configuration file to upgrade. If not specified, this defaults to /etc/sssd/sssd.conf
-o OUTFILE — the name of the upgraded configuration file. If not specified, this defaults to /etc/sssd/sssd.conf
-verbose — produce more verbose output during the upgrade process
--no-backup — do not produce a back-up file. If not specified, this defaults to INFILE.bak
service command or the /etc/init.d/sssd script to control SSSD. For example, run the following command to start sssd:
# service sssd start
chkconfig command to change this behavior. For example, run the following command to configure SSSD to start when the machine boots:
# chkconfig sssd on
/etc/sssd/sssd.conf file. This file consists of various sections, each of which contains a number of key/value pairs. Some keys accept multiple values; use commas to separate multiple values for such keys. This configuration file uses data types of string, integer and Boolean (with values of TRUE or FALSE). Comments are indicated by either a hash sign (#) or a semicolon (;) in the first column. The following example illustrates some of this syntax:
[section] # Keys with single values key1 = value key2 = val2 # Keys with multiple values key10 = val10,val11
-c (or --config) parameter on the command line to specify a different configuration file for SSSD.
nss_sss, so that you can configure your system to use SSSD to retrieve user information. Edit the /etc/nsswitch.conf file for your system to use the sss name database. For example:
passwd: files sss group: files sss
/etc/pam.d/system-auth file. Edit this file to reflect the following example, and then restart sssd:
#%PAM-1.0 # This file is auto-generated. # User changes will be destroyed the next time authconfig is run. auth required pam_env.so auth sufficient pam_unix.so nullok try_first_pass auth requisite pam_succeed_if.so uid >= 500 quiet auth sufficient pam_sss.so use_first_pass auth required pam_deny.so account required pam_unix.so broken_shadow account sufficient pam_localuser.so account sufficient pam_succeed_if.so uid < 500 quiet account [default=bad success=ok user_unknown=ignore] pam_sss.so account required pam_permit.so password requisite pam_cracklib.so try_first_pass retry=3 password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok password sufficient pam_sss.so use_authtok password required pam_deny.so session required pam_mkhomedir.so umask=0022 skel=/etc/skel/ session optional pam_keyinit.so revoke session required pam_limits.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session sufficient pam_sss.so session required pam_unix.so
Need to validate the following para.
authconfig to set up your PAM configuration to use SSSD. Select Use LDAP Authentication, and then replace pam_ldap.so with pam_sss.so in all files below /etc/pam.d or in the /etc/pam.conf file.
include statements in PAM configurations. For example:
... session include system-auth session optional pam_console.so ...
sufficient condition from system-auth returns PAM_SUCCESS, pam_console.so will not be executed.
[domain/<NAME>] sections of the /etc/sssd/sssd.conf file. To enable the Simple Access Provider, you need to set the access_provider parameter to simple, and then add usernames as a comma-separated list to either the simple_allow_users or simple_deny_users parameters.
[sssd] section, and only shows the Simple Access Provider-specific options.
[domain/example.com] access_provider = simple simple_allow_users = user1, user2
simple_allow_users is set, only users from this list are allowed access. This setting supersedes the simple_deny_users list (which would be redundant).
simple_allow_users list is empty, users are allowed access unless they appear in the simple_deny_users list.
simple_allow_users and simple_deny_users are defined.
[domain/<NAME>] sections of the /etc/sssd/sssd.conf file, and listed in order of preference. This list can contain any number of servers.
ldap_uri values:
ldap_uri = ldap://ldap0.mydomain.org, ldap://ldap1.mydomain.org, ldap://ldap2.mydomain.org
ldap://ldap0.mydomain.org functions as the primary server. If this server fails, the SSSD failover mechanism first attempts to connect to ldap1.mydomain.org, and if that is unavailable, it then attempts to connect to ldap2.mydomain.org. If the primary server is restored, the failover mechanism automatically restores operations to use that server instead of any failover servers.
ldap_uri parameters to specify your failover servers. The failover servers must be entered as a comma-separated list of values for a single ldap_uri parameter. If you enter multiple ldap_uri parameters, SSSD only recognizes the last entry.
priority and weight attributes of SRV records provide further opportunity for specifying which servers should be contacted first in the event that the primary server fails.
_service._protocol._domain TTL priority weight port hostname
service._protocol._domain, for example, _ldap._tcp._redhat.com. The client then sorts this list according to the priorities and weights, and connects to the first server in this sorted list.
[sssd] section also lists the services that are active and should be started when sssd starts within the services directive.
NSS — An NSS provider service that answers NSS requests from the nss_sss module.
PAM — A PAM provider service that manages a PAM conversation through the pam_sss PAM module.
monitor — A special service that monitors all other SSSD services, and starts or restarts them as needed. Its options are specified in the [sssd] section of the /etc/sssd/sssd.conf configuration file.
debug_level (integer)
[service/<NAME>] sections in the SSSD configuration file).
reconnection_retries (integer)
DNS lookup fails to return an IPv4 address for a hostname, SSSD attempts to look up an IPv6 address before returning a failure. Note that this only ensures that the async resolver identifies the correct address; there is currently a bug in the LDAP code that prevents SSSD from connecting to an LDAP server over IPv6. This is being investigated separately.
enum_cache_timeout (integer)
entry_cache_nowait_percentage (integer)
entry_cache_timeout value for the domain.
entry_cache_timeout value for each domain.
entry_negative_timeout (integer)
filter_users, filter_groups (string)
root.
filter_users_in_groups (Boolean)
TRUE.
Pluggable Authentication Module (PAM) service.
offline_credentials_expiration (integer)
0 (no limit).
[sssd] section. This example shows only the configuration of Kerberos authentication; it does not include any identity provider.
[domain/FOO] auth_provider = krb5 krb5_kdcip = 192.168.1.1 krb5_realm = EXAMPLE.COM
[domain/<NAME>] sections of the /etc/sssd/sssd.conf file, and then add the list of domains to the domains attribute of the [sssd] section, in the order you want them to be queried.
min_id,max_id (integer)
min_id is unspecified, it defaults to 1000 for any back end.
enumerate (Boolean)
FALSE. Set this value to TRUE to enable enumeration of users and groups of a domain.
timeout (integer)
10 seconds. Raising this timeout might prove useful for slower back ends, such as distant LDAP servers.
timeout = 0, SSSD reverts to the default value; you cannot force a timeout value of zero, because this would force the sssd daemon into a loop.
cache_credentials (Boolean)
FALSE. You should set this value to TRUE for domains other than local if you want to enable offline authentication.
id_provider (string)
NSS provider (for example, nss_nis).
id_provider to proxy, ensure that you also specify a value for proxy_lib_name. Refer to Section 15.1.5.1.2, “Proxy Configuration Options” for information on this attribute.
SSSD internal local provider.
LDAP provider.
entry_cache_timeout (integer)
use_fully_qualified_names (Boolean)
TRUE, all requests to this domain must use fully-qualified domain names. It also means that the output from the request displays the fully-qualified name.
ipauser01, and the use_fully_qualified_names attribute is set to TRUE:
# getent passwd ipauser01[no output]# getent passwd ipauser01@IPAipauser01@IPA:x:937315651:937315651:ipauser01:/home/ipauser01:/bin/sh
use_fully_qualified_names attribute is set to FALSE:
# getent passwd ipauser01ipauser01:x:937315651:937315651:ipauser01:/home/ipauser01:/bin/sh# getent passwd ipauser01@IPAipauser01:x:937315651:937315651:ipauser01:/home/ipauser01:/bin/sh
use_fully_qualified_names set to FALSE, you can continue to use the fully-qualified name in your requests, but only the simplified version is displayed in the output.
name@domain, not name@realm. You can, however, use the same name for both your domain and your realm.
auth_provider (string)
proxy_pam_target (string)
auth_provider option is set to proxy, and specifies the proxy target that PAM proxies to.
/etc/pam.d/ directory.
proxy_lib_name (string)
id_provider option is set to proxy, and specifies which existing NSS library to proxy identity requests through.
nis to use the existing libnss_nis.so file.
/etc/sssd/sssd.conf file.
TLS/SSL is required. If the LDAP server is used only as an identity provider, an encrypted channel is not needed.
/etc/sssd/sssd.conf file to reflect the following example:
# A native LDAP domain [domain/LDAP] enumerate = true cache_credentials = TRUE id_provider = ldap auth_provider = ldap ldap_schema = rfc2307 chpass_provider = ldap ldap_uri = ldap://ldap.mydomain.org ldap_user_search_base = dc=mydomain,dc=org tls_reqcert = demand ldap_tls_cacert = /etc/pki/tls/certs/ca-bundle.crt
ldap_schema attribute can be set to either rfc2307, which uses the memberuid attribute for group membership, or to rfc2307bis, which uses the member attribute. Changes to this setting only affect how SSSD determines the groups to which a user belongs; there is no negative effect on the actual user data. If you do not know the correct value for this attribute, consult your System Administrator.
/etc/sssd/sssd.conf file.
/etc/sssd/sssd.conf file to reflect the following example:
# A domain with identities provided by LDAP and authentication by Kerberos [domain/KRBDOMAIN] enumerate = false id_provider = ldap chpass_provider = krb5 ldap_uri = ldap://ldap.mydomain.org ldap_user_search_base = dc=mydomain,dc=org tls_reqcert = demand ldap_tls_cacert = /etc/pki/tls/certs/ca-bundle.crt auth_provider = krb5 krb5_kdcip = 192.168.1.1 krb5_realm = EXAMPLE.COM krb5_changepw_principle = kadmin/changepw krb5_ccachedir = /tmp krb5_ccname_template = FILE:%d/krb5cc_%U_XXXXXX krb5_auth_timeout = 15
# sss_useradd newUser01
sss_useradd manual page for information on all the options that apply to this command. Also refer to the sss_userdel and sss_usermod manual pages for information on how to delete and modify existing SSSD users.
NSS to use the SSS domain, you can use the following command to request user information:
# getent passwd newUser01@LOCAL
newUser01:x:508:508:newUser01:/home/newUser01:/bin/bash
# passwd newUser01
Changing password for user newUser01.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
# sss_groupadd newGroup01
sss_groupadd, sss_groupdel, and sss_groupmod manual pages for information on the options that apply to adding, deleting, and modifying SSSD groups.
NSS to use the local sss domain, you can use a simple # getent group command to request information for all groups. The following is an abbreviated display of the output of such a request:
# getent group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
.
.
.
testuser1:x:500:
testuser2:x:501:
testuser3:x:502:
getent command to view the existing groups and their members:
GroupA:*:511:UserA GroupB:*:512:UserB GroupC:*:516:UserC GroupD:*:517:UserD GroupE:*:518:UserE
sss_groupmod command to add GroupB to GroupA:
# sss_groupmod -a GroupA GroupB
GroupB to GroupA, as can be seen below:
GroupA:*:511:UserA,UserB GroupB:*:512:UserB GroupC:*:516:UserC GroupD:*:517:UserD GroupE:*:518:UserE
GroupA:*:511:UserA,UserB,UserC,UserD,UserE GroupB:*:512:UserB,UserC,UserD,UserE GroupC:*:516:UserC,UserD,UserE GroupD:*:517:UserD,UserE GroupE:*:518:UserE
GroupC from the previous example, the following group and user membership results:
GroupA:*:511:UserA,UserB GroupB:*:512:UserB GroupD:*:517:UserD,UserE GroupE:*:518:UserE
/var/log/sssd/ directory.
/etc/sssd/sssd.conf file), as well as an sssd_pam.log and an sssd_nss.log file. This level of granularity can help you to quickly isolate and resolve any errors or issues you might experience with SSSD.
/var/log/secure file, which logs authentication failures and the reason for the failure. For example, if you see Reason 4: System Error reported against any failure, you should increase the debug level of the log files.
debug_level option in the /etc/sssd/sssd.conf for the domain that is causing concern, and then restart SSSD. Refer to the sssd.conf(5) manual page for more information on how to set the debug_level for a specfic domain.
0 in the /etc/sssd/sssd.conf file:
--debug-timestamps=0
# sssd -d4
[sssd] [ldb] (3): server_sort:Unable to register control with rootdse! [sssd] [confdb_get_domains] (0): No domains configured, fatal error! [sssd] [get_monitor_config] (0): No domains configured.
/etc/sssd/sssd.conf file and ensure you have at least one properly configured domain, and then try to start SSSD.
# sssd -d4
[sssd] [ldb] (3): server_sort:Unable to register control with rootdse! [sssd] [get_monitor_config] (0): No services configured!
/etc/sssd/sssd.conf file and ensure you have at least one available service providers, and then try to start SSSD.
services entry in the /etc/sssd/sssd.conf file. If services are listed in multiple entries, only the last entry is recognized by SSSD.
NSS, their symptoms, and how to resolve them.
NSS fails to return user information
# service sssd status
sssd (pid 21762) is running...
[nss] section of the /etc/sssd/sssd.conf file. For example, ensure that you have not misconfigured the filter_users or filter_groups attributes. Refer to the NSS configuration options section of the sssd.conf(5) manual page for information on how to configure these attributes.
nss in the list of services that sssd should start
/etc/nsswitch.conf file. Refer to the section Section 15.1.3.2.1, “Configuring NSS” for information on how to correctly configure this file.
PAM, their symptoms, and how to resolve them.
[root@clientF11 tmp]# passwd user1000 Changing password for user user1000. New password: Retype new password: New Password: Reenter new Password: passwd: all authentication tokens updated successfully.
use_authtok option is correctly configured in your /etc/pam.d/system-auth file.
use_fully_qualified_domains attribute to TRUE in the /etc/sssd/sssd.conf file.
sssd.conf(5)
sssd-ipa(5)
sssd-krb5(5)
sssd-ldap(5)
sssd(8)
sssd_krb5_locator_plugin(8)
sss_groupadd(8)
sss_groupdel(8)
sss_groupmod(8)
sss_useradd(8)
sss_userdel(8)
sss_usermod(8)
pam_sss(8)
[sssd] config_file_version = 2 services = nss, pam domains = mybox.example.com, ldap.example.com, ipa.example.com, nis.example.com # sbus_timeout = 300 [nss] nss_filter_groups = root nss_filter_users = root nss_entry_cache_timeout = 30 nss_enum_cache_timeout = 30 [domain/mybox.example.com] domain_type = local enumerate = true min_id = 1000 # max_id = 2000 local_default_shell = /bin/bash local_default_homedir = /home # Possible overrides # id_provider = local # auth_provider = local # authz_provider = local # passwd_provider = local [domain/ldap.example.com] domain_type = ldap server = ldap.example.com, ldap3.example.com, 10.0.0.2 # ldap_uri = ldaps://ldap.example.com:9093 # ldap_use_tls = ssl ldap_user_search_base = ou=users,dc=ldap,dc=example,dc=com enumerate = false # Possible overrides # id_provider = ldap # id_server = ldap2.example.com # auth_provider = krb5 # auth_server = krb5.example.com # krb5_realm = KRB5.EXAMPLE.COM [domain/ipa.example.com] domain_type = ipa server = ipa.example.com, ipa2.example.com enumerate = false # Possible overrides # id_provider = ldap # id_server = ldap2.example.com # auth_provider = krb5 # auth_server = krb5.example.com # krb5_realm = KRB5.EXAMPLE.COM [domain/nis.example.com] id_provider = proxy proxy_lib = nis auth_provider = proxy proxy_auth_target = nis_pam_proxy