I'm looking for a PHP script that helps users change their own Samba password on a server. Basically just an interface to smbpasswd. The user would ideally enter their samba username, current password and new password (twice). Upon form submission, the script would interface with smbpasswd and give them feedback as to whether or not it was a success or if they entered the wrong password or if their new passwords didn't match.

This kind of thing seems like an obvious thing that I was expecting to be out there, but I'm not finding much in my searches...

  • Are you using ldap for your account database? There seem to be several tools that are available if you are using an LDAP backend. – Zoredache Oct 14 '11 at 22:28
  • No LDAP. This is just a basic small business file server. – Jake Wilson Oct 14 '11 at 22:39

From the Samba homepage:


This is a web-based tool that allows users to change their unix,samba and squid
password using a web-based interface. Freely available here: 


I haven't tested this.

  • Tried this. Couldn't get it to compile properly. Anyways, why do you need to compile code just to make a PHP script... ? – Jake Wilson Oct 14 '11 at 22:41
  • I just looked at it, actually it's not a PHP script but a C program meant to run as a CGI executable. – Sven Oct 14 '11 at 22:55
  • Apparently, it's not even good C code judging from the compiler errors :( – Sven Oct 14 '11 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.