I have a network of Centos 7 machines hosting sshd
, each of which is configured to lookup a user's public keys in an LDAP directory for ssh authentication.
Furthermore, all ssh users that have access to these Centos boxes are divided into one of two groups in the directory: users or admins.
I would like to make sure all users in the users
group have their shell set to /bin/false
and all users in the admins
group have their shell set to /bin/bash
.
In SSSD, the following successfully sets the shell for all users to /bin/false
:
[domain/mydomain.com]
override_shell = /bin/false
Is there a way to set the shell for each AD group separately? Something like the following?
[domain/users@mydomain.com]
override_shell = /bin/false
[domain/admins@mydomain.com]
override_shell = /bin/bash
If so, how?