From owner-freebsd-questions@FreeBSD.ORG Sat Feb 7 17:44:03 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DF6C106564A for ; Sat, 7 Feb 2009 17:44:03 +0000 (UTC) (envelope-from corbesero@ptd.net) Received: from pm15.mailnet.ptd.net (pm15.mailnet.ptd.net [204.186.29.107]) by mx1.freebsd.org (Postfix) with ESMTP id 0216B8FC0C for ; Sat, 7 Feb 2009 17:44:02 +0000 (UTC) (envelope-from corbesero@ptd.net) Received: (qmail 25700 invoked by uid 50005); 7 Feb 2009 17:17:21 -0000 Received: from 70.15.4.195.res-cmts.sm.ptd.net by pm15.mailnet.ptd.net (envelope-from , uid 50002) with qmail-scanner-2.02 (clamdscan: 0.94.2/8940. Clear:RC:1(70.15.4.195):. Processed in 0.022532 secs); 07 Feb 2009 17:17:21 -0000 Received: from 70.15.4.195.res-cmts.sm.ptd.net (HELO ptd.net) (authenticated:corbesero@[70.15.4.195]) (envelope-sender ) by pm15.mailnet.ptd.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 7 Feb 2009 17:17:21 -0000 Received: from frodo.corbesero.net (frodo.corbesero.net [192.168.201.31]) by corbesero.net (8.14.2/8.14.1) with ESMTP id n17HHJDH056158; Sat, 7 Feb 2009 12:17:19 -0500 (EST) (envelope-from flash@mailhost.corbesero.net) Received: from frodo.corbesero.net (localhost.localdomain [127.0.0.1]) by frodo.corbesero.net (8.13.8/8.13.8) with ESMTP id n17HHJls022815; Sat, 7 Feb 2009 12:17:19 -0500 Received: (from flash@localhost) by frodo.corbesero.net (8.13.8/8.13.8/Submit) id n17HHJqw022814; Sat, 7 Feb 2009 12:17:19 -0500 Date: Sat, 7 Feb 2009 12:17:19 -0500 From: Stephen Corbesero To: Nicolas Letellier Message-ID: <20090207171719.GA22791@frodo.corbesero.net> References: <20090207130025.f2169029.nicolas@nicoelro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090207130025.f2169029.nicolas@nicoelro.net> User-Agent: Mutt/1.4.2.2i X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gimli.corbesero.net X-Virus-Scanned: ClamAV 0.94.2/8963/Sat Feb 7 00:53:02 2009 on gimli.corbesero.net X-Virus-Status: Clean Cc: FreeBSD Questions Subject: Re: edit users quota in a script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 17:44:03 -0000 Besides the -e switch to edquota as has already been mentioned, I used to make extensive use of the -p switch to use a prototype. For example, you could create a "fake" user (or group) named "q-typical", assign that user the quotas for a typical user, and then use edquota -p q-typical newuser to assign those quotas to the new user. You could maintain several prototypes for different classes of users or groups. On Sat, Feb 07, 2009 at 01:00:25PM +0100, Nicolas Letellier wrote: > Hello. > I use a script to create automatically my users (with pw, and mkdir, > etc...). I use quota, and I have to excute 'edquota -u user', and > enter quota informations. So, the process can not be > automaticated. And cannot be part of my script. I don't find > informations in edquota(8) manpages about editing user quota without > open a file. > Is an other solution exists? I'm looking for a solution in command > line (for my script). -- Stephen Corbesero It's always darkest Bethlehem, PA 18015 before pitch black. corbesero@ptd.net