[Samba] [PATCH] Re: samba-tool domain classicupgrade with LDAP backend

Juan Asensio Sánchez okelet at gmail.com
Fri Jan 4 04:53:48 MST 2013


Hi Andrew

Unfortunately, after applying the patch, recompile, uninstall and install
again, I am getting the same error:

# cd ~/samba-4.0.0
# patch -p1 <
~/0001-s4-libcli-resolv-Add-alias-hosts-for-host-in-name-re.patch
# make uninstall && rm -Rf /usr/local/samba/ && make clean && make && make
install
# samba-tool domain classicupgrade --dbdir ~/sambav3 --realm
SSCC.SACYL.TEST --use-xattrs=yes ~/sambav3/smb.conf -d9

...
init_sam_from_ldap: Entry found for user: XXXXXXX
init_sam_from_ldap: Entry found for user: XXXXXXX$
Next rid = 12801001
Failed to connect to ldap URL 'ldap://XXXXXX.XXXXX.es' - LDAP client
internal error: NT_STATUS_BAD_NETWORK_NAME
Failed to connect to 'ldap://XXXXXX.XXXXX.es' with backend 'ldap': (null)
Could not open ldb connection to ldap://XXXXXX.XXXXX.es, the error message
is: (1, None)
Exporting posix attributes
ERROR(<type 'exceptions.UnboundLocalError'>): uncaught exception - local
variable 'ldb_object' referenced before assignment
  File
"/usr/local/samba/lib/python2.6/site-packages/samba/netcmd/__init__.py",
line 175, in _run
    return self.run(*args, **kwargs)
  File
"/usr/local/samba/lib/python2.6/site-packages/samba/netcmd/domain.py", line
1318, in run
    useeadb=eadb, dns_backend=dns_backend, use_ntvfs=use_ntvfs)
  File "/usr/local/samba/lib/python2.6/site-packages/samba/upgrade.py",
line 800, in upgrade_from_samba3
    homes[username] = get_posix_attr_from_ldap_backend(logger, ldb_object,
base_dn, username, "homeDirectory")

Regards.



2013/1/4 Andrew Bartlett <abartlet at samba.org>

> On Fri, 2013-01-04 at 10:18 +0100, Juan Asensio Sánchez wrote:
> > Hi
> >
> >
> > 2013/1/4 Andrew Bartlett <abartlet at samba.org>
> >         On Fri, 2013-01-04 at 08:57 +0100, Juan Asensio Sánchez wrote:
> >         > Hi
> >         >
> >         >
> >
> >         > I forgot to explain my scenario... I have one Samba3
> >         test-production
> >         > with LDAP backend (it's a test server, but used
> >         intensively), so to
> >         > make the tests I created a new virtual machine in a
> >         separated/isolated
> >         > network. This is a clean CentOS 6.3 machine, just installed
> >         the
> >         > compile dependencies and then compile and install Samba; I
> >         didn't
> >         > modify resolv.conf, neither nscd.conf, so the name
> >         resolution is using
> >         > an "official" DNS server. After posting the message, I
> >         continued
> >         > investigating and I found this message
> >         >
> >
> https://lists.samba.org/archive/samba-technical/2012-September/086979.html,
> where the user reports the same problem than me. The solution there is to
> use the IP address instead of the DNS name, and he says that the problem
> can be due to his configuration, but I have the same problem... so I could
> think this is bug, not a server configuration problem I can connect
> perfectly to the LDAP server, use ldapsearch command, etc. Indeed, the
> script retrieves correctly the users, but only fails when exporting the
> Posix attributes).
> >
> >
> >         What is your 'name resolve order' parameter set to?
> >
> >
> >
> > name resolve order = wins lmhosts hosts bcast
>
> Thanks, that is the clue I needed.  The attached patch should help.
>
> Andrew Bartlett
>
> --
> Andrew Bartlett                                http://samba.org/~abartlet/
> Authentication Developer, Samba Team           http://samba.org
>
>


More information about the samba mailing list