Debian Codegraph @

src/man/authselect-migration.7.adoc

raw
1 authselect-migration(7)
2 =======================
3 :revdate: 2021-06-05
4
5 NAME
6 ----
7 authselect-migration - A guide how to migrate from authconfig to authselect.
8
9 DESCRIPTION
10 -----------
11 This manual page explains the main differences between authconfig, the previous
12 tool to configure system authentication and identity sources, and authselect
13 which replaces it. It also explains what actions need to be done in order to
14 migrate from authconfig to authselect.
15
16 MAIN DIFFERENCES
17 ----------------
18 Authselect takes a completely different approach to system configuration than
19 the previous tool authconfig.
20
21 Authconfig tries its best to keep user's manual changes to the files it
22 generates. It generates not only PAM configuration files and nsswitch.conf
23 (to setup authentication modules and identity sources) but it also generates
24 simple configuration files for several services such as LDAP and Kerberos.
25
26 Authselect does no such things. It does not generate any configuration files
27 besides PAM and nsswitch.conf and it strictly prohibits any manual changes to
28 generated configuration. It provides a set of files called profiles. Each profile
29 describes how the resulting configuration should look like and it can be
30 slightly modified by enabling or disabling certain optional features. If a need
31 arises for a different profile than what authselect ships, the administrator has
32 an option to create a whole new profile and use it with authselect.
33 See authselect-profiles(5) to learn more about profiles.
34
35 This may seem like a big disadvantage but the truth is the
36 opposite. Authconfig is a very old tool and the applications providing
37 required services have changed rapidly over the years. Typically, there is no
38 longer a need to have multiple authentication modules in PAM and nsswitch.conf,
39 because the vast majority of use-cases is covered by SSSD. Therefore there
40 is no need to add or remove them specifically. There are also better tools
41 to generate configuration for system daemons that can help you automate
42 the process of joining to a remote domain such as `realm`. In addition,
43 the shipped profiles give us comprehensive and deterministic system
44 configuration that can be fully tested and is much less error prone. It
45 is also much easier to distribute such configuration across many systems.
46
47 Probably the most controversial change is that authselect only ships profiles
48 for sssd and winbind providers. Those two providers cover all modern use cases
49 from providing local users and legacy LDAP domain to complex configurations
50 with IPA or Active Directory servers. The profiles no longer contain support
51 for nss-pam-ldapd and users are encouraged to switch to sssd.
52
53 JOINING REMOTE DOMAINS
54 ----------------------
55 You can use either `ipa-client-install` or `realm` to join an IPA domain
56 and `realm` to join an Active Directory domain. These tools will make sure
57 that the correct authselect profile is selected and all daemons and services
58 are properly configured.
59
60 CONVERTING YOUR SCRIPTS
61 -----------------------
62 If you use `ipa-client-install` or `realm` to join a domain, you can just
63 remove any authconfig call in your scripts. If this is not an option, you
64 need to replace each authconfig call with its equivalent authselect call
65 to select a correct profile with desired features. Then you also need to write
66 configuration file for required services.
67
68 .Relation of authconfig options to authselect profiles
69 |=========================================================
70 |*Authconfig options* |*Authselect profile*
71 |--enableldap --enableldapauth |sssd
72 |--enablesssd --enablesssdauth |sssd
73 |--enablekrb5 |sssd
74 |--enablewinbind --enablewinbindauth |winbind
75 |--enablenis |_none_
76 |=========================================================
77
78 .Relation of authconfig options to authselect profile features
79 |==================================================
80 |*Authconfig options* |*Authselect profile feature*
81 |--enablesmartcard |with-smartcard
82 |--enablefingerprint |with-fingerprint
83 |--enableecryptfs |with-ecryptfs
84 |--enablemkhomedir |with-mkhomedir
85 |--enablefaillock |with-faillock
86 |--enablepamaccess |with-pamaccess
87 |--enablewinbindkrb5 |with-krb5
88 |--enableshadow |_none_
89 |--passalgo |_none_
90 |==================================================
91
92 NOTE: Authconfig options `--enableshadow` and `--passalgo=sha512` were often
93 used to make sure that passwords are stored in `/etc/shadow` using `sha512`
94 algorithm. *The authselect profiles now use the yescrypt hashing method* and
95 it cannot be changed through an option (only by creating a custom profile).
96 You can just omit these options.
97
98 .Examples
99 ----
100 authconfig --enableldap --enableldapauth --enablefaillock --updateall
101 authselect select sssd with-faillock
102
103 authconfig --enablesssd --enablesssdauth --enablesmartcard --smartcardmodule=sssd --updateall
104 authselect select sssd with-smartcard
105
106 authconfig --enableecryptfs --enablepamaccess --updateall
107 authselect select sssd with-ecryptfs with-pamaccess
108
109 authconfig --enablewinbind --enablewinbindauth --winbindjoin=Administrator --updateall
110 realm join -U Administrator --client-software=winbind WINBINDDOMAIN
111 ----
112
113 CONFIGURATION FILES
114 -------------------
115 This section contains snippets for minimal configuration of various services.
116
117 LDAP
118 ~~~~
119 Even if LDAP is not directly used through `pam_ldap` and `nss_ldap`, it
120 is still useful to configure ldap.conf to configure openldap-libs and
121 indirectly, e.g. LDAP tools such as `ldapsearch`.
122
123 .{sysconfdir}/openldap/ldap.conf
124 ----
125 # Set the default base dn
126 BASE dc=example,dc=com
127
128 # Set the default LDAP server
129 URI ldap://ldap.example.com ldap://ldap-master.example.com:666
130 ----
131
132 KERBEROS
133 ~~~~~~~~
134 If you use Kerberos, the default Kerberos realm should be configured in order
135 for krb5-libs and therefore tools such as `kinit` to work out of the box.
136
137 .{sysconfdir}/krb5.conf
138 ----
139 [libdefaults]
140 default_realm = MYREALM
141
142 [realms]
143 MYREALM = {
144 kdc = kdc.myrealm.org
145 }
146
147 [domain_realm]
148 myrealm.org = MYREALM
149 .myrealm.org = MYREALM
150 ----
151
152 SSSD
153 ~~~~
154 Authselect encourages users to use SSSD wherever possible. There are many
155 configuration options, see sssd.conf(5). This is a minimal configuration
156 that creates one LDAP domain called `default`. The LDAP server is
157 auto-discovered through DNS lookups.
158
159 .{sysconfdir}/sssd/sssd.conf
160 ----
161 [sssd]
162 config_file_version = 2
163 domains = default
164
165 [domain/default]
166 id_provider = ldap
167 ldap_uri = _srv_
168 dns_discovery_domain = myrealm
169 ----
170
171 And here is a configuration snippet for the same domain but now the
172 authentication is done over Kerberos. The KDC server is auto-discovered through
173 DNS lookups.
174
175 .{sysconfdir}/sssd/sssd.conf
176 ----
177 [sssd]
178 config_file_version = 2
179 domains = default
180
181 [domain/default]
182 id_provider = ldap
183 auth_provider = krb5
184 ldap_uri = _srv_
185 krb5_server = _srv_
186 krb5_realm = MYREALM
187 dns_discovery_domain = myrealm
188 ----
189
190 If you want to configure SSSD for an IPA or Active Directory domain, use the
191 `realm` tool. This will perform an initial setup which involves creating
192 a Kerberos keytab and generating basic SSSD configuration. You can then
193 tune it up by modifying {sysconfdir}/sssd/sssd.conf.
194
195 WINBIND
196 ~~~~~~~
197 If you want to configure the machine to use Winbind, use `realm`. This
198 will perform an initial setup which involves creating a Kerberos keytab and
199 running `adcli` to join the domain. It also makes changes to `smb.conf`. You
200 can then tune it up by modifying {sysconfdir}/samba/smb.conf.
201
202 PASSWORD QUALITY
203 ~~~~~~~~~~~~~~~~
204 Authselect enables `pam_pwquality` module to enforce password quality
205 restrictions. This module is enabled only for local users. Remote users
206 should use the password policy that is enforced by the respective remote
207 server.
208
209 The `pam_pwquality` module can be configured in
210 {sysconfdir}/security/pwquality.conf. See pam_pwquality(8) to see its
211 configuration options and defaults.
212
213 STARTING SERVICES
214 -----------------
215 Depending on your configuration, you need to start required services manually
216 with systemd.
217
218 * SSSD
219
220 systemctl enable sssd.service ; systemctl start sssd.service
221
222 * Winbind
223
224 systemctl enable winbind.service ; systemctl start winbind.service
225
226 * If mkhomedir feature is enabled
227
228 systemctl enable oddjobd.service ; systemctl start oddjobd.service
229
230 AUTHCONFIG TOOLS
231 ----------------
232 Authconfig shipped a tool called _cacertdir_rehash_. If you depend on this tool,
233 please switch to native _openssl_ command: *openssl rehash <directory>* that
234 serves the same purpose.
235
236 SEE ALSO
237 --------
238 authselect(8), authselect-profiles(5), realm(8), ipa-client-install(1),
239 sssd.conf(5), smb.conf(5), ldap.conf(5), krb5.conf(5)