[Samba] log level and samba-tool domain demote

Denis Cardon denis.cardon at tranquil-it-systems.fr
Thu Nov 5 15:01:26 UTC 2015

G'day all,

> After installing a bunch of new AD DC using the 4.3.1 version I decided to
> remove the old ones.
> On one DC I've set up log level as follow:
> log level = 1 auth:9 registry:7 winbind:7 passdb:7 sam:3 rpc_srv:2 rpc_cli:2
> First I'm not sure this is the right way to declare specific log levels but
> man smb.conf gives me:
> Example: log level = 3 passdb:5 auth:10 winbind:2
> So it sems, to me, my log level directive is correct.
> But once I tried to demote the DC with these specific log levels I get the
> following error:
> samba-tool domain demote --kerberos=yes
> Using m700.samba.domain.tld as partner server for the demotion
> ERROR(<type 'exceptions.ValueError'>): uncaught exception - invalid literal
> for int() with base 10: '1 auth:9 registry:7 winbind:7 passdb:7 sam:3
> rpc_srv:2 rpc_cli:2'
>    File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line
> 175, in _run
>      return self.run(*args, **kwargs)
>    File "/usr/lib64/python2.7/site-packages/samba/netcmd/domain.py", line
> 701, in run
>      (drsuapiBind, drsuapi_handle, supportedExtensions) =
> drsuapi_connect(server, lp, creds)
>    File "/usr/lib64/python2.7/site-packages/samba/drs_utils.py", line 47, in
> drsuapi_connect
>      if int(lp.get("log level")) >= 5:

I just had the same question from a client this morning. There is an 
issue for this : https://bugzilla.samba.org/show_bug.cgi?id=9945

As a workaround, you override debug level on command line:
  samba-tool domain demote -d0



> Is it a small bug or should I go to some optician to get some glasses?
> Anyway it is not a real issue: that's the first time Samba is complaining
> against my log level declaration and this server was about to be removed. I
> removed the log level line and re-run the demote successfully.
> Cheers,
> mathias

Denis Cardon
Tranquil IT Systems
Les Espaces Jules Verne, bâtiment A
12 avenue Jules Verne
44230 Saint SĂ©bastien sur Loire
tel : +33 (0)

More information about the samba mailing list