[one-users] sudo setup on hosts using LVM

Shi Jin jinzishuai at gmail.com
Thu Nov 5 08:52:10 PST 2009


Hi there,

I think we have to enable the oneadmin user to run the lvm commands on
the host using LVM, right?
Currently, this works for me in the /etc/sudoer
oneadmin ALL=(ALL) NOPASSWD: /sbin/lv* *
However, this is not a very general case since there are other lvm
commands such as vgdisplay.
The fact that all those commands are aliases to the /sbin/lvm command
make it easy.
If we have
oneadmin ALL=(ALL) NOPASSWD: /sbin/lvm *
then we can run sudo lvm vgdisplay or any lvm command without password
as oneadmin.
However, this requires all the lvm commands executed in the format of
/sbin/lvm <command name> instead of the /sbin/<command name> directly.

Do you think this is a good way to setup the OpenNebula LVM code?
Thanks.
-- 
Shi Jin, Ph.D.



More information about the Users mailing list