xref: /freebsd/usr.sbin/edquota/edquota.8 (revision bfd34a4a6037d50f81f6ccc655d65b3f10840cd7)
1dea673e9SRodney W. Grimes.\" Copyright (c) 1983, 1990, 1993
2dea673e9SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
3dea673e9SRodney W. Grimes.\"
4dea673e9SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by
5dea673e9SRodney W. Grimes.\" Robert Elz at The University of Melbourne.
6dea673e9SRodney W. Grimes.\"
7dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
8dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions
9dea673e9SRodney W. Grimes.\" are met:
10dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
11dea673e9SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
12dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
13dea673e9SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
14dea673e9SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
15dea673e9SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software
16dea673e9SRodney W. Grimes.\"    must display the following acknowledgement:
17dea673e9SRodney W. Grimes.\"	This product includes software developed by the University of
18dea673e9SRodney W. Grimes.\"	California, Berkeley and its contributors.
19dea673e9SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors
20dea673e9SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
21dea673e9SRodney W. Grimes.\"    without specific prior written permission.
22dea673e9SRodney W. Grimes.\"
23dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26dea673e9SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33dea673e9SRodney W. Grimes.\" SUCH DAMAGE.
34dea673e9SRodney W. Grimes.\"
35dea673e9SRodney W. Grimes.\"	@(#)edquota.8	8.1 (Berkeley) 6/6/93
36dea673e9SRodney W. Grimes.\"
37389766f3SMike Pritchard.Dd "June 6, 1993"
38389766f3SMike Pritchard.Dt EDQUOTA 8
39389766f3SMike Pritchard.Os
40389766f3SMike Pritchard.Sh NAME
41389766f3SMike Pritchard.Nm edquota
42389766f3SMike Pritchard.Nd edit user quotas
43389766f3SMike Pritchard.Sh SYNOPSIS
44389766f3SMike Pritchard.Nm edquota
45389766f3SMike Pritchard.Op Fl u
46389766f3SMike Pritchard.Op Fl p Ar proto-username
47389766f3SMike Pritchard.Ar username ...
48389766f3SMike Pritchard.Nm edquota
49389766f3SMike Pritchard.Fl g
50389766f3SMike Pritchard.Op Fl p Ar proto-groupname
51389766f3SMike Pritchard.Ar groupname ...
52389766f3SMike Pritchard.Nm edquota
53389766f3SMike Pritchard.Fl t
54389766f3SMike Pritchard.Op Fl u
55389766f3SMike Pritchard.Nm edquota
56389766f3SMike Pritchard.Fl t
57389766f3SMike Pritchard.Fl g
58dea673e9SRodney W. Grimes.br
59389766f3SMike Pritchard.Sh DESCRIPTION
60389766f3SMike Pritchard.Nm Edquota
61dea673e9SRodney W. Grimesis a quota editor.
62389766f3SMike PritchardBy default, or if the
63389766f3SMike Pritchard.Fl u
64389766f3SMike Pritchardflag is specified,
65dea673e9SRodney W. Grimesone or more users may be specified on the command line.
66dea673e9SRodney W. GrimesFor each user a temporary file is created
67dea673e9SRodney W. Grimeswith an ASCII representation of the current
68dea673e9SRodney W. Grimesdisk quotas for that user.
69dea673e9SRodney W. GrimesThe list of filesystems with user quotas is determined from
70389766f3SMike Pritchard.Pa /etc/fstab .
71dea673e9SRodney W. GrimesAn editor is invoked on the ASCII file.
72dea673e9SRodney W. GrimesThe editor invoked is
73389766f3SMike Pritchard.Xr vi 1
74389766f3SMike Pritchardunless the environment variable
75389766f3SMike Pritchard.Ev EDITOR
76389766f3SMike Pritchardspecifies otherwise.
77389766f3SMike Pritchard.Pp
78dea673e9SRodney W. GrimesThe quotas may then be modified, new quotas added, etc.
79dea673e9SRodney W. GrimesSetting a quota to zero indicates that no quota should be imposed.
80dea673e9SRodney W. GrimesSetting a hard limit to one indicates that no allocations should
81dea673e9SRodney W. Grimesbe permitted.
82dea673e9SRodney W. GrimesSetting a soft limit to one with a hard limit of zero
83389766f3SMike Pritchardindicates that allocations should be permitted only on
84389766f3SMike Pritcharda temporary basis (see
85389766f3SMike Pritchard.Fl t
86389766f3SMike Pritchardbelow).
87dea673e9SRodney W. GrimesThe current usage information in the file is for informational purposes;
88dea673e9SRodney W. Grimesonly the hard and soft limits can be changed.
89389766f3SMike Pritchard.Pp
90dea673e9SRodney W. GrimesOn leaving the editor,
91389766f3SMike Pritchard.Nm
92dea673e9SRodney W. Grimesreads the temporary file and modifies the binary
93dea673e9SRodney W. Grimesquota files to reflect the changes made.
94389766f3SMike Pritchard.Pp
95dea673e9SRodney W. GrimesIf the
96389766f3SMike Pritchard.Fl p
97dea673e9SRodney W. Grimesoption is specified,
98389766f3SMike Pritchard.Nm
99dea673e9SRodney W. Grimeswill duplicate the quotas of the prototypical user
100dea673e9SRodney W. Grimesspecified for each user specified.
101dea673e9SRodney W. GrimesThis is the normal mechanism used to
102dea673e9SRodney W. Grimesinitialize quotas for groups of users.
103d172713dSMike PritchardIf the user given to assign quotas to is a numerical uid
104d172713dSMike Pritchardrange (e.g. 1000-2000), then
105389766f3SMike Pritchard.Nm
106d172713dSMike Pritchardwill duplicate the quotas of the prototypical user
107d172713dSMike Pritchardfor each uid in the range specified.  This allows
108d172713dSMike Pritchardfor easy setup of default quotas for a group of users.
109d172713dSMike PritchardThe uids in question do not have to be currently assigned in
110389766f3SMike Pritchard.Pa /etc/passwd
111389766f3SMike Pritchard.Pp
112389766f3SMike PritchardIf the
113389766f3SMike Pritchard.Fl g
114389766f3SMike Pritchardflag is specified,
115389766f3SMike Pritchard.Nm
116dea673e9SRodney W. Grimesis invoked to edit the quotas of
117dea673e9SRodney W. Grimesone or more groups specified on the command line.
118389766f3SMike PritchardThe
119389766f3SMike Pritchard.Fl p
120389766f3SMike Pritchardflag can be specified in conjunction with
121389766f3SMike Pritchardthe
122389766f3SMike Pritchard.Fl g
123389766f3SMike Pritchardflag to specify a prototypical group
124dea673e9SRodney W. Grimesto be duplicated among the listed set of groups.
125389766f3SMike Pritchard.Pp
126dea673e9SRodney W. GrimesUsers are permitted to exceed their soft limits
127dea673e9SRodney W. Grimesfor a grace period that may be specified per filesystem.
128dea673e9SRodney W. GrimesOnce the grace period has expired,
129dea673e9SRodney W. Grimesthe soft limit is enforced as a hard limit.
130dea673e9SRodney W. GrimesThe default grace period for a filesystem is specified in
131389766f3SMike Pritchard.Pa /usr/include/ufs/ufs/quota.h .
132389766f3SMike PritchardThe
133389766f3SMike Pritchard.Fl t
134389766f3SMike Pritchardflag can be used to change the grace period.
135389766f3SMike PritchardBy default, or when invoked with the
136389766f3SMike Pritchard.Fl u
137389766f3SMike Pritchardflag,
138dea673e9SRodney W. Grimesthe grace period is set for all the filesystems with user
139dea673e9SRodney W. Grimesquotas specified in
140389766f3SMike Pritchard.Pa /etc/fstab .
141389766f3SMike PritchardWhen invoked with the
142389766f3SMike Pritchard.Fl g
143389766f3SMike Pritchardflag the grace period is
144dea673e9SRodney W. Grimesset for all the filesystems with group quotas specified in
145389766f3SMike Pritchard.Pa /etc/fstab .
146dea673e9SRodney W. GrimesThe grace period may be specified in days, hours, minutes, or seconds.
147dea673e9SRodney W. GrimesSetting a grace period to zero indicates that the default
148dea673e9SRodney W. Grimesgrace period should be imposed.
149dea673e9SRodney W. GrimesSetting a grace period to one second indicates that no
150dea673e9SRodney W. Grimesgrace period should be granted.
151389766f3SMike Pritchard.Pp
152dea673e9SRodney W. GrimesOnly the super-user may edit quotas.
153389766f3SMike Pritchard.Sh FILES
154389766f3SMike Pritchard.Bl -tag -width quota.group -compact
155389766f3SMike Pritchard.It Pa quota.user
156389766f3SMike Pritchardat the filesystem root with user quotas
157389766f3SMike Pritchard.It Pa quota.group
158389766f3SMike Pritchardat the filesystem root with group quotas
159389766f3SMike Pritchard.It Pa /etc/fstab
160389766f3SMike Pritchardto find filesystem names and locations
161389766f3SMike Pritchard.El
162389766f3SMike Pritchard.Sh SEE ALSO
163389766f3SMike Pritchard.Xr quota 1 ,
164389766f3SMike Pritchard.Xr fstab 2 ,
165bfd34a4aSWolfram Schneider.Xr quotactl 2 ,
166389766f3SMike Pritchard.Xr quotacheck 8 ,
167389766f3SMike Pritchard.Xr quotaon 8 ,
168389766f3SMike Pritchard.Xr repquota 8
169389766f3SMike Pritchard.Sh DIAGNOSTICS
170dea673e9SRodney W. GrimesVarious messages about inaccessible files; self-explanatory.
171