<div class="gmail_quote">2009/4/24 Rich Megginson <span dir="ltr"><<a href="mailto:rmeggins@redhat.com">rmeggins@redhat.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
tamarin p wrote:<br>

Can you post your slapd-test2.inf?  Be sure to obscure any sensitive info first.</blockquote><div><br>Here it is. It is mostly a copy of the example 6.2 in the installation doc for silent installs.<br><br># slapd-test2.inf for installation on <a href="http://ldap2.test.com">ldap2.test.com</a><br>
# config directory on <a href="http://ldap1.test.com">ldap1.test.com</a><br>[General]<br>AdminDomain = <a href="http://test.com">test.com</a><br>SuiteSpotGroup = nobody<br>ConfigDirectoryLdapURL = ldap://<a href="http://ldap1.test.com:4000/o=NetscapeRoot">ldap1.test.com:4000/o=NetscapeRoot</a><br>
ConfigDirectoryAdminID = admin<br>ConfigDirectoryAdminPwd = pwd<br>SuiteSpotUserID = nobody<br><br>[slapd]<br>InstallLdifFile = suggest<br>ServerIdentifier = test2<br>ServerPort = 4002<br>AddOrgEntries = No<br>RootDN = cn=Directory Manager<br>
RootDNPwd = pwd<br>Suffix = dc=test,dc=com<br>UseExistingMC = Yes<br>UseExistingUG= No<br>AddSampleEntries = No<br><br>[admin]<br>ServerAdminID = admin<br>ServerAdminPwd = pwd<br>ServerIpAddress = 0.0.0.0<br>Port = 9830<br>
<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

If I add FullMachineName directive to the inf then this is added instead of empty string, but according to the docs <a href="http://www.redhat.com/docs/manuals/dir-server/install/8.0/Installation_Guide-Advanced_Configuration-Silent.html" target="_blank">http://www.redhat.com/docs/manuals/dir-server/install/8.0/Installation_Guide-Advanced_Configuration-Silent.html</a> this should be the hostname of the machine you're installing ON. Additionally this still leaves me with the wrong port, ie ldap://<a href="http://ldap01.test.com:4002" target="_blank">ldap01.test.com:4002</a> <<a href="http://ldap01.test.com:4002" target="_blank">http://ldap01.test.com:4002</a>> (it uses the FullMachineName but local port for the instance being created). But on the second run it is always corrected. So the workaround I have found is to just make sure adm.conf exists already. Then it always works, even when the file is blank.<br>

</blockquote>
Ok.  Looks like the auto hostname thing is not working.  We use perl Net::Domain hostfqdn if FullMachineName is absent - it uses some complicated formula involving sys::hostname, /etc/resolv.conf, etc.  I'm not sure why it would fail completely though.</blockquote>
<div><br>Could be I'm missing some lib, but on the other hand, it looks as if the ldapurl in adm.conf must point to the config directory so it wouldn't do any good if it did correctly set the hostname of the machine you install on (<a href="http://ldap2.test.com">ldap2.test.com</a> in my case), since the configdir is on another machine. The correct ldap url for config directory is always going to be ldap://<a href="http://ldap1.test.com:4000">ldap1.test.com:4000</a> and looks like the script should always just use the host:port from ConfigDirectoryLdapURL for ldapurl in adm.conf. Also, regardless if fullmachinename is set or not, when adm.conf already exists on running setup-ds-admin, the property is always set correctly to ldap://<a href="http://ldap1.test.com:4000">ldap1.test.com:4000</a> and the registration/unregistration works after.<br>
</div></div>