When I run ./samba-check-db-repl.sh script I am getting the following: root at dc01:~# ./samba-check-db-repl.sh Failed to bind - LDAP error 49 LDAP_INVALID_CREDENTIALS - <SASL:[GSS-SPNEGO]: NT_STATUS_LOGON_FAILURE> <> Failed to connect to 'ldap://dc02.dtsh**m.dt.' 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 968, 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) ./samba-check-db-repl.sh: line 257: [: 0: unary operator expected What would the "unary operator expected" issue be? -- ------------------------- Bob Wooden of Donelson Trophy 615.885.2846 (main) www.donelsontrophy.com [1] "Everyone deserves an award!!" Links: ------ [1] http://www.donelsontrophy.com
Am 23.04.2015 um 15:47 schrieb Bob of Donelson Trophy:> When I run ./samba-check-db-repl.sh script I am getting the following: > > root at dc01:~# ./samba-check-db-repl.sh > Failed to bind - LDAP error 49 LDAP_INVALID_CREDENTIALS - > <SASL:[GSS-SPNEGO]: NT_STATUS_LOGON_FAILURE> <> > Failed to connect to 'ldap://dc02.dtsh**m.dt.' with backend 'ldap': > ./samba-check-db-repl.sh: line 257: [: 0: unary operator expected > > What would the "unary operator expected" issue be?the result of the previous "LDAP error 49 LDAP_INVALID_CREDENTIALS" and so undefenied behavior i guess -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20150423/98638c5b/attachment.pgp>
Hai Bob, ah.. LDAP_INVALID_CREDENTIALS, this is not a python error, but password error.. ;-) i upped a new version of samba-check-db-repl.sh ( direct link : https://secure.bazuin.nl/scripts/samba-check-db-repl.sh) small change in the install of the mail tools section. A bit info for this version. ## Version : 1.0.3 ## release d.d. : 22-04-2015 ## moved mailx part within checks if an e-mail adres is used. ## Samba database checker. ( DB check up to 10 samba DC's ) ## This script wil check for error in the samba databases with samba-tool ## NOTICE !! This script does only work with samba DC's ## A samba DC + Windows Dc wont work and is not tested, if you get that to work, ## please share the code ;-) The script wil find the DC with FSMO roles, and matches all other dc's with the one containing the FSMO roles. tested with samba 4.1.17 and 4.2.1 ( debian wheezy ) Gr. Louis>-----Oorspronkelijk bericht----- >Van: bob at donelsontrophy.net >[mailto:samba-bounces at lists.samba.org] Namens Bob of Donelson Trophy >Verzonden: donderdag 23 april 2015 15:48 >Aan: SAMBA MailList >Onderwerp: [Samba] samba-check-db-script python failure > > > >When I run ./samba-check-db-repl.sh script I am getting the following: > >root at dc01:~# ./samba-check-db-repl.sh >Failed to bind - LDAP error 49 LDAP_INVALID_CREDENTIALS - ><SASL:[GSS-SPNEGO]: NT_STATUS_LOGON_FAILURE> <> >Failed to connect to 'ldap://dc02.dtsh**m.dt.' 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 >968, 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) >./samba-check-db-repl.sh: line 257: [: 0: unary operator expected > >What would the "unary operator expected" issue be? > >-- > >------------------------- > >Bob Wooden of Donelson Trophy > >615.885.2846 (main) >www.donelsontrophy.com [1] > >"Everyone deserves an award!!" > > >Links: >------ >[1] http://www.donelsontrophy.com >-- >To unsubscribe from this list go to the following URL and read the >instructions: https://lists.samba.org/mailman/options/samba > >
I went and got the newest (upped recently) script. No love. I removed the email address line to get more command line output. root at dc01:~# ./samba-check-db-repl.sh Running with with console output Running : /usr/bin/samba-tool ldapcmp --filter='whenChanged' ldap://dc01 ldap://dc02.dtsh***m.dt. Please wait.. this can take a while.. Failed to bind - LDAP error 49 LDAP_INVALID_CREDENTIALS - <SASL:[GSS-SPNEGO]: NT_STATUS_LOGON_FAILURE> <> Failed to connect to 'ldap://dc02.dtsh***m.dt.' 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 968, 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) .. Next check.. Running : samba-tool drs showrepl ./samba-check-db-repl.sh: line 284: [: 0: unary operator expected ./samba-check-db-repl.sh: line 287: [: 0: unary operator expected Thoughts? --- ------------------------- Bob Wooden of Donelson Trophy 615.885.2846 (main) www.donelsontrophy.com [1] "Everyone deserves an award!!" On 2015-04-23 09:05, L.P.H. van Belle wrote:> Hai Bob, > > ah.. LDAP_INVALID_CREDENTIALS, this is not a python error, but password error.. ;-) > > i upped a new version of samba-check-db-repl.sh > ( direct link : https://secure.bazuin.nl/scripts/samba-check-db-repl.sh [3]) > small change in the install of the mail tools section. > > A bit info for this version. > ## Version : 1.0.3 > ## release d.d. : 22-04-2015 > ## moved mailx part within checks if an e-mail adres is used. > > ## Samba database checker. ( DB check up to 10 samba DC's ) > ## This script wil check for error in the samba databases with samba-tool > > ## NOTICE !! This script does only work with samba DC's > ## A samba DC + Windows Dc wont work and is not tested, if you get that to work, > ## please share the code ;-) > > The script wil find the DC with FSMO roles, and matches all other dc's with the one containing the FSMO roles. > tested with samba 4.1.17 and 4.2.1 ( debian wheezy ) > > Gr. > > Louis > >> -----Oorspronkelijk bericht----- Van: bob at donelsontrophy.net [mailto:samba-bounces at lists.samba.org] Namens Bob of Donelson Trophy Verzonden: donderdag 23 april 2015 15:48 Aan: SAMBA MailList Onderwerp: [Samba] samba-check-db-script python failure When I run ./samba-check-db-repl.sh script I am getting the following: root at dc01:~# ./samba-check-db-repl.sh Failed to bind - LDAP error 49 LDAP_INVALID_CREDENTIALS - <SASL:[GSS-SPNEGO]: NT_STATUS_LOGON_FAILURE> <> Failed to connect to 'ldap://dc02.dtsh**m.dt.' 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 968, 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) ./samba-check-db-repl.sh: line 257: [: 0: unary operator expected What would the "unary operator expected" issue be? -- ------------------------- Bob Wooden of Donelson Trophy 615.885.2846 (main) www.donelsontrophy.com [1] [1 [1]] "Everyone deserves an award!!" Links: ------ [1] http://www.donelsontrophy.com [1] -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba [2] Links: ------ [1] http://www.donelsontrophy.com [2] https://lists.samba.org/mailman/options/samba [3] https://secure.bazuin.nl/scripts/samba-check-db-repl.sh