2

How to use zsh as default when starting an ssh session to a remote chef server using LDAP for authentication?

tom@chef:~$ chsh -s /usr/bin/zsh
Password:
chsh: user 'tom' does not exist in /etc/passwd

Zsh is installed on the system.

cat /etc/shells
# /etc/shells: valid login shells
/bin/sh
/bin/bash
/bin/rbash
/bin/dash
/usr/bin/tmux
/usr/bin/screen
/bin/zsh
/usr/bin/zsh
Tom M
  • 121
  • 2
    Do you have a chsh.ldap command? see http://manpages.ubuntu.com/manpages/bionic/man1/chsh.ldap.1.html – Bodo Feb 19 '19 at 17:53
  • @Bodo do I have to run it on the target server I want to switch to zsh on? chsh.ldap -s /usr/bin/zsh returns Segmentation fault (core dumped) – Tom M Feb 19 '19 at 17:59
  • You have to run it on the system that shows the error message in the question. Does chsh.ldap -h or chsh.ldap -l work? Was the command already available or did you install it just now? – Bodo Feb 19 '19 at 18:08
  • @Bodo -h and -V work. -l errors out with a Segmentation fault aswell. It was installed on the system already. – Tom M Feb 19 '19 at 18:10
  • Sorry, I don't know why this program crashes with a Segmentation fault. – Bodo Feb 19 '19 at 18:21
  • @Bodo Apparently there is a bug in the nss-pam-ldapd version used on this machine which causes the Segmentation fault – Tom M Feb 19 '19 at 18:30
  • That means you (or whoever is responsible for the system) should install a newer version of this package, then you can try again. – Bodo Feb 20 '19 at 08:42
  • @Bodo yeah I think I'll suggest that. If chsh.ldap works after that, I'll notify you on this thread, so you can post it as an answer and I'll accept it – Tom M Feb 20 '19 at 08:53
  • Did you check https://unix.stackexchange.com/questions/136423/making-zsh-default-shell-without-root-access, this also has some suggestions – papanito Apr 16 '21 at 09:02

0 Answers0