Remote password change function in libsmbclient

Eduardo Kienetz eduardo at
Tue Mar 8 16:09:39 MST 2011

Guys, I have this libsmbclient-php
(, and I want to add
support for password changes (initially remote passwords, because
that's what I need right now). Since libsmbclient does not offer any
password change function (as far as I've looked at libsmbclient.h), I
looked around and found that I should use remote_password_change()
from source3/libsmb/passchange.c (which is ultimately what smbpasswd
I have changed libsmbclient.syms to have remote_password_change (as a
proof of concept, I'll put it in awk script after I'm done testing),
added it to libsmbclient.h and it gets compiled. Yet I wanted to make
sure what return type NTSTATUS is, since all other libsmbclient.h
functions have clear return types (to me, as I'm not a really
experienced C developer). Naturally I'm gonna need the return type to
handle errors properly, etc.
So far I've seen source3/include/module.h with: typedef NTSTATUS
(init_module_function) (void);
What does that do / how does it work?

Thank you in advance,

Eduardo Kienetz

More information about the samba-technical mailing list