My big fingers have gotten me into trouble (all be it minor, I think.) I have had a single DC and member server working for a few weeks and decided to move forward setup the second DC. When I set the hostname I inadvertently added an addition letter into the name. Unfortunately I discovered this after I had run "samba-check-db-repl.sh" which follows the script "3-setup-sysvol-bidirectional.sh". I have corrected the hostname issue and corrected the realm name within /etc/krb5.conf. Now, when I run "samba-check-db-repl.sh" I am getting the following: Failed to connect to ldap URL 'ldap://3(NXDOMAIN)' - LDAP client internal error: NT_STATUS_OBJECT_NAME_NOT_FOUND Failed to connect to 'ldap://3(NXDOMAIN)' with backend 'ldap': (null) ERROR(ldb): uncaught exception - None File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 175, in _run return self.run(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/samba/netcmd/ldapcmp.py", line 932, in run outf=self.outf, errf=self.errf) File "/usr/lib/python2.7/dist-packages/samba/netcmd/ldapcmp.py", line 64, in __init__ options=ldb_options) File "/usr/lib/python2.7/dist-packages/samba/__init__.py", line 114, in __init__ self.connect(url, flags, options) There has to be a reference in ldap for the 'bad' hostname? I am not sure how to correct it. -- ------------------------- Bob Wooden of Donelson Trophy 615.885.2846 (main) www.donelsontrophy.com [1] "Everyone deserves an award!!" Links: ------ [1] http://www.donelsontrophy.com
On Mon, 20 Apr 2015, Bob of Donelson Trophy wrote:> > I have corrected the hostname issue and corrected the realm name within > /etc/krb5.conf. > > Now, when I run "samba-check-db-repl.sh" I am getting the following: > > Failed to connect to ldap URL 'ldap://3(NXDOMAIN)' - LDAP client > internal error: NT_STATUS_OBJECT_NAME_NOT_FOUND[...]> There has to be a reference in ldap for the 'bad' hostname? I am not > sure how to correct it.To me it looks more like it's unable to connect to ldap at all. Make sure /etc/hosts is correct, and the name your smb.conf is correct. You can edit Samba's LDAP database directly with ldbedit. Just a warning, you can also completely break your domain with it. ldbedit --url=/var/lib/samba/private/sam.ldb (adjust path as necessary) Do a search and replace from the old name to the new name, then save and exit. Sometimes you will also need to edit some of the files in /var/lib/samba/private/sam.ldb.d/ which will have names including your realm, so I can't tell you exactly what they will be. You may want to edit them all and do the same search and replace.
Thanks for your help. I got it fixed. --- ------------------------- Bob Wooden of Donelson Trophy 615.885.2846 (main) www.donelsontrophy.com [1] "Everyone deserves an award!!" On 2015-04-20 08:57, Sketch wrote:> On Mon, 20 Apr 2015, Bob of Donelson Trophy wrote: > >> I have corrected the hostname issue and corrected the realm name within /etc/krb5.conf. Now, when I run "samba-check-db-repl.sh" I am getting the following: Failed to connect to ldap URL 'ldap://3(NXDOMAIN)' - LDAP client internal error: NT_STATUS_OBJECT_NAME_NOT_FOUND > > [...] > >> There has to be a reference in ldap for the 'bad' hostname? I am not sure how to correct it. > > To me it looks more like it's unable to connect to ldap at all. Make sure /etc/hosts is correct, and the name your smb.conf is correct. > > You can edit Samba's LDAP database directly with ldbedit. Just a warning, you can also completely break your domain with it. > > ldbedit --url=/var/lib/samba/private/sam.ldb (adjust path as necessary) > > Do a search and replace from the old name to the new name, then save and exit. Sometimes you will also need to edit some of the files in /var/lib/samba/private/sam.ldb.d/ which will have names including your realm, so I can't tell you exactly what they will be. You may want to edit them all and do the same search and replace.Links: ------ [1] http://www.donelsontrophy.com