Swati, You should try with root, splunk user doesn't have root permissions else add splunk user as NOPASSWD in sudoers file with root user as below and try again
vi /etc/sudoers ( with root user)
XXX ALL=(ALL) NOPASSWD:ALL here XXX is user name.
hope it should work 🙂
-Om
... View more