16 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
7327a6b803
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>
2017-11-03 18:33:11 +05:30
Sunil Mohan Adapa
ccfe511e4c
users: Minor refactoring
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-17 17:39:42 +05:30
Joseph Nuthalpati
396e086727
users: Migrate ldap bash script into actions/users
- Also wrote unit tests in users/tests/test_actions

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-10-17 09:25:14 +05:30
Sunil Mohan Adapa
56b071858b
users: Restart nscd after setup
The changes made for system login will not be effective until a restart. This
includes SSH login, console login, getent answers, etc.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-07 07:08:27 -04:00
Sunil Mohan Adapa
e558cdc1e4
users: Keep safety check to start slapd during setup
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-29 17:09:10 +05:30
James Valleroy
b19a9f972c
users: Move ldap structure config into normal setup
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-08-29 17:08:09 +05:30
Johannes Keyser
634afef1c9
actions: Make subparsers mandatory, fixes calls without arguments
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-04-10 11:54:23 +05:30
James Valleroy
1aa767e6bd
users: Move part of LDAP setup to first-run
LDAP admin and basic structure setup requires running slapd. Move this
to first-run so we don't have to start slapd during setup. This should
avoid issues when running setup in a chroot.
2017-01-18 18:40:03 -05:00
Sunil Mohan Adapa
8e28afe160
users: Move dpkg reconfigure to action utils
In the hope that it will be useful to other actions.  Also delete the
named temporary file after configuration.
2016-07-31 10:58:07 +05:30
James Valleroy
6c3d3888c1
Use NamedTemporaryFile for debconf override db 2016-07-30 08:49:37 +05:30
James Valleroy
956416ef37
Configure users module packages after installation
Preseeding settings with debconf won't have any effect if the packages
are already installed. Instead, provide an override database to
dpkg-reconfigure.
2016-07-30 08:49:22 +05:30
James Valleroy
8e96e828d9
security: New module to control login restrictions 2016-07-09 22:41:21 +05:30
James Valleroy
ef40941c7c
Fix quoted values in nslcd config 2016-06-14 06:57:28 -04:00
Sunil Mohan Adapa
f68a757741
users: Reorganize and make idempotent ldap setup
- Break down setup process into methods.

- Make sure that LDAP entity setup is idempotent.

- Peform all entry updates while slapd is running instead of using
  slapadd.

- Start slapd only when necessary.  Shutdown (only) if we have started
  slapd.
2016-05-21 16:06:33 -04:00
James Valleroy
401d3870f6
Move ldapscript setup to users module setup. 2016-05-21 16:06:26 -04:00
James Valleroy
f01575e2ea
Move ldap setup from freedombox-setup to plinth. 2016-05-21 16:06:18 -04:00