1833325 Members
3172 Online
110051 Solutions
New Discussion

Re: sudo

 
SOLVED
Go to solution
Wamaitha
Frequent Advisor

sudo

hello, me again, the novice.i have looked through all the answers and i cannot seem to get the answer for this. I have downloaded sudo from the hp website, i have tried to install it, but have not been successful. the file is .depot. any suggestions will be gladdly appreciated.
thanks in advance.
23 REPLIES 23
Jeff_Traigle
Honored Contributor

Re: sudo


How did you try to install it? What error did you get? Should just be:

swinstall -s full_path_to_depot_file \*
--
Jeff Traigle
Paul Sperry
Honored Contributor

Re: sudo

Or just type in :

swinstall

and a GUI will pop up.
Steven E. Protter
Exalted Contributor

Re: sudo

Shalom Wamaitha,

All is well. There is a permissions problem on the sudo executable.

By default the suid is not set on the executable, generating an installation error.

If you change the permissions to suid, sudo will start to work without re-installation.

whence sudo

chmod 4755

I'm not sure about the chmod, but the log in the swinstall will show you exactly whtat the problem is.

SEP
In the USA
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Wamaitha
Frequent Advisor

Re: sudo

i saved the file to my desktop than ftped the file:ixSudo_A.06.00-1.6.8p12_HP-UX_B.11.11_32+64.depot to the hp server. i tried running swinstall, when the GUI is displayed, that depot is not there.
the above file is in the tmp/tmpdepot directory.
permissions on the file are: -rw-r-----
thanks in advance
Paul Sperry
Honored Contributor

Re: sudo

you have to type in the path to the file

/some/dir/file.depot
Patrick Wallek
Honored Contributor
Solution

Re: sudo

You can try installing from the command line:

# swinstall -s /tmp/tmpdepot/filename \*
Wamaitha
Frequent Advisor

Re: sudo

Patrick, did as you recommended how the million dollar question is where did it install ther software, cause i do not see a log. sorry if the question is simply, just trying to understand. if anyone as step by step instructions for downloading sudo, please do share. thanks in advnace.
ps: looked through itrc and did not find what i was looking.
asante.
Patrick Wallek
Honored Contributor

Re: sudo

It probably installed to:

/usr/local/bin/sudo
/usr/local/sbin/visudo
/usr/local/etc/sudoers
/usr/local/man* -- for man pages

Verify the permissions on /usr/local/bin/sudo. They should be: -r-s--x--x. If they are not you can do a 'chmod 4511 /usr/local/bin/sudo'.

Mani K
Occasional Advisor

Re: sudo

hi ,

When you ftp the depot file from your windows desktop to Unix server , try to do with binary mode. This would not add unnecessary control characters to the depot file.

Try it out..

Never Say Can't.........................
Wamaitha
Frequent Advisor

Re: sudo

Patrick, teh sudo directory or file does not exist.
Mani, when i do ftp i do use binary. sorry to be a bother, but i am not able to do an install of the file that i downloaded from the HP website,
thanks in advance.
Patrick Wallek
Honored Contributor

Re: sudo

I didn't realize you had downloaded from HP, sorry. I *think* the HP sudo may be installed somewhere in the /opt directory.

To find it, try this:

# find /opt -name "sudo*" -exec ll -d {} \;

This will show you anything in /opt with sudo in the name.
Wamaitha
Frequent Advisor

Re: sudo

Patrick, here is the info that it found with the command:
dr-xr-xr-x 9 bin bin 8192 Feb 17 14:31 /opt/iexpress/sudo
-rw-r--r-- 1 bin bin 608 Nov 13 23:39 /opt/iexpress/sudo/etc/sudoers
dr-xr-xr-x 3 bin bin 96 Feb 17 14:31 /opt/iexpress/sudo/newconfig/opt/iexpress/sudo
-rw-r--r-- 1 bin bin 608 Nov 13 23:39 /opt/iexpress/sudo/newconfig/opt/iexpress/sudo/etc/sudoers
-r--r--r-- 2 bin bin 25829 Nov 13 23:39 /opt/iexpress/sudo/man/man1m/sudo.1m
-r--r--r-- 2 bin bin 25829 Nov 13 23:39 /opt/iexpress/sudo/man/man1m/sudoedit.1m
-r--r--r-- 1 bin bin 57563 Nov 13 23:39 /opt/iexpress/sudo/man/man4/sudoers.4
---s--x--x 2 root root 176128 Nov 13 23:39 /opt/iexpress/sudo/bin/sudoedit
---s--x--x 2 root root 176128 Nov 13 23:39 /opt/iexpress/sudo/bin/sudo
-r-xr-xr-x 1 bin bin 16384 Nov 13 23:39 /opt/iexpress/sudo/libexec/sudo_noexec.sl
-r--r--r-- 1 bin bin 700639 Nov 14 01:19 /opt/iexpress/sudo/src/sudo-1.6.8p12.tar.gz
Patrick Wallek
Honored Contributor

Re: sudo

OK, sudo was installed in the /opt/iexpress/sudo directory structure.

Your main sudo executable is /opt/iexpress/sudo/bin/sudo. The 'sudoedit', which is used to edit your sudoers file is /opt/iexpress/sudo/bin/sudoedit.

Hopefully this will get you started with sudo.
Wamaitha
Frequent Advisor

Re: sudo

hello, not to be daft or anything, i presume that i can now use sudo once i make the necessary changes to the sudoers file using visudo right??
thanks in advance
Patrick Wallek
Honored Contributor

Re: sudo

Yes, that is correct.

To make things easier, be sure and add /opt/iexpress/sudo/bin to your PATH. If all users on the system are going to use sudo, it would be easiest to add it via the /etc/PATH file.
Bill Hassell
Honored Contributor

Re: sudo

sudo and visudo will not be found until your PATH is updated. Since /etc/PATH is updated automatically as part of the swinstall task, you'll need to log out and log back in again to see the new PATH.


Bill Hassell, sysadmin
Wamaitha
Frequent Advisor

Re: sudo

thanks to all, just one more question, i promise, i guess i am stamped because should i change current directory that sudo resides.
thanks
Arunvijai_4
Honored Contributor

Re: sudo

Hi,

No need to change the current directory for Sudo, since while compiling it may be hard coded.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Bill Hassell
Honored Contributor

Re: sudo

No, the purpose of the PATH variable (just like DOS and all other Unix flavors) is to allow typing just the command name (ie, sudo) rather than /opt/whatever. If you change to the sudo bin directory *and* your PATH does not contain the current working directory (ie, the . directory), you still have to type ./sudo to start the program. This is basic program security for executables.


Bill Hassell, sysadmin
Wamaitha
Frequent Advisor

Re: sudo

Thank you all for your help and guidance. much appreciated. found sudo on the system and will not change the path that sudo is in right now.
as always

Asante.


ps: just reopened due to errors that i was having.thanks in advance.
Wamaitha
Frequent Advisor

Re: sudo

sorry i closed the thread to soon, i have made the necessary changes to sudoers, i have modified my .profile. by adding the path that sudo is located:
/opt/iexpress/sudo/bin/sudo
i am getting the below error:
>sudo
usage: sudo -K | -L | -V | -h | -k | -l | -v
usage: sudo [-HPSb] [-p prompt] [-u username|#uid]
{ -e file [...] | -i | -s | }
>sudo -su root
/usr/bin/ksh: root: cannot open
thanks in advance
Patrick Wallek
Honored Contributor

Re: sudo

In your first try, by just doing 'sudo' at the command line, there is nothgin for sudo to do so you just get the sudo help.

In your second attempt, that is an invalid command (sudo -su root). If you are trying to su and become root then the syntax is:

$ sudo su -

(The root at the end of the command is not needed. If no user name is given after the '-' then root is automatically assumed.)
Wamaitha
Frequent Advisor

Re: sudo

thanks Patrick