Merge lp:~ahasenack/serverguide/no-etc-hosts-tricks-for-dit-suffix-1239914 into lp:serverguide/trunk

Proposed by Andreas Hasenack
Status: Merged
Approved by: Doug Smythies
Approved revision: 323
Merged at revision: 321
Proposed branch: lp:~ahasenack/serverguide/no-etc-hosts-tricks-for-dit-suffix-1239914
Merge into: lp:serverguide/trunk
Diff against target: 43 lines (+14/-12)
1 file modified
serverguide/C/network-auth.xml (+14/-12)
To merge this branch: bzr merge lp:~ahasenack/serverguide/no-etc-hosts-tricks-for-dit-suffix-1239914
Reviewer Review Type Date Requested Status
Doug Smythies Approve
Review via email: mp+323807@code.launchpad.net

Commit message

Recommend dpkg-reconfigure instead of changes to /etc/hosts to modify the DIT suffix.

Description of the change

Recommend dpkg-reconfigure instead of changes to /etc/hosts to modify the DIT suffix.

It shouldn't be necessary to change your system's DNS information just to get a different DIT suffix in your ldap tree. I think that's dangerous and error prone, Imagine when SSL certs come into play. I believe the slapd package should ask the user about the DIT suffix, suggesting a default based on the current DNS domain, but since it doesn't currently, let's adapt the guide and tell the use how to use dpkg-reconfigure to obtain the same result.

The bug reporter ran into this issue because the guide, as it stands, misses a call to "sudo hostname <newname>" after changing /etc/hosts.

To post a comment you must log in.
Revision history for this message
Doug Smythies (dsmythies) wrote :

Looks good. Thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'serverguide/C/network-auth.xml'
2--- serverguide/C/network-auth.xml 2017-05-09 14:13:52 +0000
3+++ serverguide/C/network-auth.xml 2017-05-09 20:38:43 +0000
4@@ -148,18 +148,8 @@
5
6 <para>
7 The installation of slapd will create a working configuration. In particular, it will create a database instance that you
8- can use to store your data. However, the suffix (or base DN) of this instance will be determined from the domain name of the localhost.
9- If you want something different, edit <filename>/etc/hosts</filename> and replace the domain name with one that will give you the
10- suffix you desire. For instance, if you want a suffix of <emphasis>dc=example,dc=com</emphasis> then your file would have a line
11- similar to this:
12- </para>
13-
14-<programlisting>
15-127.0.1.1 hostname.example.com hostname
16-</programlisting>
17-
18- <para>
19- You can revert the change after package installation.
20+ can use to store your data. However, the suffix (or base DN) of this instance will be determined from the domain name of the host.
21+ If you want something different, you can change it right after the installation when you still don't have any useful data.
22 </para>
23
24 <note>
25@@ -177,6 +167,18 @@
26 </screen>
27
28 <para>
29+ If you want to change your DIT suffix, now would be a good time, because changing it discards your existing one. To change the suffix,
30+ run the following command:
31+ </para>
32+
33+<screen>
34+<command>sudo dpkg-reconfigure slapd</command>
35+</screen>
36+ <para>
37+ To switch your DIT suffix to <emphasis>dc=example,dc=com</emphasis>, for example, so you can follow this guide more closely,
38+ answer <emphasis>example.com</emphasis> when asked about the DNS domain name.
39+ </para>
40+ <para>
41 Since Ubuntu 8.10 slapd is designed to be configured within slapd itself by dedicating a separate DIT for that purpose. This allows one
42 to dynamically configure slapd without the need to restart the service. This configuration database consists of a collection of text-based
43 LDIF files located under <filename>/etc/ldap/slapd.d</filename>. This way of working is known by several names: the slapd-config method,

Subscribers

People subscribed via source and target branches