chsh

Chsh ( change shell shortcut for -. eng, change Shell ' ) is a command for BSD Unix systems, which is used to change the login shell. In this case, the user can either enter or execute the command without input to allow an interactive shell change the path to the desired shell.

Chsh is a setuid program that uses the file / etc / passwd modified so that each user of the system can change only its own each login shell. The superuser, however, can change the shells of other users, if the corresponding name is specified as command line parameters.

One limitation of chsh is that with this command, both by users and by the superuser only shells can be specified, which are specified in the file / etc / shells. However, this limitation can be circumvented by the superuser manually performing the modification of the / etc / passwd file, and thus can enter any executable file on the system.

Depending on the system, the user must enter his password before changing the shell or change in the interactive mode. Access to this command can also be completely disabled for security for normal users.

On Unix System V the passwd -e command is used instead of shell name chsh '.

In many Linux distributions is chsh a PAM -enabled application whose behavior can be controlled by configuring the PAM options. For security reasons, for example, certain users with the help of the PA module pam_listfile.so access to the command to change the login shell will be banned.

  • UNIX software
189060
de