Commandes Linux : chsh

CHSH

Installé avec le paquet passwd
Voir aussi : usermod et passwd

 

Afficher la version de la commande chsh

apt-cache policy passwd

 

Changer le shell de connexion d’un utilisateur

chsh username -s shellname

Equivaut à :
usermod username -s shellname
ex :

# chsh usertest1 -s /bin/false
# ssh usertest1@localhost
usertest1@localhost's password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Jan 28 15:28:09 2017 from localhost
Connection to localhost closed.
# getent passwd usertest1
usertest1:x:1001:1002::/home/usertest1:/bin/false

Voir aussi la commande usermod

Fermer le menu
%d blogueurs aiment cette page :