Override LDAP shell

In /etc/ldap.conf add the following line:

nss_override_attribute_value loginShell <different_shell>

Best of luck,
João Miguel Neves


Shared home directories? If not, put into the users ~/.bash_profile (or whatever is the proper file, check INVOCATION in man bash):

exec /bin/tcsh

Or whatever shell you wish to replace bash with.

If they login using ssh, then you could use keypairs and forced commands.

Please note, depending where you place the exec for another shell, commands like scp may not function properly if you do not check for an interactive shell, like in the /etc/skel/.bashrc on Ubuntu.

Your best bet is to kindly ask your LDAP admin to change the loginShell for your LDAP user.