Hi, all. I'm working on a project to create a Samba PDC with LDAP authentication. I've been pretty successful in getting everything to work. However, I've run into a small snag: The PDC is built on an OpenSuse 11.2 box. Most of the member servers are also OpenSuse 11.2 boxes. However, a CentOS 5.5 server was just added to the mix. While users can lo into the CentOS box, with LDAP providing the creds, no home directory is automagically created as in the OpenSuse boxes. I'd like to fix that, with your help. I've used authconfig-tui on the CentOS box to enable "Use LDAP" and "Use LDAP Authentication" (the equivalent of YAST's LDAP Client config tool?). I believe my smb.conf and ldap.conf files are correct (I'll provide them if you all need to see them). Any ideas? Thanks. Dimitri -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Hi Dimitri, You probably want to enable the PAM module responsible for this. Back up and edit your /etc/pam.d/system-auth and add the following line: session required pam_oddjob_mkhomedir.so skel=/etc/skel/ umask=0022 Note: Messing with your pam config may lock you out of the system, so be careful. 2010/6/9 Dimitri Yioulos <dyioulos at firstbhph.com>:> Hi, all. > > I'm working on a project to create a Samba PDC > with LDAP authentication. ?I've been pretty > successful in getting everything to work. > However, I've run into a small snag: > > The PDC is built on an OpenSuse 11.2 box. ?Most of > the member servers are also OpenSuse 11.2 boxes. > However, a CentOS 5.5 server was just added to > the mix. ?While users can lo into the CentOS box, > with LDAP providing the creds, no home directory > is automagically created as in the OpenSuse > boxes. ?I'd like to fix that, with your help. > > I've used authconfig-tui on the CentOS box to > enable "Use LDAP" and "Use LDAP Authentication" > (the equivalent of YAST's LDAP Client config > tool?). ?I believe my smb.conf and ldap.conf > files are correct (I'll provide them if you all > need to see them). ?Any ideas? > > Thanks. > > Dimitri > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > -- > To unsubscribe from this list go to the following URL and read the > instructions: ?https://lists.samba.org/mailman/options/samba >-- Diego Lima
Subject: [Samba] Samba/LDAP and home dir creation Hi, all. I'm working on a project to create a Samba PDC with LDAP authentication. I've been pretty successful in getting everything to work. However, I've run into a small snag: The PDC is built on an OpenSuse 11.2 box. Most of the member servers are also OpenSuse 11.2 boxes. However, a CentOS 5.5 server was just added to the mix. While users can lo into the CentOS box, with LDAP providing the creds, no home directory is automagically created as in the OpenSuse boxes. I'd like to fix that, with your help. I've used authconfig-tui on the CentOS box to enable "Use LDAP" and "Use LDAP Authentication" (the equivalent of YAST's LDAP Client config tool?). I believe my smb.conf and ldap.conf files are correct (I'll provide them if you all need to see them). Any ideas? Thanks. Dimitri -------------------------------------- To avoid messing with PAM, you can also do something like root preexec=/data/Backup/createhomes.sh %D %S in your smb.conf and the file "createhomes.sh" looks something like #!/bin/bash if [ ! -d /data/homes/$1/$2 ]; then mkdir /data/homes/$1/$2 chmod g+s /data/homes/$1/$2 chown $2:"domain admins" /data/homes/$1/$2 chmod 770 /data/homes/$1/$2 /usr/bin/setfacl -m g:"domain admins":rwx /data/homes/$1/$2 /usr/bin/setfacl -m u:"$2":rwx /data/homes/$1/$2 /usr/bin/setfacl -m g:"domain users":000 /data/homes/$1/$2 fi exit 0 -=Andrew