chsh

NAME

chsh - change a user's login shell

SYNOPSIS

chsh newshellpath

DESCRIPTION

The chsh(1) utility changes a user's default login shell. In the desktop Interix environment, this is not important: a user selects his or her shell using a desktop shortcut or a menu entry. However, this is important connecting remotely using a utility such as rlogin(1) or telnet(1).

The newshellpath is the path to the new shell (for example, /bin/tcsh or /bin/bash). The chsh(1) utility first checks that the file named by newshellpath exists and that it is executable, and then checks to see if the file is in the list of approved shells (/etc/shells).

After all of those conditions are satisfied, the utility changes the user's default shell.

DIAGNOSTICS

The chsh(1) utility exits with status 0 for success, and >0 if an error occurred.

FILES

The chsh(1) utility makes use of the following files:

/etc/shells
The list of approved files.

SEE ALSO

access(2)

gethostname(2)

getpdomain(2)

getpwuid(2)

getuid(2)

system(3)