UFS sudo -u admin repquota -au

Why does
root@Storage-03 # sudo -u admin repquota -au not list anything, while
root@Storage-03 # repquota -au does?

Code:
  Block  limits  File  limits
User  used  soft  hard  grace  used  soft  hard  grace
root  -- 1049344  0  0  -  18003  0  0  -
daemon  --  12  0  0  -  3  0  0  -
operator  --  8  0  0  -  2  0  0  -
man  --  500  0  0  -  125  0  0  -
smmsp  --  8  0  0  -  2  0  0  -
unbound  --  4  0  0  -  1  0  0  -
uucp  --  4  0  0  -  1  0  0  -
auditdistd  --  8  0  0  -  2  0  0  -
nobody  --  0  0  0  -  1  0  0  -

According to my understanding and testing, sudo should be configured correctly:
Code:
admin  ALL = (root) NOPASSWD:ALL
 
The sudoers line you have says the user 'admin' is allowed to sudo(1) to root without using a password.
 
Yes, so admin is allowd to receive the same content of repquota -au as root does. But why does admin still not get any content when executing repquota -au, while root does?
 
... it will be changed to
Code:
admin  ALL = (root) NOPASSWD:/usr/sbin/repquota
as soon as I know it works.
 
Ok, but I still don't get my mistake - sorry ;)
  • User admin is logged in via su - admin
  • so now I want admin to sudo to root in order to receive same content as it would be serving as when I execute repquota as user root: admin@Storage-03 [~]$ sudo repquota -au
Could you explain what I am missing here - cause I really don't seem to get your point?! ;)
 
UPDATE:

sudo repquota -au works when logged in as in su - admin while sudo -u admin repquota -au doesn't.
 
The command sudo -u admin repquota -au changes to the user 'admin', then executes repquota -au. The command sudo repquote -au changes to the user 'root', then exectutes repquota -au. Subtle difference.
 
Back
Top