[Samba] samba-tool python error
Douglas Bagnall
douglas.bagnall at catalyst.net.nz
Fri Jan 17 03:35:09 UTC 2020
On 17/01/20 5:53 AM, Pablo Sanz Fernández via samba wrote:
> Hi,
>
> We have some weird Python errors.
> [root at mercurio2 oper]# samba-tool user syncpasswords --cache-ldb-initialize --decrypt-samba-gpg --attributes=sAMAccountName,mail,virtualClearTextUTF8
> Connecting to 'ldapi:///usr/local/samba/private/ldap_priv/ldapi'
> ERROR(<type 'exceptions.AttributeError'>): uncaught exception - 'module' object has no attribute 'time'
> File "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/__init__.py", line 178, in _run
> return self.run(*args, **kwargs)
> File "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/user.py", line 2277, in run
> load_cache()
> File "/usr/local/samba/lib64/python2.6/site-packages/samba/netcmd/user.py", line 1939, in load_cache
> add_ldif += "currentTime: %s\n" % ldb.timestring(int(time.time()))
> [root at mercurio2 oper]#
That should not happen on any version of Python. The time module has had
the time() function forever.
If you see the traceback when you try:
$ python -c'import time; print time.time()'
you will know it is your python installation that is broken. If you
don't, then it remains a strange mystery between Samba and Python.
Douglas
More information about the samba
mailing list