Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3972
  • Last Modified:

Having problems with sudo on AIX 5.3

I am having problems getting sudo running properly on an AIX 5.3 system. Here are the specifics of my install:

sudoers file located at /etc/sudoers

output of ls -al /etc/sudoers
-r--r-----   1 root     system          155 Oct 17 21:04 sudoers

contents of sudoers file:

/etc >cat sudoers
Defaults logfile=/var/log/sudolog

jkb     msoadvprod = NOPASSWD: /usr/bin/kill, /page/cmd/killusr
rkh     msoadvprod = NOPASSWD: /usr/bin/kill, /page/cmd/killusr

location of sudo binary:
/usr/local/bin

permission on sudo
---s--x--x   1 root     system       147460 Mar 11 2006  sudo

Here is the PATH statement in my /etc/environment file
PATH=/page/cmd:/met/sy/vics_cmd:/usr/java131/bin:/metbin:/met/sy/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/local/bin:/home/UPSHostAccess:/home/UPSHostAccess/test:/usr/local/sbin:.

Here is the PATH statement from my .profile file
PATH=:/met/sy/vics_cmd:/usr/java131/bin:/page/cmd:/metbin:/met/sy/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/bin:/usr/local:/met/sy/cmd:/u/cmd:/met/sy/cmd:/u/wp/bin:/u/wp/sbin:/page/cmd:/usr/bin:/usr/local/bin:.


When I try calling sudo like this:
$ sudo -u rkh /page/cmd/killusr lvv

The result is:
rkh is not allowed to run sudo on coloadv1.  This incident will be reported.

Any suggestions for me please?







0
holmesrk
Asked:
holmesrk
2 Solutions
 
ozoCommented:
rkh     coloadv1 = NOPASSWD: /usr/bin/kill, /page/cmd/killusr
0
 
TintinCommented:
You are calling sudo to run the command as the rkh user.  You should be using the format

sudo /page/cmd/killusr lw

As ozo's says, correct the host it can run on, or make it more generic, ie:

rkh     ALL = NOPASSWD: /usr/bin/kill, /page/cmd/killusr

Note that you can list the sudo commands you have privs for by doing

sudo -l
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now