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 - 2009, 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">
36 <refentry id='vipw.8'>
39 <refentrytitle>vipw</refentrytitle>
40 <manvolnum>8</manvolnum>
41 <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
43 <refnamediv id='name'>
44 <refname>vipw</refname>
45 <refname>vigr</refname>
47 edit the password, group, shadow-password or shadow-group file
51 <refsynopsisdiv id='synopsis'>
53 <command>vipw</command>
55 <replaceable>options</replaceable>
59 <command>vigr</command>
61 <replaceable>options</replaceable>
66 <refsect1 id='description'>
67 <title>DESCRIPTION</title>
69 The <command>vipw</command> and <command>vigr</command> commands edits
70 the files <filename>/etc/passwd</filename> and
71 <filename>/etc/group</filename>, respectively. With the
72 <option>-s</option> flag, they will edit the shadow versions of those
73 files, <filename>/etc/shadow</filename> and
74 <filename>/etc/gshadow</filename>, respectively. The programs will set
75 the appropriate locks to prevent file corruption. When looking for an
76 editor, the programs will first try the environment variable
77 <envar>$VISUAL</envar>, then the environment variable
78 <envar>$EDITOR</envar>, and finally the default editor,
79 <citerefentry><refentrytitle>vi</refentrytitle>
80 <manvolnum>1</manvolnum></citerefentry>.
84 <refsect1 id='options'>
85 <title>OPTIONS</title>
87 The options which apply to the <command>vipw</command> and
88 <command>vigr</command> commands are:
90 <variablelist remap='IP'>
92 <term><option>-g</option>, <option>--group</option></term>
94 <para>Edit group database.</para>
98 <term><option>-h</option>, <option>--help</option></term>
100 <para>Display help message and exit.</para>
104 <term><option>-p</option>, <option>--passwd</option></term>
106 <para>Edit passwd database.</para>
110 <term><option>-q</option>, <option>--quiet</option></term>
112 <para>Quiet mode.</para>
116 <term><option>-s</option>, <option>--shadow</option></term>
118 <para>Edit shadow or gshadow database.</para>
121 <varlistentry condition="tcb">
122 <term><option>-u</option>, <option>--user</option></term>
124 <para>Indicates which user's tcb shadow file to edit.</para>
130 <refsect1 id='configuration'>
131 <title>CONFIGURATION</title>
133 The following configuration variables in
134 <filename>/etc/login.defs</filename> change the behavior of this
142 <refsect1 id='environment'>
143 <title>ENVIRONMENT</title>
146 <term><option>VISUAL</option></term>
148 <para>Editor to be used.</para>
152 <term><option>EDITOR</option></term>
154 <para>Editor to be used if <option>VISUAL</option> is not set.</para>
160 <refsect1 id='files'>
164 <term><filename>/etc/group</filename></term>
166 <para>Group account information.</para>
170 <term><filename>/etc/gshadow</filename></term>
172 <para>Secure group account information.</para>
176 <term><filename>/etc/passwd</filename></term>
178 <para>User account information.</para>
182 <term><filename>/etc/shadow</filename></term>
184 <para>Secure user account information.</para>
190 <refsect1 id='see_also'>
191 <title>SEE ALSO</title>
194 <refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum>
197 <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
200 <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
202 <citerefentry condition="tcb">
203 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
206 <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
208 <citerefentry condition="tcb">
209 <refentrytitle>tcb</refentrytitle><manvolnum>5</manvolnum>
212 <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>