AIX 5.3 Using sudo to control smit

Does anyone have any experience using sudo to control smit on AIX 5.3?

These are the smit commands that I want certain users to execute:

# Cmnd alias specification
Cmnd_Alias SMIT = /bin/smit hacmp, \
/bin/smit pxdam, \
/bin/smit cl_lsuser, \
/bin/smit cl_users, \
/bin/smit cl_passwd

Specifically, I am having issues with smit cl_lsuser and smit cl_users. I get these messages:

0518-506 odmget: Cannot open object class HACMPnode
Check path name and permissions.
cl_lsuser: Unable to determine node list for the cluster.
0518-506 odmget: Cannot open object class HACMPlogs
Check path name and permissions.
The cluster log entry for cspoc.log could not be found in the HACMPlogs ODM.
Defaulting to log directory /var/hacmp/log for log file cspoc.log.

It looks like it is no longer running as root. Does anyone have any ideas? Any and all assistance would be greatly appreciated.

It may also be a problem with environment variables. Do you know if smit needs any particular settings in the environment?

1 Like

No, I don't know if smit needs any particular settings in the environment. Is there a way to determine that?

Hi,

You may want to take a look at this: Help -

1 Like

I do not think it is a good idea,
any time you can press F9 and you will get out to shell with root privileges.
Then whole idea to limit users to few smitty fast-paths does not have sense any more.

1 Like

Thanks everyone for your input! With your help, and others, I have been able to resolve this issue. To resolve the shell issue, I set environment variable SMIT_SHELL for root to 'n'. To resolve the other issues, I had to configure sudo to do 'su' to root and then execute the smit command, e.g., su - root -c /bin/smit hacmp.