UFS sudo -u admin repquota -au

Leander

Well-Known Member

Reaction score: 3
Messages: 264

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
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,022

The sudoers line you have says the user 'admin' is allowed to sudo(1) to root without using a password.
 
OP
Leander

Leander

Well-Known Member

Reaction score: 3
Messages: 264

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?
 
OP
Leander

Leander

Well-Known Member

Reaction score: 3
Messages: 264

... it will be changed to
Code:
admin  ALL = (root) NOPASSWD:/usr/sbin/repquota
as soon as I know it works.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,022

Yes, so admin is allowd to receive the same content of repquota -au as root does.
No, it says the user 'admin' is allowed to sudo to root. As in sudo repquota -au.
 
OP
Leander

Leander

Well-Known Member

Reaction score: 3
Messages: 264

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?! ;)
 
OP
Leander

Leander

Well-Known Member

Reaction score: 3
Messages: 264

UPDATE:

sudo repquota -au works when logged in as in su - admin while sudo -u admin repquota -au doesn't.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,741
Messages: 33,022

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.
 
Top