users: After setup, enable and restart slapd and nslcd

Apply the patch present in Debian packaging:

James Valleroy: When testing new image builds, I found users created through
plinth could not login through console or SSH. The reason is that slapd and
nslcd services were not enabled and not running. I don't know what is causing
this situation, so this is just a workaround.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2017-11-03 17:18:25 +05:30
parent f0c0d6dcf5
commit 7327a6b803
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 6 additions and 22 deletions

View File

@ -113,6 +113,12 @@ def configure_slapd():
{'nsswitch': 'group, passwd, shadow'})
action_utils.service_restart('nscd')
# XXX: Workaround for login issue
action_utils.service_enable('slapd')
action_utils.service_start('slapd')
action_utils.service_enable('nslcd')
action_utils.service_start('nslcd')
def configure_ldap_structure():
"""Configure LDAP basic structure."""

View File

@ -1,22 +0,0 @@
Subject: workaround for login issue
When testing new image builds, I found users created through plinth
could not login through console or SSH. The reason is that slapd and
nslcd services were not enabled and not running. I don't know what is
causing this situation, so this is just a workaround.
--- a/actions/users
+++ b/actions/users
@@ -113,6 +113,12 @@
{'nsswitch': 'group, passwd, shadow'})
action_utils.service_restart('nscd')
+ # XXX: Workaround for login issue
+ action_utils.service_enable('slapd')
+ action_utils.service_start('slapd')
+ action_utils.service_enable('nslcd')
+ action_utils.service_start('nslcd')
+
def configure_ldap_structure():
"""Configure LDAP basic structure."""