LDAP - specify user homeDirectory
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2021-03-10 18:37:32 -06:00
parent dbb8684f68
commit 53a1662f70
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

View File

@ -191,6 +191,7 @@ class User extends AuthUser {
const uid_number = await this.get_uid_number()
const shell = this.configs.get('ldap:server.schema.default_shell')
const domain = this.configs.get('ldap:server.schema.base_dc').split(',').map(x => x.replace('dc=', '')).join('.')
const ldap_data = {
uid: this.uid.toLowerCase(),
@ -208,6 +209,7 @@ class User extends AuthUser {
uidNumber: uid_number,
gidNumber: uid_number,
loginShell: shell,
homeDirectory: `/home/${this.uid}@${domain}`
}
if ( this.tagline ) ldap_data.extras_tagline = this.tagline