Change user's login shell

NethServer Version: 7.7
Module: n/a

Like it says on the tin, I’m trying to find a way to change a user’s shell on a Neth 7.7 box using Local LDAP accounts provider. chsh ought to do it, but it doesn’t work:

[dan@familybrown.org@neth-dev ~]$ chsh
Changing shell for dan@familybrown.org.
New shell [/bin/bash]: /bin/zsh
chsh: user "dan@familybrown.org" does not exist.

I don’t see any place to change this in the GUI (old or new), and the accounts database (/var/lib/nethserver/db/accounts) is completely empty. There has to be something simple I’m missing–what is it?

You may change the login shell with phpldapadmin or lam or command line:

signal-event user-modify user Username /bin/zsh

https://docs.nethserver.org/projects/nethserver-devel/en/latest/nethserver-sssd.html#user-modify

Another way with ldapmodify:

ldapmodify -Y EXTERNAL <<EOF
dn: uid=user,ou=People,dc=directory,dc=nh
changetype: modify
replace: loginShell
loginShell: /bin/zsh
EOF
1 Like