1

I am using pam_mkhomedir to automatically create user's home directories when they first log in.

However, the home directories are created inside the /home directory, while i need them to be created inside another one (/users/home).

How can this be achieved ?

Extra info:

  • Editing /etc/default/useradd does not help.
  • The only options that can be passed to pam_mkhomedir are the path to an alternative "skel" directory and a permissions mask.
iodbh
  • 214
  • 1
  • 10

1 Answers1

3

The homedir should be created in the path for the homedir specified in the users entry in /etc/passwd (or other similar account sources like an LDAP directory). Did you try to change that?

This entry is the authoritative declaration of where the users homedir is (and should be created).

Sven
  • 97,248
  • 13
  • 177
  • 225
  • Users are authenticated from a LDAP server, but your answer made me realize that their home directory path is indeed wrong (/etc/home) in the LDAP directory. Sorry about that - changing to the right value did fix the "problem". – iodbh Mar 27 '15 at 12:05