chsh

from Wikipedia, the free encyclopedia

chsh (short for change shell - Engl. , alter Shell ') is a command for BSD Unix systems, which to change the login - shell is used. The user can either enter the path to the desired shell or execute the command without input to enable an interactive shell change.

chsh is a setuid program that modifies the / etc / passwd file so that each user of the system can only change his own login shell. The superuser, on the other hand, can also change the shells of other users if the corresponding name is specified as a command line parameter.

One limitation of chsh is that both users and superusers can only use this command to specify shells that are specified in the / etc / shells file . However, this restriction can be circumvented if the superuser modifies the / etc / passwd file manually and can thus enter any executable file on the system.

Depending on the system, the user must enter his password before changing the shell or switching to interactive mode. For security reasons, access to this command can also be completely deactivated for normal users.

On Unix System V, the command is used instead of chshpasswd -e shellname .

In many Linux distributions , chsh is a PAM -capable application whose behavior can be controlled by configuring PAM options. For security reasons, for example, certain users can be prevented from accessing the command to change the login shell using the PA module pam_listfile.so .