La commande 'chsh' permet de changer le SHELL d'un utilisateur.

Exemple :' chsh kim /usr/bin/ksh'

La syntaxe est la suivante :

chsh Command

Purpose

Changes a user's login shell.

Syntax

chsh [ -R load_module ] [ Name [ Shell ] ]

Description

The chsh command changes a user's login shell attribute. The shell attribute defines the initial program that runs after a
user logs in to the system. This attribute is specified in the /etc/passwd file. By default, the chsh command changes the
login shell for the user who gives the command.

The chsh command is interactive. When you run the chsh command, the system displays a list of the available shells and the
current value of the shell attribute. Then, the system prompts you to change the shell. You must enter the full path name of
an available shell.

If you have execute permission for the chuser command, you can change the login shell for another user. To change the login
shell for another user, specify a Name parameter. Valid shells are defined in the usw stanza of the /etc/security/login.cfg
file. The default list of valid shells is: /usr/bin/ksh, /usr/bin/sh, /usr/bin/bsh, /usr/bin/csh but your system manager may
have defined more.

For users that are created with an alternate Identification and Authentication (I&A) mechanism, the -R flag can be used to
specify the I&A load module used to create the user. Load modules are defined in the /usr/lib/security/methods.cfg file.


 

icon phone
Téléphone/Whatsapp : +33 (0)6 83 84 85 74
icon phone