Operating System - HP-UX
1826909 Members
3191 Online
109705 Solutions
New Discussion

Re: How to abtain ROOT perssion in a common user's shell?

 
happywolf
Occasional Contributor

How to abtain ROOT perssion in a common user's shell?

I'v a backup shell executed by a common user whose uid is 400. the shell includes some root command such as vgchange. I've tried "chmod +s backup_shell",but it doesn't function. I wonder how to give root permission to the user or how to allow it to execute vgchange?
thanks a lot.
11 REPLIES 11
Victor BERRIDGE
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Hi,
I think the best and safest way would be to use sudo, go and download it from your prefered HP Porting and Archive center...

Good luck

Victor
Robin Wakefield
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Hi,

You should think about using sudo to delegate root tasks. Have a look at:

http://www.courtesan.com/sudo

Rgds, Robin.
Rainer von Bongartz
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Only one safe way for me !
Download and install sudo and give this user the right to run this script with root permissions.

Installation and configuration of sudo is simple and straightforward.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Tim D Fulford
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

setuid to zero does not work, unless it is on an approgriate (c/c++) executale program. I'll endevour to get it for you but it may take me a while

Tim
-
Tim D Fulford
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Deshpande Prashant
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Hi
I would prefer to use sudo for such root activities by non-root users.

Check this for download.
http://www.rge.com/pub/admin/sudo/

Goodluck
Prashant Deshpande.
Take it as it comes.
linuxfan
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Hi,

well if you want to install sudo in swinstall format, you can grab it from

http://hpux.cs.utah.edu/hppd/hpux/SYsadmin/sudo-1.6.2b1

or if you want the source code and want to compile it yourself, grab it from

http://www.courtesan.com/sudo

Only drawback is the latest version is 1.6.3p7 while the one available from HP site is 1.6.2b1

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Wodisch
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Hello,

if you edit your script to have a first line like

#!/usr/bin/sh

then you can set the SUID bit for it!
But sudo is sooooo much better that you should go
for it - making a SUID script "safe" is rather tedious
and would make you a rather "unhappywolf" ;-)

HTH,
Wodisch
happywolf
Occasional Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Thank you all for so rapid response.but I cannot attach the website to get swinstall format sudo. can you help to get it and mail to caol@21cn.com or mycore@sina.com

http://hpux.cs.utah.edu/hppd/hpux/SYsadmin/sudo-1.6.2b1
Patrick Wallek
Honored Contributor

Re: How to abtain ROOT perssion in a common user's shell?

The hpux.cs.utah.edu site is apparently down. Here is another to try:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.2b1/
Frank Li
Trusted Contributor

Re: How to abtain ROOT perssion in a common user's shell?

Hi,happywolf,

After you download the file form hpux.cs.utah.edu , you should first gunzip it before you run swinstall . Note ,it is a zip file . if you download the file with ??.depot , first move it as *.depot.gz and use gunzip.


xli14
Hi Friend