Change Samba password from Windows client

9,633

Without a domain you can't have a Microsoft Windows client use native windows methods to change passwords on other machines.

However, you could set up a simple web form on the server running samba that they can log in to, for changing their samba password, that just runs smbpasswd.

Share:
9,633
Forkbeard
Author by

Forkbeard

Updated on September 18, 2022

Comments

  • Forkbeard
    Forkbeard over 1 year

    I set up a Samba server on Ubuntu 12.04 in a network with five clients running Windows 7. We're not using a domain, just a workgroup. Everything is working fine.

    Is there a way users can change their Samba passwords from their Windows clients? Preferably not involving an ssh client but using a web-interface or even a native Windows method.

    Edit:

    Using Usermin for now. It works but it's a bit overkill, I'm curious if you know any more elegant solutions.

    Edit 2:

    Contents of /etc/samba/smb.conf global section:

    [global]
     workgroup = MYWORKGROUP
     server string = %h server (Samba, Ubuntu)
     dns proxy = no
     log file = /var/log/samba/log.%m
     max log size = 1000
     syslog = 0
     panic action = /usr/share/samba/panic-action %d
    
     security = user
     encrypt passwords = true
     passdb backend = tdbsam
     obey pam restrictions = yes
     unix password sync = yes
     passwd program = /usr/bin/passwd %u
     passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
     pam password change = yes
     map to guest = bad user
     guest account = smbguest
     usershare allow guests = yes
    
    • Mitch
      Mitch almost 11 years
      Can you add contents of smb.conf?
    • Forkbeard
      Forkbeard almost 11 years
      I could but is that relevant? The question goes just as well for the default Ubuntu 12.04 config, regardless of what I changed.
    • Mitch
      Mitch almost 11 years
      Does it have This in it?
    • Forkbeard
      Forkbeard almost 11 years
      It does. I added the global section to the question.
  • Forkbeard
    Forkbeard almost 11 years
    Ok, I'm guess then I'm looking for that simple web form you mention. I could write one myself but perhaps someone else has already made one that is safer than how I would do it.