There are cases where, on a particular LDAP client machine, you want to use a different shell rather than the one defined on the LDAP server (bash)
This is possible by configuring the Linux (Debian/CentOS) client to override the shell
Debian11(bullseye)
Add the following to /etc/libnss-ldap.conf
(look up the path to the shell beforehand)
nss_override_attribute_value loginShell /usr/bin/zshFlush the nscd cache
# nscd -i passwd nscdCentOS8
Add the following to /etc/nslcd.conf
map passwd loginShell "/usr/bin/zsh"Restart nslcd
# systemctl restart nslcdAdditional notes
I tend to use zsh on most of my Linux machines, but zsh still is not installed by default when Linux is installed, so it is safer to keep bash as the shell for logging in with LDAP authentication