samba_dnsupdate problem

Rowland Penny repenny at f2s.com
Thu Sep 27 05:13:10 MDT 2012


Hello,
Whilst checking /usr/local/samba/var/log.samba I found these log entries 
(which occured multiple times):

[2012/09/26 19:32:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_spnupdate: ImportError: No module named samba
[2012/09/26 19:32:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_dnsupdate: Traceback (most recent call last):
[2012/09/26 19:32:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_dnsupdate:   File 
"/usr/local/samba/sbin/samba_dnsupdate", line 41, in <module>
[2012/09/26 19:32:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_dnsupdate:     import samba
[2012/09/26 19:32:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_dnsupdate: ImportError: No module named samba

After I did a bit of googling, I found a suggestion that adding the 
following line (to the samba_dnsupdate script) would cure it:

sys.path.insert(0, "/usr/local/samba/lib/python2.7/site-packages")

Well, it did & it didn't, I then started getting the following:

[2012/09/26 19:42:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_spnupdate: Traceback (most recent call last):
[2012/09/26 19:42:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_spnupdate:   File 
"/usr/local/samba/sbin/samba_spnupdate", line 37, in <module>
[2012/09/26 19:42:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_spnupdate:     import samba, ldb
[2012/09/26 19:42:09,  0] 
../lib/util/util_runcmd.c:334(samba_runcmd_io_handler)
   /usr/local/samba/sbin/samba_spnupdate: ImportError: No module named samba

So, as it was complaining about the same module, I added the line to the 
samba_spnupdate script, this seems to have cured the problem. Is there a 
better way of curing this problem? and why do the two scripts not find 
the samba module?

Rowland

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the samba-technical mailing list