LDAP - specify user homeDirectory
continuous-integration/drone/push Build is passing Details

master
Garrett Mills 3 years ago
parent dbb8684f68
commit 53a1662f70
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -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

Loading…
Cancel
Save