Linux – LDAP Users Home Directories

ldaplinuxpam

I'm trying to setup linux login via an LDAP server.

I have everything working except setting the user's home directory. There is no parameter in the LDAP database that I can map to the homeDirectory attribute and I don't have the power to change the databse.

Is there any way I can configure it to use something like /home/$UID, where $UID is the username they're using to login/that's coming from the LDAP attribute uid?

Thanks.

Best Answer

Put

map passwd homeDirectory "/home/$uid"

to /etc/nslcd.conf (on Debian systems, on other systems it might be /etc/(ldap)/ldap.conf)