xref: /freebsd/usr.sbin/edquota/edquota.8 (revision b52b9d56d4e96089873a75f9e29062eec19fabba)
1.\" Copyright (c) 1983, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Robert Elz at The University of Melbourne.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
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. All advertising materials mentioning features or use of this software
16.\"    must display the following acknowledgement:
17.\"	This product includes software developed by the University of
18.\"	California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\"    may be used to endorse or promote products derived from this software
21.\"    without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\"	@(#)edquota.8	8.1 (Berkeley) 6/6/93
36.\" $FreeBSD$
37.\"
38.Dd June 6, 1993
39.Dt EDQUOTA 8
40.Os
41.Sh NAME
42.Nm edquota
43.Nd edit user quotas
44.Sh SYNOPSIS
45.Nm
46.Op Fl u
47.Op Fl f Ar fspath
48.Op Fl p Ar proto-username
49.Ar username ...
50.Nm
51.Fl g
52.Op Fl f Ar fspath
53.Op Fl p Ar proto-groupname
54.Ar groupname ...
55.Nm
56.Fl t
57.Op Fl u
58.Op Fl f Ar fspath
59.Nm
60.Fl t
61.Fl g
62.Op Fl f Ar fspath
63.Sh DESCRIPTION
64The
65.Nm
66utility is a quota editor.
67By default, or if the
68.Fl u
69flag is specified,
70one or more users may be specified on the command line.
71For each user a temporary file is created
72with an
73.Tn ASCII
74representation of the current
75disk quotas for that user.
76The list of filesystems with user quotas is determined from
77.Pa /etc/fstab .
78An editor is invoked on the
79.Tn ASCII
80file.
81The editor invoked is
82.Xr vi 1
83unless the environment variable
84.Ev EDITOR
85specifies otherwise.
86.Pp
87The quotas may then be modified, new quotas added, etc.
88Setting a quota to zero indicates that no quota should be imposed.
89Setting a hard limit to one indicates that no allocations should
90be permitted.
91Setting a soft limit to one with a hard limit of zero
92indicates that allocations should be permitted only on
93a temporary basis (see
94.Fl t
95below).
96The current usage information in the file is for informational purposes;
97only the hard and soft limits can be changed.
98.Pp
99On leaving the editor,
100.Nm
101reads the temporary file and modifies the binary
102quota files to reflect the changes made.
103.Pp
104If the
105.Fl p
106option is specified,
107.Nm
108will duplicate the quotas of the prototypical user
109specified for each user specified.
110This is the normal mechanism used to
111initialize quotas for groups of users.
112If the user given to assign quotas to is a numerical uid
113range (e.g. 1000-2000), then
114.Nm
115will duplicate the quotas of the prototypical user
116for each uid in the range specified.  This allows
117for easy setup of default quotas for a group of users.
118The uids in question do not have to be currently assigned in
119.Pa /etc/passwd .
120.Pp
121If invoked with the
122.Fl f
123option,
124.Nm
125will read and modify quotas on the filesystem specified by
126.Ar fspath
127only.
128The
129.Ar fspath
130argument may be either a special device
131or a filesystem mount point.
132The primary purpose of this option is to set the scope for the
133.Fl p
134option, which would overwrite quota records on every
135filesystem with quotas otherwise.
136.Pp
137If the
138.Fl g
139flag is specified,
140.Nm
141is invoked to edit the quotas of
142one or more groups specified on the command line.
143The
144.Fl p
145flag can be specified in conjunction with
146the
147.Fl g
148flag to specify a prototypical group
149to be duplicated among the listed set of groups.
150.Pp
151Users are permitted to exceed their soft limits
152for a grace period that may be specified per filesystem.
153Once the grace period has expired,
154the soft limit is enforced as a hard limit.
155The default grace period for a filesystem is specified in
156.Pa /usr/include/ufs/ufs/quota.h .
157The
158.Fl t
159flag can be used to change the grace period.
160By default, or when invoked with the
161.Fl u
162flag,
163the grace period is set for all the filesystems with user
164quotas specified in
165.Pa /etc/fstab .
166When invoked with the
167.Fl g
168flag the grace period is
169set for all the filesystems with group quotas specified in
170.Pa /etc/fstab .
171The grace period may be specified in days, hours, minutes, or seconds.
172Setting a grace period to zero indicates that the default
173grace period should be imposed.
174Setting a grace period to one second indicates that no
175grace period should be granted.
176.Pp
177Only the super-user may edit quotas.
178.Sh FILES
179.Bl -tag -width quota.group -compact
180.It Pa quota.user
181at the filesystem root with user quotas
182.It Pa quota.group
183at the filesystem root with group quotas
184.It Pa /etc/fstab
185to find filesystem names and locations
186.El
187.Sh SEE ALSO
188.Xr quota 1 ,
189.Xr quotactl 2 ,
190.Xr fstab 5 ,
191.Xr quotacheck 8 ,
192.Xr quotaon 8 ,
193.Xr repquota 8
194.Sh DIAGNOSTICS
195Various messages about inaccessible files; self-explanatory.
196