Operating System - HP-UX
1758546 Members
2058 Online
108872 Solutions
New Discussion юеВ

Problem with sudo on 11.23

 
SOLVED
Go to solution
Aydin Tasdeler
New Member

Problem with sudo on 11.23

Hi.

I'm having an issue with getting sudo to work on 11.23

I have tried 2 methods so far both without success.

Method 1. the quick and easy..(hehe)
I have another 11.23 machine which is running sudo fine in another environment. I decided to copy over the sudo , visudo , and sudoers table form one to the other .. ensuring that paths, ownerships , permissions on the files were in the identical places as the source machine.

Upon executing /usr/local/bin/sudo I get the error
sh: /usr/local/bin/sudo: Execute permission denied.
same with visudo
sh: /usr/local/sbin/visudo: Execute permission denied.

I am root and the perms are set how they should be .. sudo 4111 and visudo is 111

So having no success I decided to use method 2.

Method 2.
I removed everything I did so far... I downloaded the hpux 11.23 depot file from this link
http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/

I then installed the depot using swinstall -s

the package installed without any errors and sudo was on the system.

Again I tried to execute /usr/local/bin/sudo and /usr/local/sbin/visudo with exactly the same error as above.

I tried changing shell from sh to ksh .. and that gives a "cannot execute" error.

I'm not sure where the issue is here. If anyone can help me I would appreciate it.

I even tried creating a tesfile in /usr/local/bin and /usr/local/sbin/ with the same permissions and that can execute without any problems.

What am I missing here ? and where should I look .

Thanks
Aydin.
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: Problem with sudo on 11.23

What are the permissions on the directories leading to sudo?

# ll -d /usr /usr/local /usr/local/sbin

Also post:

# ll /usr/local/sbin/sudo
Patrick Wallek
Honored Contributor

Re: Problem with sudo on 11.23

I just had another thought....

What type of machine is this? Is it a PA-RISC or Itanium based machine running 11.23?

What type is the machine that is running sudo successfully?

If they are of different architecture, then you might get an error similar to what you see.

# model

# file /usr/local/sbin/sudo

Post the results, please.
Aydin Tasdeler
New Member

Re: Problem with sudo on 11.23

Here is the information you have requested.

The machine that was the source in Method 1 was a 164 rx7620. not the same as this new machine... so if the arc is the issue why did method 2 fail also?

# ll -d /usr /usr/local/bin
dr-xr-xr-x 24 bin bin 8192 Jun 9 10:49 /usr
dr-xr-xr-x 2 bin bin 8192 Oct 13 12:33 /usr/local/bin
# ll /usr/local/bin/sudo
---s--x--x 2 root root 209980 Jul 12 09:36 /usr/local/bin/sudo
# model
9000/800/L2000-44
# file /usr/local/bin/sudo
/usr/local/bin/sudo: ELF-32 executable object file - IA64



Patrick Wallek
Honored Contributor
Solution

Re: Problem with sudo on 11.23

The key is this:
/usr/local/bin/sudo: ELF-32 executable object file - IA64

Specifically the IA64 at the end. This is an Itanium executable.

Your 2nd method failed because the version you downloaded was built for 11.23 on Itanium and NOT 11.23 on PA-RISC.

If you notice the "Architecture" column on this page:
http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.8p9/

You will see that it says Itanium 2.

You will probably need to download the source code and compile it yourself.

Remember that Itanium machines CAN run PA-RISC apps, BUT PA-RISC machines CAN NOT run Itanium apps.


Don Morris_1
Honored Contributor

Re: Problem with sudo on 11.23


# model
9000/800/L2000-44
# file /usr/local/bin/sudo
/usr/local/bin/sudo: ELF-32 executable object file - IA64



Well, there's your problem. 9000/800/L2000-44 means that this is a PA-RISC 11.23 box. You're trying to run an IPF binary on it. There's no PA emulator for IPF on 11.23. Get the depot marked 11.11 (http://gatekeep.cs.utah.edu/ftp/hpux/Sysadmin/sudo-1.6.8p9/sudo-1.6.8p9-hppa-11.11.depot.gz)
instead and try that. 11.11 binaries should run on 11.23... (it worked on my development box that's running something a little later, so I doubt 11.23 is a problem), keep in mind I just installed the depot -- didn't create the sudoers file or anything:

# which sudo
/usr/local/bin/sudo
# file /usr/local/bin/sudo
/usr/local/bin/sudo: PA-RISC2.0 shared executable dynamically linked
# sudo
sudo: can't stat /etc/sudoers: No such file or directory
# Oct 13 09:47:29 vmpamed2 sudo: root : can't stat /etc/sudoers: No such file or directory ; TTY=pts/0 ; PWD=/tmp ; USER=root ; COMMAND=/sbin/sh
Aydin Tasdeler
New Member

Re: Problem with sudo on 11.23

ah ... yes I see now.


ok .. Ill try to complie using the source code.


thanks for your help!
Aydin Tasdeler
New Member

Re: Problem with sudo on 11.23

I installed the 11.11 package for PA RISC and that worked like a charm.
Patrick Ware_1
Super Advisor

Re: Problem with sudo on 11.23

Here is another place that you can get porting updates from:

http://hpux.connect.org.uk/

and more specifically:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p9/