Unable to create home directory for new user

Hi There,
OS: Rocky 8.7
User auth: LDAP
home dir: Lustre parallel file system

When a new user is created, and he/she logs in the first time, /home directory cannot be created
Error:
su: warning: cannot change directory to /home/group/user: No such file or directory
There is no extra error record on /var/log messages or on /var/log/audit/audit.log
fstab mount option : defaults 0 0

With the exact same configuration on centos7.9, there is no problem with creating a home directory for the new user.

Has anyone had a similar issue?

Thanks in advance.

Are you expecting these home directories to be created on the local Rocky 8.7 box, or or some remote server?

Hi,
l expect it to be created in remote storage system.

How is the remote mounted? As /home?

Yes, the remote directory is mounted as /home.
The home directory assigned by LDAP is /home/group/user style.

Did you confirm that the remote home is mounted? If you just created the mount point in fstab and have not rebooted since then you have to run:

mount /home

first. I don’t remember if you have to run systemclt daemon-reload in rl8.
What does mount say about current mounts?

The mount is there. df -h /home shows it’s mounted, and I can see the files/folders.
A centos7.9 system also has the same mount point as the /home directory.
Underlying Infiniband network, metadata, and object storage servers don’t have any log output.
The OS has SELinux enforcing state, this is also the same with centos7.9. Maybe I am missing something with SELinux policies but no luck also with AVC Denials.

In your initial post you put /home/group/user, which is not the same thing as /home/user.

Does the /home have directory group that the user would be in?

For ease of use, each new user’s folder is created under its own group’s folder.
for example, user A from group 1 is at /home/1/A. User B from group 2 is at /home/2/B

Does /home/1 exist before A tries to log in?

Right, all groups are already exists.

What are you using to create the new users? adduser? gui tool? Something else?

Post your commandline if it’s a commandline that you’re using, otherwise post what you’re doing with the gui and how you’re doing it.

He’s using LDAP, so there is no need to add a user. When the LDAP authentication happens, if the home doesn’t exist, then it should create it under /home or wherever assuming that LDAP is configured correctly in the first place, and that it has enough permissions to ensure the directories are created.

I’ve had similar in the past when I configured sssd with AD auth, this link goes through what might happen in that situation: https://access.redhat.com/solutions/2137801 and what needs to be configured in sssd.conf for that to work. So sounds like the OP has similar with their config unable to do that.

1 Like

Thanks for the insight, maybe I need some modifications on sssd.conf on migrating Rocky8.
We use ldap_user_home_directory = unixHomeDirectory to set the home directory.
I will also update the post when I find the solution.