1.\" $OpenBSD: edquota.8,v 1.11 2008/06/24 08:28:18 sobrado Exp $ 2.\" 3.\" Copyright (c) 1983, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" Robert Elz at The University of Melbourne. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. Neither the name of the University nor the names of its contributors 18.\" may be used to endorse or promote products derived from this software 19.\" without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" SUCH DAMAGE. 32.\" 33.\" from: @(#)edquota.8 8.1 (Berkeley) 6/6/93 34.\" $Id: edquota.8,v 1.11 2008/06/24 08:28:18 sobrado Exp $ 35.\" 36.Dd $Mdocdate: June 24 2008 $ 37.Dt EDQUOTA 8 38.Os 39.Sh NAME 40.Nm edquota 41.Nd edit user quotas 42.Sh SYNOPSIS 43.Nm edquota 44.Op Fl u 45.Op Fl p Ar proto-username 46.Ar username | uid ... 47.Nm edquota 48.Fl g 49.Op Fl p Ar proto-groupname 50.Ar groupname | gid ... 51.Nm edquota 52.Fl t 53.Op Fl u 54.Nm edquota 55.Fl g 56.Fl t 57.Sh DESCRIPTION 58.Nm edquota 59is a quota editor. 60By default, or if the 61.Fl u 62flag is specified, 63one or more users may be specified on the command line. 64If a numeric ID is given instead of a name, that UID/GID 65will be used even if there is not a corresponding ID in 66the 67.Pa /etc/passwd 68or 69.Pa /etc/group 70files. 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 on 93only a 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 edquota 101reads the temporary file and modifies the binary 102quota files to reflect the changes made. 103.Pp 104If the 105.Fl p 106flag is specified, 107.Nm edquota 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. 112.Pp 113If the 114.Fl g 115flag is specified, 116.Nm edquota 117is invoked to edit the quotas of 118one or more groups specified on the command line. 119The 120.Fl p 121flag can be specified in conjunction with 122the 123.Fl g 124flag to specify a prototypical group 125to be duplicated among the listed set of groups. 126.Pp 127Users are permitted to exceed their soft limits 128for a grace period that may be specified per filesystem. 129Once the grace period has expired, 130the soft limit is enforced as a hard limit. 131The default grace period for a filesystem is specified in 132.Pa /usr/include/ufs/ufs/quota.h . 133The 134.Fl t 135flag can be used to change the grace period. 136By default, or when invoked with the 137.Fl u 138flag, the grace period is set for all the filesystems with user 139quotas specified in 140.Pa /etc/fstab . 141When invoked with the 142.Fl g 143flag the grace period is 144set for all the filesystems with group quotas specified in 145.Pa /etc/fstab . 146The grace period may be specified in days, hours, minutes, or seconds. 147Setting a grace period to zero indicates that the default 148grace period should be imposed. 149Setting a grace period to one second indicates that no 150grace period should be granted. 151.Pp 152Only the superuser may edit quotas. 153.Sh FILES 154.Bl -tag -width quota.group -compact 155.It Pa quota.user 156at the filesystem root with user quotas 157.It Pa quota.group 158at the filesystem root with group quotas 159.It Pa /etc/fstab 160to find filesystem names and locations 161.El 162.Sh DIAGNOSTICS 163Various messages about inaccessible files; self-explanatory. 164.Sh SEE ALSO 165.Xr quota 1 , 166.Xr quotactl 2 , 167.Xr fstab 5 , 168.Xr quotacheck 8 , 169.Xr quotaon 8 , 170.Xr repquota 8 171