| 1 |
<samba:parameter name="sync machine password to keytab" |
| 2 |
context="G" |
| 3 |
type="cmdlist" |
| 4 |
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc"> |
| 5 |
<description> |
| 6 |
<para> |
| 7 |
This option allows you to describe what keytabs and how should be updated when |
| 8 |
machine account is changed via one of these commands |
| 9 |
|
| 10 |
<programlisting> |
| 11 |
wbinfo --change-secret |
| 12 |
rpcclient --machine-pass -c change_trust_pw |
| 13 |
net rpc changetrustpw |
| 14 |
net ads changetrustpw |
| 15 |
</programlisting> |
| 16 |
|
| 17 |
or by winbindd doing regular updates (see <smbconfoption name="machine password timeout"/>) |
| 18 |
</para> |
| 19 |
|
| 20 |
<para> |
| 21 |
The option takes a list of keytab strings to describe how to synchronize |
| 22 |
content of those keytabs or a single 'disabled' value to disable the |
| 23 |
synchronization. |
| 24 |
|
| 25 |
Each string has this form: |
| 26 |
<programlisting> |
| 27 |
absolute_path_to_keytab:spn_spec[:spn_spec]*[:sync_etypes][:sync_kvno][:netbios_aliases][:additional_dns_hostnames][:machine_password] |
| 28 |
</programlisting> |
| 29 |
|
| 30 |
spn_spec can be specified multiple times (separated using ':') and each spn_spec can have exactly one of these forms: |
| 31 |
<programlisting> |
| 32 |
account_name |
| 33 |
sync_account_name |
| 34 |
sync_upn |
| 35 |
sync_spns |
| 36 |
spn_prefixes=value1[,value2[...]] |
| 37 |
spns=value1[,value2[...]] |
| 38 |
</programlisting> |
| 39 |
</para> |
| 40 |
|
| 41 |
<para> |
| 42 |
Every keytab contains principals according the specification below: |
| 43 |
<programlisting> |
| 44 |
account_name - COMPUTER$@REALM |
| 45 |
sync_account_name - uses attribute "sAMAccountName" from AD |
| 46 |
sync_upn - uses attribute "userPrincipalName" (if exists in AD) |
| 47 |
sync_spns - uses attribute "servicePrincipalName" (if exists in AD) |
| 48 |
spn_prefixes - creates these two principals from each prefix. e.g.: |
| 49 |
prefix/<smbconfoption name="netbios name"/>@REALM |
| 50 |
prefix/<smbconfoption name="dns hostname"/>@REALM |
| 51 |
with :netbios_aliases for each netbiosalias in <smbconfoption name="netbios aliases"/> |
| 52 |
prefix/netbiosalias@REALM |
| 53 |
prefix/netbiosalias.dnsdomain@REALM |
| 54 |
with :additional_dns_hostnames for each additionaldnshostname in <smbconfoption name="additional dns hostnames"/> |
| 55 |
prefix/additionaldnshostname@REALM |
| 56 |
- 'host' principal should be created using specifier spn_prefixes |
| 57 |
spns - creates only the principals defined in the list |
| 58 |
</programlisting> |
| 59 |
'account_name' and 'sync_account_name' are the same, just the source differs (secrets.tdb vs. AD). |
| 60 |
</para> |
| 61 |
|
| 62 |
<para> |
| 63 |
Options: |
| 64 |
<programlisting> |
| 65 |
sync_etypes - attribute "msDS-SupportedEncryptionTypes" is read from AD and is used to find the highest common enc type for AD and KRB5 lib. |
| 66 |
sync_kvno - attribute "msDS-KeyVersionNumber" from AD is used to set KVNO. If this option is missing, KVNO is set to -1. |
| 67 |
netbios_aliases - evaluated only for spn_prefixes (see details above). |
| 68 |
additional_dns_hostnames - evaluated only for spn_prefixes (see details above). |
| 69 |
machine_password - mandatory, if missing the entry is ignored. For future use. |
| 70 |
</programlisting> |
| 71 |
</para> |
| 72 |
|
| 73 |
<para> |
| 74 |
Example: |
| 75 |
<programlisting> |
| 76 |
"/path/to/keytab0:account_name:machine_password", |
| 77 |
"/path/to/keytab1:account_name:sync_etypes:sync_kvno:machine_password", |
| 78 |
"/path/to/keytab2:sync_spns:machine_password", |
| 79 |
"/path/to/keytab3:sync_spns:sync_kvno:machine_password", |
| 80 |
"/path/to/keytab4:spn_prefixes=imap,smtp:machine_password", |
| 81 |
"/path/to/keytab5:spn_prefixes=imap,smtp:netbios_aliases:additional_dns_hostnames:sync_kvno:machine_password", |
| 82 |
"/path/to/keytab6:spns=wurst/brot@REALM:machine_password", |
| 83 |
"/path/to/keytab7:spns=wurst/brot@REALM,wurst2/brot@REALM:sync_kvno:machine_password", |
| 84 |
"/path/to/keytab8:sync_account_name:sync_upn:sync_spns:spn_prefixes=host,cifs,http:spns=wurst/brot@REALM:sync_kvno:machine_password" |
| 85 |
</programlisting> |
| 86 |
If sync_etypes or sync_kvno or sync_spns is present then winbind connects to DC. For "offline domain join" it might be useful not to use these options. |
| 87 |
</para> |
| 88 |
|
| 89 |
<para> |
| 90 |
If no value is present and <smbconfoption name="kerberos method"/> is different from |
| 91 |
'secrets only', the behavior differs between winbind and net utility: |
| 92 |
</para> |
| 93 |
<itemizedlist> |
| 94 |
<listitem> |
| 95 |
<para><userinput>winbind</userinput> uses value |
| 96 |
<programlisting>/path/to/keytab:host:account_name:sync_spns:sync_kvno:machine_password</programlisting> |
| 97 |
where the path to the keytab is obtained either from the krb5 library or from |
| 98 |
<smbconfoption name="dedicated keytab file"/>. |
| 99 |
</para> |
| 100 |
</listitem> |
| 101 |
<listitem> |
| 102 |
<para><userinput>net changesecretpw -f</userinput> command uses the default 'disabled' value.</para> |
| 103 |
</listitem> |
| 104 |
<listitem><para>No other <userinput>net</userinput> subcommands use the 'disabled' value.</para></listitem> |
| 105 |
</itemizedlist> |
| 106 |
|
| 107 |
<para> |
| 108 |
If a single value 'disabled' is present, the synchronization process is |
| 109 |
disabled. This is required for FreeIPA domain member setup where keytab |
| 110 |
synchronization uses a protocol not implemented by Samba. |
| 111 |
</para> |
| 112 |
|
| 113 |
<para> |
| 114 |
Suggested configuration is together with <smbconfoption name="kerberos method"/> set to the default value 'secrets only'. |
| 115 |
</para> |
| 116 |
|
| 117 |
<para> |
| 118 |
In clustered environments it is recommended to set <smbconfoption name="sync machine password script"/> to update the machine password on all nodes. |
| 119 |
</para> |
| 120 |
</description> |
| 121 |
</samba:parameter> |