1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1997 , Marek Michałkiewicz
4 Copyright (c) 2001 - 2006, Tomasz Kłoczko
5 Copyright (c) 2007 - 2011, Nicolas François
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions
11 1. Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16 3. The name of the copyright holders or contributors may not be used to
17 endorse or promote products derived from this software without
18 specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
33 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
34 <!ENTITY USE_TCB SYSTEM "login.defs.d/USE_TCB.xml">
35 <!-- SHADOW-CONFIG-HERE -->
37 <refentry id='vipw.8'>
41 <firstname>Marek</firstname>
42 <surname>Michałkiewicz</surname>
43 <contrib>Creation, 1997</contrib>
46 <firstname>Thomas</firstname>
47 <surname>Kłoczko</surname>
48 <email>kloczek@pld.org.pl</email>
49 <contrib>shadow-utils maintainer, 2000 - 2007</contrib>
52 <firstname>Nicolas</firstname>
53 <surname>François</surname>
54 <email>nicolas.francois@centraliens.net</email>
55 <contrib>shadow-utils maintainer, 2007 - now</contrib>
59 <refentrytitle>vipw</refentrytitle>
60 <manvolnum>8</manvolnum>
61 <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
62 <refmiscinfo class="source">shadow-utils</refmiscinfo>
63 <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
65 <refnamediv id='name'>
66 <refname>vipw</refname>
67 <refname>vigr</refname>
69 edit the password, group, shadow-password or shadow-group file
73 <refsynopsisdiv id='synopsis'>
75 <command>vipw</command>
77 <replaceable>options</replaceable>
81 <command>vigr</command>
83 <replaceable>options</replaceable>
88 <refsect1 id='description'>
89 <title>DESCRIPTION</title>
91 The <command>vipw</command> and <command>vigr</command> commands edits
92 the files <filename>/etc/passwd</filename> and
93 <filename>/etc/group</filename>, respectively. With the
94 <option>-s</option> flag, they will edit the shadow versions of those
95 files, <filename>/etc/shadow</filename> and
96 <filename>/etc/gshadow</filename>, respectively. The programs will set
97 the appropriate locks to prevent file corruption. When looking for an
98 editor, the programs will first try the environment variable
99 <envar>$VISUAL</envar>, then the environment variable
100 <envar>$EDITOR</envar>, and finally the default editor,
101 <citerefentry><refentrytitle>vi</refentrytitle>
102 <manvolnum>1</manvolnum></citerefentry>.
106 <refsect1 id='options'>
107 <title>OPTIONS</title>
109 The options which apply to the <command>vipw</command> and
110 <command>vigr</command> commands are:
112 <variablelist remap='IP'>
114 <term><option>-g</option>, <option>--group</option></term>
116 <para>Edit group database.</para>
120 <term><option>-h</option>, <option>--help</option></term>
122 <para>Display help message and exit.</para>
126 <term><option>-p</option>, <option>--passwd</option></term>
128 <para>Edit passwd database.</para>
132 <term><option>-q</option>, <option>--quiet</option></term>
134 <para>Quiet mode.</para>
139 <option>-R</option>, <option>--root</option> <replaceable>CHROOT_DIR</replaceable>
143 Apply changes in the <replaceable>CHROOT_DIR</replaceable>
144 directory and use the configuration files from the
145 <replaceable>CHROOT_DIR</replaceable> directory.
150 <term><option>-s</option>, <option>--shadow</option></term>
152 <para>Edit shadow or gshadow database.</para>
155 <varlistentry condition="tcb">
156 <term><option>-u</option>, <option>--user</option></term>
158 <para>Indicates which user's tcb shadow file to edit.</para>
164 <refsect1 id='configuration' condition="tcb">
165 <title>CONFIGURATION</title>
167 The following configuration variables in
168 <filename>/etc/login.defs</filename> change the behavior of this
176 <refsect1 id='environment'>
177 <title>ENVIRONMENT</title>
180 <term><option>VISUAL</option></term>
182 <para>Editor to be used.</para>
186 <term><option>EDITOR</option></term>
188 <para>Editor to be used if <option>VISUAL</option> is not set.</para>
194 <refsect1 id='files'>
198 <term><filename>/etc/group</filename></term>
200 <para>Group account information.</para>
204 <term><filename>/etc/gshadow</filename></term>
206 <para>Secure group account information.</para>
210 <term><filename>/etc/passwd</filename></term>
212 <para>User account information.</para>
216 <term><filename>/etc/shadow</filename></term>
218 <para>Secure user account information.</para>
224 <refsect1 id='see_also'>
225 <title>SEE ALSO</title>
228 <refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum>
231 <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
234 <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
236 <citerefentry condition="tcb">
237 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
240 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
242 <citerefentry condition="tcb">
243 <refentrytitle>tcb</refentrytitle><manvolnum>5</manvolnum>
246 <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>