Find the answer to your Linux question:
Results 1 to 1 of 1
Hi guys i I want to sync unix password with samba passwords. I added those directives to my smb.conf in [global] section obey pam restriction = yes pam password change ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    12

    Samba password syncing


    Hi guys i I want to sync unix password with samba passwords.

    I added those directives to my smb.conf in [global] section

    obey pam restriction = yes
    pam password change = yes
    passwd program = /usr/bin/passwd
    unix password sync = yes
    I assume samba is configured with PAM.

    /usr/sbin/smbd -b | grep PAM

    HAVE_SECURITY_PAM_APPL_H
    HAVE_SECURITY_PAM_EXT_H
    HAVE_SECURITY_PAM_MODULES_H
    HAVE_SECURITY__PAM_MACROS_H
    HAVE_LIBPAM
    HAVE_PAM_GET_DATA
    HAVE_PAM_RADIO_TYPE
    HAVE_PAM_RHOST
    HAVE_PAM_TTY
    HAVE_PAM_VSYSLOG
    WITH_PAM
    WITH_PAM_MODULES
    WITH_PAM
    WITH_PAM_MODULES
    According to some tutorials in network (for older centos 4 and 5 versions, cant find for 6) i also added to /etc/pam.d/

    password required pam_smbpass.so nullok use_authtok try_first_pass

    Unfortunately i cannot make it working. When I add a new user and set his unix pass I still have to manually use smbpasswd to set a samba password for him. I use centos 6.4 installed as "Basic Server" Thanks in advance


    EDIT:


    Soo i must be stupid i think because i am still trying to solve this problem and still the synchronization doesnt work.

    I have made several changes accordig to this doc(password synchronization chapter): samba.org/samba/docs/using_samba/ch09.html and my [global] section in smb.conf looks like follows:


    [global]
    workgroup = WORKGROUP
    security = user
    map to guest = bad user
    encrypt passwords = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *New password* %n\n *new password* %n\n *success*
    debug level = 100
    passwd chat debug = yes
    when I run smbpasswd it doesn't even show the contents of passwd chat directive and it doesnt automatically change unix password for user. I tried to grep the log.smbd file but i couldnt find there any info about samba using /usr/bin/passwd program.
    Last edited by Krisinho; 06-29-2013 at 08:31 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •