shadow/man/chsh.1

55 lines
1.7 KiB
Groff

.\" Title: chsh
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
.\" Date: 06/06/2006
.\" Manual: User Commands
.\" Source: User Commands
.\"
.TH "CHSH" "1" "06/06/2006" "User Commands" "User Commands"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
chsh \- change login shell
.SH "SYNOPSIS"
.HP 5
\fBchsh\fR [\-s\ \fIlogin_shell\fR] [\fIuser\fR]
.SH "DESCRIPTION"
.PP
\fBchsh\fR
changes the user login shell. This determines the name of the user's initial login command. A normal user may only change the login shell for her own account, the super user may change the login shell for any account.
.PP
The only restriction placed on the login shell is that the command name must be listed in
\fI/etc/shells\fR, unless the invoker is the super\-user, and then any value may be added. An account with a restricted login shell may not change her login shell. For this reason, placing
\fI/bin/rsh\fR
in
\fI/etc/shells\fR
is discouraged since accidentally changing to a restricted shell would prevent the user from ever changing her login shell back to its original value.
.SH "OPTIONS"
.PP
If the
\fB\-s\fR
option is not selected,
\fBchsh\fR
operates in an interactive fashion, prompting the user with the current login shell. Enter the new value to change the shell, or leave the line blank to use the current one. The current shell is displayed between a pair of
\fI[ ]\fR
marks.
.SH "FILES"
.TP 3n
\fI/etc/passwd\fR
User account information.
.TP 3n
\fI/etc/shells\fR
List of valid login shells.
.TP 3n
\fI/etc/login.defs\fR
Shadow password suite configuration.
.SH "SEE ALSO"
.PP
\fBchfn\fR(1),
\fBlogin.defs\fR(5),
\fBpasswd\fR(5).