I have an OEL 6.1 server where I need users to authenticate using samba/winbind. I deployed the configuration 1 of the choices given in the relevant manual "Integrating Red Hat Enterprise Linux 6 with Active Directory" (http://jp.redhat.com/rhecm/rest-rhecm/jcr/repository/collaboration/jcr:system/jcr:versionStorage/23549efa0a0526020ce2917… ).
The problem is that although I have authentication, then the user's home directory is not created automatically (although I've checked the relevant box in the authentication configuration tool):
When I ssh on the server I get the message "Could not chdir to home directory /home/%D/%U: No such file or directory".
Can you help me identify the problem?
I had the following line (1):
session optional pam_oddjob_mkhomedir.so
I replaced it in both files /etc/pam.d/system-auth and /etc/pam.d/password-auth with the one Dude proposed, line (2):
session required pam_mkhomedir.so umask=0022 skel=/etc/skel
and now the system creates the home directories.
However I have a question. As this is the second server I setup, the first one works fine with the line (1). The second server now uses line (2). Line (1) is the one auto-written by the authconfig tool. So, if I use the authconfig tool again these files will again change and I will have to manually change this line again. Is this normal?
Interesting. You should be able to use method 1. However, make sure it is installed including the proper SELinux file:
# yum install oddjobmkhomedir
According the man page of pam_oddjob_mkhomedir, this method requires the D-Bus message bus daemon.
Check /etc/oddjobd.conf.d/oddjobd-mkhomedir.conf and make sure it's running:
# service oddjobd start
There are some good tutorials, you can search Google for "rhel 6 configure oddjob"