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
=== modified file 'serverguide/C/network-auth.xml'
--- serverguide/C/network-auth.xml 2017-05-09 14:13:52 +0000
+++ serverguide/C/network-auth.xml 2017-05-09 20:38:43 +0000
@@ -148,18 +148,8 @@
148148
149 <para>149 <para>
150 The installation of slapd will create a working configuration. In particular, it will create a database instance that you150 The installation of slapd will create a working configuration. In particular, it will create a database instance that you
151 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.151 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.
152 If you want something different, edit <filename>/etc/hosts</filename> and replace the domain name with one that will give you the152 If you want something different, you can change it right after the installation when you still don't have any useful data.
153 suffix you desire. For instance, if you want a suffix of <emphasis>dc=example,dc=com</emphasis> then your file would have a line
154 similar to this:
155 </para>
156
157<programlisting>
158127.0.1.1 hostname.example.com hostname
159</programlisting>
160
161 <para>
162 You can revert the change after package installation.
163 </para>153 </para>
164154
165 <note>155 <note>
@@ -177,6 +167,18 @@
177</screen>167</screen>
178168
179 <para>169 <para>
170 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,
171 run the following command:
172 </para>
173
174<screen>
175<command>sudo dpkg-reconfigure slapd</command>
176</screen>
177 <para>
178 To switch your DIT suffix to <emphasis>dc=example,dc=com</emphasis>, for example, so you can follow this guide more closely,
179 answer <emphasis>example.com</emphasis> when asked about the DNS domain name.
180 </para>
181 <para>
180 Since Ubuntu 8.10 slapd is designed to be configured within slapd itself by dedicating a separate DIT for that purpose. This allows one182 Since Ubuntu 8.10 slapd is designed to be configured within slapd itself by dedicating a separate DIT for that purpose. This allows one
181 to dynamically configure slapd without the need to restart the service. This configuration database consists of a collection of text-based183 to dynamically configure slapd without the need to restart the service. This configuration database consists of a collection of text-based
182 LDIF files located under <filename>/etc/ldap/slapd.d</filename>. This way of working is known by several names: the slapd-config method,184 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