[Samba] How to change samba password through libsmbclient.so?

Matthias Nagel mh-nagel at web.de
Wed Sep 24 20:31:04 GMT 2008


Hello,

I am writing a C/C++ program that needs to modify a user's samba password. The program runs as root and on the same computer as samba. I found the "local_password_change" function in libsmbclient.so, that seems to do what I need, but I always get a linking error, although I link against libsmbclient.so. It seems as "local_password_change" is not exported or has only local visibility. Does anybody have experiences with this function or does anybody know if this is the correct funtion at all?

As a work-around my programs forks and executes "smbpasswd" at the moment. But I do not like the idea.

Matthias


More information about the samba mailing list