Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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...

share|improve this question
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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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