samba_dnsupdate and samba_spnupdate scripts fail

Anatoliy Atanasov anatoliy.atanasov at postpath.com
Fri Nov 19 15:06:23 MST 2010


Hi Jelmer, Tridge,

The scripts for samba_dnsupdate and samba_spnupdate fail with this error, when i run samba with sudo:
sudo bin/samba -i -M single -d3

Calling DNS name update script
Calling SPN name update script
/home/ant/bin/rwdc/sbin/samba_dnsupdate: Traceback (most recent call last):
/home/ant/bin/rwdc/sbin/samba_dnsupdate:   File "/home/ant/bin/rwdc/sbin/samba_dnsupdate", line 40, in <module>
/home/ant/bin/rwdc/sbin/samba_dnsupdate:     import samba
/home/ant/bin/rwdc/sbin/samba_dnsupdate: ImportError: No module named samba
Child /home/ant/bin/rwdc/sbin/samba_dnsupdate exited with status 1 - Operation not permitted
../dsdb/dns/dns_update.c:250: Failed DNS update - NT_STATUS_ACCESS_DENIED
/home/ant/bin/rwdc/sbin/samba_spnupdate: Traceback (most recent call last):
/home/ant/bin/rwdc/sbin/samba_spnupdate:   File "/home/ant/bin/rwdc/sbin/samba_spnupdate", line 36, in <module>
/home/ant/bin/rwdc/sbin/samba_spnupdate:     import samba, ldb
/home/ant/bin/rwdc/sbin/samba_spnupdate: ImportError: No module named samba
Child /home/ant/bin/rwdc/sbin/samba_spnupdate exited with status 1 - Operation not permitted
../dsdb/dns/dns_update.c:279: Failed SPN update - NT_STATUS_ACCESS_DENIED

I deleted everything from the installed prefix, did make install and samba-tool vampire after that.
My python path is: PYTHONPATH=:/home/ant/bin/rwdc/lib/python2.6/site-packages/
But for a root user the PYTHONPATH is not set. I installed samba with sudo and with root user the result was the same. When i added the PYTHONPATH to the environment the error was resolved. Where is the place to do that in the code? 

Regards, Anatoliy


More information about the samba-technical mailing list