I have to write a script that would allow non root user to display LVM info. I have allowed that user in sudoer file but still not able to run that command returning with following error.
WARNING: Running as a non-root user. Functionality may be unavailable. /run/lock/lvm/P_global:aux: open failed: Permission denied Unable to obtain global lock.
If I run this command from using sudo
Sorry, user farooq is not allowed to execute '/sbin/pvdisplay' as root on localhost.
Can anyone help me.