Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Oct 2002 22:08:59 +0000
From:      Ceri Davies <ceri@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/44797: edquota -p only changes first username or first uid given
Message-ID:  <E187NUp-0003id-00@rhadamanth.submonkey.net>

next in thread | raw e-mail | index | archive | help

>Number:         44797
>Category:       bin
>Synopsis:       edquota -p only changes first username or first uid given
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 31 14:10:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ceri Davies
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD shaft.techsupport.co.uk 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Oct 25 10:56:23 BST 2002 setantae@shaft.techsupport.co.uk:/usr/obj/usr/src/sys/SHAFT i386


	
>Description:
	From edquota(8):
		edquota [-u] [-f fspath] [-p proto-username] username ...

	This in fact only works for the first "username" given.

>How-To-Repeat:
	{root@shaft}-{~} # pw useradd quota100
	{root@shaft}-{~} # pw useradd quota101
	{root@shaft}-{~} # pw useradd quota102
	{root@shaft}-{~} # edquota -u -e /dev/ad0s1g:1024:2048 quota100
	{root@shaft}-{~} # quota -v quota100
	Disk quotas for user quota100 (uid 1026): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048               0       0       0        
	{root@shaft}-{~} # edquota -p quota100 quota101 quota102
	{root@shaft}-{~} # quota -v quota100
	Disk quotas for user quota100 (uid 1026): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048               0       0       0        
	{root@shaft}-{~} # quota -v quota101
	Disk quotas for user quota101 (uid 1027): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048               0       0       0        
	{root@shaft}-{~} # quota -v quota102
	Disk quotas for user quota102 (uid 1028): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0       0       0               0       0       0        
	{root@shaft}-{~} #

	This also fails with uid's:

	{root@shaft}-{~} # pw useradd quota100 -u 2000
	{root@shaft}-{~} # pw useradd quota101 -u 2001
	{root@shaft}-{~} # pw useradd quota102 -u 2002
	{root@shaft}-{~} # edquota -u -e /home:1024:2048 2000
	{root@shaft}-{~} # quota -v quota100
	Disk quotas for user quota100 (uid 2000): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048               0       0       0        
	{root@shaft}-{~} # edquota -p 2000 2001 2002
	{root@shaft}-{~} # quota -v quota101
	Disk quotas for user quota101 (uid 2001): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048               0       0       0        
	{root@shaft}-{~} # quota -v quota102
	Disk quotas for user quota102 (uid 2002): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0       0       0               0       0       0        

	But works when an actual range is specified:

	{root@shaft}-{~} # edquota -u -e /home:0:0 2001
	{root@shaft}-{~} # edquota -p 2000 2001-2002
	{root@shaft}-{~} # quota -v quota101
	Disk quotas for user quota101 (uid 2001): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048               0       0       0        
	{root@shaft}-{~} # quota -v quota102
	Disk quotas for user quota102 (uid 2002): 
	     Filesystem   usage   quota   limit   grace   files   quota   limit   grace
	          /home       0    1024    2048
	
	The manual does state:

	If the -p option is specified, edquota will duplicate the quotas of the
	prototypical user specified for each user specified.

	It seems that the -p option requires a range of uid's, and does not
	work when either a list of usernames or a list of uid's is presented.

>Fix:

	This may just be a documentation bug.

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E187NUp-0003id-00>