Hi, I'm new to Samba so I apologize if this topic has been covered in the past. I want to sync my UNIX users from /etc/shadow to my Samba users in /etc/samba/smbpasswd How can I do this automatically? Thanks! Tim Mektrakarn Systems Engineer Loud Packet, Inc. 27455 Tierra Alta Way, Suite A Temecula, CA 92590 Mobile: 909.757.5129 Office: 714.263.9090 Fax: 714.263.9001 Email: tim@loudpacket.com Website: www.loudpacket.com *** http://www.VoIP-Forums.com *** *** http://www.SIP-Forums.com ***
Tim Mektrakarn schrieb:> Hi, > > I'm new to Samba so I apologize if this topic has been covered in the past. > > I want to sync my UNIX users from /etc/shadow to my Samba users in > /etc/samba/smbpasswd > > How can I do this automatically? > > Thanks! > > Tim Mektrakarn > Systems Engineer > Loud Packet, Inc. > 27455 Tierra Alta Way, Suite A > Temecula, CA 92590 > Mobile: 909.757.5129 > Office: 714.263.9090 > Fax: 714.263.9001 > Email: tim@loudpacket.com > Website: www.loudpacket.com > > *** http://www.VoIP-Forums.com *** > *** http://www.SIP-Forums.com *** > > >use pam sync /etc/pam.d/login should have something like this #%PAM-1.0 # password-sync # # A sample PAM configuration that shows the use of pam_smbpass to make # sure private/smbpasswd is kept in sync when /etc/passwd (/etc/shadow) # is changed. Useful when an expired password might be changed by an # application (such as ssh). 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 ###################################################################################### Regards
Hi, you can use the pam_smbpass module for that. User's password will be written to the Samba password system when a user logs on. Unfortunately the stock pam_smbpass module will update the password only once (e.g. only when the Samba password is EMPTY). I modified the pam_smbpass module to always update the Samba password, ask me if you need this feature. (NCP is the password source here and I need to keep the Samba password in-sync with it). Schlomo On Mon, 19 Apr 2004, Tim Mektrakarn wrote:> Hi, > > I'm new to Samba so I apologize if this topic has been covered in the past. > > I want to sync my UNIX users from /etc/shadow to my Samba users in > /etc/samba/smbpasswd > > How can I do this automatically? > > Thanks! > > Tim Mektrakarn > Systems Engineer > Loud Packet, Inc. > 27455 Tierra Alta Way, Suite A > Temecula, CA 92590 > Mobile: 909.757.5129 > Office: 714.263.9090 > Fax: 714.263.9001 > Email: tim@loudpacket.com > Website: www.loudpacket.com > > *** http://www.VoIP-Forums.com *** > *** http://www.SIP-Forums.com *** > > > >-- Regards, Schlomo
>Hi, > >I'm new to Samba so I apologize if this topic has been covered in the past. > >I want to sync my UNIX users from /etc/shadow to my Samba users in >/etc/samba/smbpasswd > >How can I do this automatically?The basic answer is to use the 'unix password sync' option. See the man page for smb.conf(5). Two further bits of info. Make sure that your 'passwd chat' consumes all of the output of your 'passwd program', otherwise the whole thing will just hang. Also, if you're not using the system password file (/etc/passwd) for holding the NIS passwords then you may need a slightly more clever version that allows you to reset the NIS password. See my webpage on this subject:- http://www.nibsc.ac.uk/~dmccann/smb/ (There is another approach to this, if you can recompile the normal 'passwd' binary to use a path other than '/etc/passwd') Mac Assistant Systems Adminstrator @nibsc.ac.uk dmccann@nibsc.ac.uk Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime)