[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

autocreation of home directory for samba/winbind users


I have installed SAMBA/WINBIND and succefully joined a W2k domain and I would Like to autocreate UNIX users when a new user is created on the W2K PDC.

I have put the fallowing lines on smb.conf :

passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
add user script = /usr/sbin/useradd %U -d /home/%u -m -s /bin/false
delete user script = /usr/sbin/userdel -r %U
unix password sync = yes

I have found a website that tell I must also add the line :

obey pam restrictions = yes

This website tell me to edit /etc/pam.d/login to add this lines :

auth sufficient pam_winbind.so
account sufficient pam_winbind.so
session required pam_mkhomedir.so skel=/etc/skel umask=0077

...And he also tell me to replace the "system-auth" lines by "system-auth-winbind" in /etc/pam.d/samba but I only have this :

@include common-auth
@include common-account
@include common-session

I think that something is wrong in my pam config files. When I put "obey pam restrictions = no" on smb.conf I can use a client computer to explore a share folder on samba but if I leave "obey pam restrictions = yes" I can't !

I have verify many things and I don't forget to modify /etc/nsswitch.conf

I can use succefull commands like "wbinfo -u" but I can use smbclient only if "obey pam restrictions = no".

Reply to: