1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1990 , Julianne Frances Haugh
4 Copyright (c) 2007 - 2011, Nicolas François
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
15 3. The name of the copyright holders or contributors may not be used to
16 endorse or promote products derived from this software without
17 specific prior written permission.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
32 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33 <!ENTITY CHSH_AUTH SYSTEM "login.defs.d/CHSH_AUTH.xml">
34 <!ENTITY LOGIN_STRING SYSTEM "login.defs.d/LOGIN_STRING.xml">
35 <!-- SHADOW-CONFIG-HERE -->
38 <refentry id='chsh.1'>
41 <refentrytitle>chsh</refentrytitle>
42 <manvolnum>1</manvolnum>
43 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
44 <refmiscinfo class="source">shadow-utils</refmiscinfo>
45 <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
47 <refnamediv id='name'>
48 <refname>chsh</refname>
49 <refpurpose>change login shell</refpurpose>
52 <refsynopsisdiv id='synopsis'>
54 <command>chsh</command>
56 <replaceable>options</replaceable>
59 <replaceable>LOGIN</replaceable>
64 <refsect1 id='description'>
65 <title>DESCRIPTION</title>
67 The <command>chsh</command> command changes the user login shell.
68 This determines the name of the user's initial login command. A normal
69 user may only change the login shell for her own account; the
70 superuser may change the login shell for any account.
75 <refsect1 id='options'>
76 <title>OPTIONS</title>
78 The options which apply to the <command>chsh</command> command are:
80 <variablelist remap='IP'>
82 <term><option>-h</option>, <option>--help</option></term>
84 <para>Display help message and exit.</para>
89 <option>-R</option>, <option>--root</option>
90 <replaceable>CHROOT_DIR</replaceable>
94 Apply changes in the <replaceable>CHROOT_DIR</replaceable>
95 directory and use the configuration files from the
96 <replaceable>CHROOT_DIR</replaceable> directory.
102 <option>-s</option>, <option>--shell</option> <replaceable>SHELL</replaceable>
106 The name of the user's new login shell. Setting this field to
107 blank causes the system to select the default login shell.
113 If the <option>-s</option> option is not selected,
114 <command>chsh</command> operates in an interactive fashion, prompting
115 the user with the current login shell. Enter the new value to change
116 the shell, or leave the line blank to use the current one. The current
117 shell is displayed between a pair of <emphasis>[ ]</emphasis> marks.
124 The only restriction placed on the login shell is that the command
125 name must be listed in <filename>/etc/shells</filename>, unless the
126 invoker is the superuser, and then any value may be added. An
127 account with a restricted login shell may not change her login shell.
128 For this reason, placing <filename>/bin/rsh</filename> in
129 <filename>/etc/shells</filename> is discouraged since accidentally
130 changing to a restricted shell would prevent the user from ever
131 changing her login shell back to its original value.
135 <refsect1 id='configuration' condition="no_pam">
136 <title>CONFIGURATION</title>
138 The following configuration variables in
139 <filename>/etc/login.defs</filename> change the behavior of this
148 <refsect1 id='files'>
152 <term><filename>/etc/passwd</filename></term>
154 <para>User account information.</para>
158 <term><filename>/etc/shells</filename></term>
160 <para>List of valid login shells.</para>
164 <term><filename>/etc/login.defs</filename></term>
166 <para>Shadow password suite configuration.</para>
172 <refsect1 id='see_also'>
173 <title>SEE ALSO</title>
176 <refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
179 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
182 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>