Click to See Complete Forum and Search --> : Samba passwords
KarrottoP
11-04-2005, 10:24 AM
I am tyring to give my users the ability to change their own samba passwords. I can't seem to get the sync between windows and samba to let me change the password, and there is no chance of teaching everyone in my office how to ssh into the server and change it manually. I have recently set up usermin for my users and unfortunately I have not run across a module for usermin that will allow my users to change the smbpasswd from there. What would work is if I could convince the passwords in smbpasswd to match the passwords that are used by linux, especially since then the login and email password would be assured to be in sync with each other. I have set Unix Password Sync to Yes in smb.config but I am guessing that does not help me with the problem, especially because it didn't help me with the problem.
Any ideas or suggestions for this would be greatly appreciated.
Thanks,
Jason
Icarus
11-04-2005, 02:36 PM
You could unsync the unix and samba passwords if they do not login to unix. I've had lots of trouble getting them to sync also and forgetting about the unix password was the easiest way around it...
You could try adding this to the the smb.conf
unix password sync = true
passwd program = /usr/bin/passwd %u
passwd chat = \
*password* %n\n \
*password* %n\n \
*successful*
smb passwd file = /etc/samba/smbpasswd
passwd chat debug = Yes
KarrottoP
11-04-2005, 06:33 PM
I found some information in the samba how-to at samba.org about achieving this, I actually found what arguments to put in for the samba pam module and that did the trick, so now all of my users can change their passwords on there own. Usermin is going to make my life about 10x easier.
Thanks for the tip though.
Icarus
11-04-2005, 06:54 PM
Mind posting those changes? I'm sure many others would appreciate it so they don't have to dig for them
dkeav
11-04-2005, 07:44 PM
yea, so the next time it comes up and can say "search the forums" in confidence ;)
KarrottoP
11-04-2005, 08:51 PM
I edited /etc/pam.d/samba to reflect the following:
#%PAM-1.0
# password-sync
#
auth requisite pam_nologin.so
auth required pam_unix.so
account required pam_unix.so
password requisite pam_cracklib.so retry=3
password requisite pam_unix.so shadow md5 use_authtok try_first_pass
password required pam_smbpass.so nullok use_authtok try_first_pass
session required pam_unix.so
Samba's webpage has a great how-to I just sometimes don't know exactly what I am looking for until I learn a bit more about what it is I am trying to acomplish.