Within in the sssd.conf file, does anyone know what the syntax should be to allow me to switch between different login shells?


example@example.com:~$ chsh -s /bin/zsh
chsh: user 'example' does not exist in /etc/passw
  • Do you want to set a different default shell or change shells mid-session? – sippybear Jul 19 '16 at 2:06
  • Are you using ldap / freeipa services? Tell us more about your environment – Valentin Bajrami Jul 19 '16 at 10:05
  • I would like to change shells mid session and I'm using Active Directory. Running Ubuntu 14.0.4 LTS – d3code2016 Jul 19 '16 at 14:52
  • @d3code2016 the error chsh: user 'example' does not exist in /etc/passwd suggests that there is no user in /etc/passwd which is correct. If you have a central container like ldap that holds all objects like 'users', 'passwords', 'computers' etc.. then that's where you've to look for. What does /etc/nsswitch.conf show? And you are better off asking your ldap admin to modify your shell. There might be restrictions. – Valentin Bajrami Jul 20 '16 at 7:49
  • # `info libc "Name Service Switch"' for information about this file. passwd: compat sss group: compat sss shadow: compat sss hosts: files mdns4_minimal [NOTFOUND=return] dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis sss sudoers: files sss – d3code2016 Jul 20 '16 at 13:44

using override_shell changed shell for everyone.

In AD you can add the unix shell it uses the attribute loginShell Open the user in AD Users and Computers click on the attribute tab and look for loginShell and edit that to the desired shell for the user

then in sssd.conf I add the line shell_fallback = /bin/zsh that way if your user doesn't have a shell in AD they still get a shell.
I also did add ldap_schema = ad to sssd.conf to force Active Directory schema.

  • I also had to clear the cache the hard way (systemctl stop sssd && rm -rf /var/lib/sss/db/* && systemctl restart sssd, sss_cache -E did NOT work), then logout and log back in before it got applied. – bviktor Nov 20 '19 at 13:57

You have to edit the file /etc/sssd/sssd.conf and override the default shell in the domain section of the file :

override_shell = /bin/zsh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.