Hey Steve,
I knew the error "Can't initialize directory" with the auto-create
method of pam+winbind for home directories as well,
but I think my setup is a little bit different than yours...
My setup looks like this:
- 50 linux-server
- 5 AD secondary DC's (Active Directory w2k8 R2)
- 1 Master-DC (Active Directory w2k8 R2)
The linux-server were setup with RHEL 5 (nearly half of all).
Approx. 15 server were setup with Oracle Linux 6.2 (nearly the same like RHEL).
Do you use the same Linux-Version for your clients (e.g. servers)?
If so just try to put the same pam-lines (/etc/pam.d/system-auth) into
the file password-auth file (/etc/pam.d/password-auth).
These are my files:
--> /etc/pam.d/system-auth <--
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so likeauth nullok
auth sufficient pam_krb5.so use_first_pass
auth sufficient pam_smb_auth.so use_first_pass nolocal
auth sufficient pam_winbind.so use_first_pass
require_membership_of=g-gr-eo-it-io-dc,g-gr-eo-it-ao
auth required pam_deny.so
account required pam_unix.so broken_shadow
account sufficient pam_succeed_if.so uid < 500 quiet
account sufficient pam_krb5.so
account sufficient pam_winbind.so
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
password sufficient pam_krb5.so use_authtok
password sufficient pam_winbind.so use_authtok
password required pam_deny.so
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond
quiet use_uid
session required pam_unix.so
session optional pam_krb5.so
session required pam_mkhomedir.so skel=/etc/skel umask=0077
--> /etc/pam.d/password-auth <--
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so likeauth nullok
auth sufficient pam_krb5.so use_first_pass
auth sufficient pam_smb_auth.so use_first_pass nolocal
auth sufficient pam_winbind.so use_first_pass
require_membership_of=g-gr-eo-it-io-dc,g-gr-eo-it-ao
auth required pam_deny.so
account required pam_unix.so broken_shadow
account sufficient pam_succeed_if.so uid < 500 quiet
account sufficient pam_krb5.so
account sufficient pam_winbind.so
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
password sufficient pam_krb5.so use_authtok
password sufficient pam_winbind.so use_authtok
password required pam_deny.so
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond
quiet use_uid
session required pam_unix.so
session optional pam_krb5.so
session required pam_mkhomedir.so skel=/etc/skel umask=0077
And my smb.conf looks like this:
# GLOBAL PARAMETERS
[global]
workgroup = <MY-WORKGROUP>
realm = <MY-DOMAIN.LCL>
password server = *
preferred master = no
server string = <YOUR> File-Server
security = ads
encrypt passwords = yes
local master = no
log level = 1
log file = /var/log/samba/%m
max log size = 50
#printcap name = cups
#printcap = cups
printcap = /dev/null
winbind enum users = Yes
winbind enum groups = Yes
winbind use default domain = Yes
winbind nested groups = Yes
winbind separator = \\
winbind refresh tickets = yes
winbind offline logon = true
winbind trusted domains only = no
#winbind trusted domains only = yes
map untrusted to domain = Yes
allow trusted domains = yes
obey pam restrictions = no
idmap backend = tdb
idmap uid = 10000-600000
idmap gid = 10000-600000
#idmap config EOS : tdb
#idmap config EOS : 10000-100000
#idmap config DFD : tdb
#idmap config DFD : 110000-200000
#idmap config * : backend = tdb
#idmap config * : range = 10000-600000
passdb backend = tdbsam
;template primary group = "domain users"
#template shell = /bin/false
template shell = /bin/bash
winbind nss info = rfc2307
client use spnego = yes
client ntlmv2 auth = yes
restrict anonymous = 2
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[homes]
comment = Heimatverzeichnisse
valid users = %S
path = /home/<DOMAIN>/
read only = yes
browseable = no
#verstecke "nicht-lesbare" Verzeichnisse
hide unreadable = yes
#verstecke "nicht-schreibbare" Dateien u. Ordner
hide unwriteable files = yes
create mask = 0700
directory mask = 0700
When you login to one of my linux box with a user called "schlegels",
the home directory
will be created like this: /home/<DOMAIN>/schlegels
Oddjobd is not working for me... I don't know exactly if my setup is
the same like yours, because
I'm not able to read the whole conversation (too many things to do).
Cheers and good luck,
Steven
2012/8/8 steve <
st...@steve-ss.com>: