How to create home directories on the first login (using pam_oddjob_mkhomedir.so)

Solution Verified - Updated -

Issue

  • External users (IDM/LDAP/AD) do not have a home directory.
  • After joining a RHEL machine to an AD domain using adcli, user can login using ssh successfully but during the first login the expected home directrory is never created

    [root@rhel7 ~]# ssh aduser@ADdomain@localhost
    aduser@ADdomain@localhost's password: 
    Last login: Fri Sep  1 14:54:31 2017
    Could not chdir to home directory /home/ADdomain/aduser: No such file or directory
    -bash-4.2$ 
    

Environment

  • Red Hat Enterprise Linux 7
    • authconfig
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
    • authselect
  • pam_oddjob_mkhomedir.so

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content