LDAP - set default loginShell
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2021-03-10 18:31:43 -06:00
parent 6a4f82611b
commit dbb8684f68
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246
2 changed files with 3 additions and 2 deletions

View File

@ -190,6 +190,7 @@ class User extends AuthUser {
const Policy = this.models.get('iam:Policy') const Policy = this.models.get('iam:Policy')
const uid_number = await this.get_uid_number() const uid_number = await this.get_uid_number()
const shell = this.configs.get('ldap:server.schema.default_shell')
const ldap_data = { const ldap_data = {
uid: this.uid.toLowerCase(), uid: this.uid.toLowerCase(),
@ -204,10 +205,9 @@ class User extends AuthUser {
entryUUID: this.uuid, entryUUID: this.uuid,
objectGuid: this.uuid, objectGuid: this.uuid,
objectguid: this.uuid, objectguid: this.uuid,
// uidnumber: uid_number,
uidNumber: uid_number, uidNumber: uid_number,
// gidnumber: uid_number,
gidNumber: uid_number, gidNumber: uid_number,
loginShell: shell,
} }
if ( this.tagline ) ldap_data.extras_tagline = this.tagline if ( this.tagline ) ldap_data.extras_tagline = this.tagline

View File

@ -19,6 +19,7 @@ const ldap_server = {
user_id: 'uid', user_id: 'uid',
}, },
start_uid: env('LDAP_START_UID', 80000), start_uid: env('LDAP_START_UID', 80000),
default_shell: env('LDAP_DEFAULT_SHELL', '/bin/bash'),
}, },
format: { format: {