Operating System - Linux
1753781 Members
7568 Online
108799 Solutions
New Discussion юеВ

sudo-1.6.8p9-sd-11.11.depot installation and running problem

 
SOLVED
Go to solution
Rakesh Kapoor
Advisor

sudo-1.6.8p9-sd-11.11.depot installation and running problem

Hi,
I just swinstalled the "sudo-1.6.8p9-sd-11.11.depot" package under HP-UX 11.11. It did not create any files except the following:
/usr/local/bin/sudo
/usr/local/bin/sudoedit
/etc/sudoers
I edited the sudoers and made the changes following the instructions. When tried to invoke "sudo -u user/sudo user", it does not work and complains about " sudo command not found" even though everything is set properly for path search.
Seems like either it's not being installed correctly by the swinstall or I am missing some files which swinstall did not create. On 11.00, version 1.6 it did create some directories like bin, doc ,etc, man and sbin.
I am unable to test the sudo under the new version (11.11..RISC processor).
Any information on instaaltion, files, configuration and proper command use will help. What's wrong with this depot? Never had a problem with anyother depot from HP. Tried to compile the tar file but that failed on "make" step. So back to the depot option.
Need help.
Thanks
RK
13 REPLIES 13
RAC_1
Honored Contributor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

Use sudoedit to edit /etc/sudoers file.
Then can you do as follows.
type sudo
which sudo

Does it point to /usr/local/bin/sudo (confirming that it is in yuor path.)
There is no substitute to HARDWORK
Uday_S_Ankolekar
Honored Contributor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

sudo, it usually get installed in /usr/local/bin. If this directory is in exported PATH then usually you should be able to run sudo.

-USA..
Good Luck..
Rakesh Kapoor
Advisor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

Same problem. Here is the output from the command:
*************************88

hsgccu03:/home/kapoorrk$ type sudosudo is /usr/local/bin/
sudohsgccu03:/home/kapoorrk$ which sudo /usr/local/bin/sudo

hsgccu03:/home/kapoorrk$ sudo kapoorrk
sudo: kapoorrk: command not found

*****************************

Any ideas what I am doing wrong?

Thanks again.
RAC_1
Honored Contributor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

There is no problem with sudo.
sudo is complaing that command kapoorrk is not found. what is this kapoork command
do following.

sudo

kapoork

Anil
There is no substitute to HARDWORK
Rakesh Kapoor
Advisor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

When I type just sudo, this is what I get:
hsgccu03:/home/kapoorrk$ sudo

usage: sudo -K | -L | -V | -h | -k | -l | -vusage: sudo [-HPSb] [-p prompt] [-u username|#uid] { -e file [...] | -i | -s | }
where kapoorrk is my login id.
So, typing sudo kapoorrk, generates "coomand not found error"
Thanks for looking into this.
Devender Khatana
Honored Contributor
Solution

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

Hi,

The sudo is working fine and is installed properly here. The command not found message indicates that the argument provided to sudo is not listed in the sudoers file. This can be also confirmed by the error log in /var/adm/syslog/syslog.log file.

Use visudo as root to edit sudoers file and then make entry for different users/groups as per syntax. Use "sudo -l" to list the commands for that user in sudo and then try running that command.
Something like.

Extract from my sudoers file.
=========================
test myserver101=/usr/bin/rlogin,/usr/lbin/remshd,/usr/sbin/cmviewcl

============================
#sudo -l
User test may run the following commands on this host:
(root) /usr/bin/rlogin
(root) /usr/lbin/remshd
(root) /usr/sbin/cmviewcl
$/home/test:/>sudo /usr/bin/rlogin mydb101
Password:

The output of the command.

HTH,
Devender
Impossible itself mentions "I m possible"
Patrick Wallek
Honored Contributor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

Is the command / script kapoork in your path? Is that a command at all? What exactly are you attempting to do?

sudo is usually used to run some command as root. Normal syntax is 'sudo command'. What the message you are getting is saying is that it cannot find the command kapoorrk. That command, if it is one, has to be available via the PATH or you must fully qualify it.
Rakesh Kapoor
Advisor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

Hi everyone,

Thanks to all of you. Sudo is running OK but still does not prompt for the user password. The usage for sudo, used to be " sudo -u username".
Following is the entry I am using for the user "kapoorrk" in sudoers file:

kapoorrk ALL=(ALL) ALL

and was expecting the system to force the user to enter his password.

?????

Thanks.
This form is great!

RK
Patrick Wallek
Honored Contributor

Re: sudo-1.6.8p9-sd-11.11.depot installation and running problem

You are misinterpreting the usage of the '-u username' option.

The '-u username' tells sudo to run whatever command you specify as that username, instead of root.

So if you did:

$ sudo -u user2 somecommand

sudo would then run the command 'somecommand' as the user user2.

In your case since kapoorrk is an actual user name, and you have that user specified in the sudoers file as allowed to run anything, you would login as the user kapoorrk and THEN use sudo to run commands as root.

$ id
uid=1234(kapoorrk) gid=whatever....
$ sudo somecommand
Password:

If you login as user kapoorrk, then issue the sudo command as above sudo will then run the command 'somecommand' as user root if you entered the password correctly. This is the usual usage of sudo.

Have a look at the sudo man page for more info. If you don't have the sudo man page, have a look at:

http://www.gratisoft.us/sudo/man/sudo.html