cancel
Showing results for 
Search instead for 
Did you mean: 

editing sudo file

 
madhudeepan
Frequent Advisor

editing sudo file

$ /usr/sbin/cmviewcl
Permission denied to 127.0.0.1
cmviewcl: Cannot view the cluster configuration: Permission denied.
This user doesn't have access to view the cluster configuration.
------------------------------------
$ sudo /usr/sbin/cmviewcl
ksh: sudo: not found

----------------------------------------
i added entry for operator to do cluster status ,, but getting above msg
/>cat /etc/sudoers
User_Alias ADMINS = yal, bhav, murali
root ALL = (ALL) ALL
ADMINS ALL = NOPASSWD: ALL
operator ALL = NOPASSWD: /usr/lbin/modprpw , /usr/lbin/getprpw , /opt/OV/bin/OpC/ovc , /usr/sbin/cmviewcl
6 REPLIES
akarayil
Frequent Advisor

Re: editing sudo file

Login as root and Use '#visudo' command to edit sudo file.
sujit kumar singh
Honored Contributor

Re: editing sudo file

Hi

wht version of SG are you running,
you can ahve a look at the following parameters
USER_NAME
USER_HOST
USER_ROLE
in the cluster config file/package config file.
regards
sujit
Viney Kumar
Regular Advisor

Re: editing sudo file


HI madhu

just create a soft link of sudo and then try

#ln -s /usr/local/bin/sudo /usr/bin/sudo


As sujit worte, you can specefied the user name in configuraion file also


Regards
Viney Kumar
sujit kumar singh
Honored Contributor

Re: editing sudo file

hi


refer to page 226

http://docs.hp.com/en/B3936-90140/B3936-90140.pdf

USER_ROLE
USER_HOST
USER_NAME

you shall need to do a cmcheckconf and cmapplyconf to effect these changes.
regards
sujit
Michael Steele_2
Honored Contributor

Re: editing sudo file

Hi

a) sudo is in /usr/local/bin, so update your PATH env variable to include /usr/local/bin

b) what happens when you run
visudo -c ?
Support Fatherhood - Stop Family Law
Ralph Grothe
Honored Contributor

Re: editing sudo file

As others already wrote,
with "newer" version of SG you can define roles for non-root users to enable them to do (not full blown) cluster and package administration to varying degrees.
The role "monitor" already entitles to run the cmview* commands.

You could check if you get some output on e.g.

# cmviewconf|grep -iE '(access polic|user (name|host|role):)'

As for sudo

> $ sudo /usr/sbin/cmviewcl

as which user are you running this?
I assume as "operator" according to your sudoers entries.

Also as others already mentioned,
the sudo command is not in the user's ksh PATH.
Have you compiled your sudo installation from the sources?
Had you installed the Sudo package from the Internet Express bundle a symlink would have been created to point from /usr/bin/sudo like

# ll /usr/bin/sudo
lrwxr-xr-x 1 root sys 27 Mar 28 2006 /usr/bin/sudo -> /opt/iexpress/sudo/bin/sudo

You should also create such a symlink as root after you have found the location of your sudo's executable.

# find /usr /opt -type f -name sudo



Madness, thy name is system administration