1832891 Members
2480 Online
110048 Solutions
New Discussion

Re: asroot command

 
Tomek_1
Advisor

asroot command

Hi
I'd like to know is there any command like asroot (in SCO) to execute some command (like shutdown or kill) as user root

Rgds
4 REPLIES 4
Jean-Luc Oudart
Honored Contributor

Re: asroot command

For some specific functions we had to write a small "C" pgm that calls the command / script.
We then change the set owner bit (chmod +s) to become this user.
In some instances we have to call the setuid() function in the "C" pgm.

We put ACLs on the executable.

This works fine.

Jean-Luc
fiat lux
Pete Randall
Outstanding Contributor

Re: asroot command

You should look into "sudo", available from the porting and archive center.

Pete

Pete
steven Burgess_2
Honored Contributor

Re: asroot command

Hi

There are no specific commands but

To allow a user to shut the system down you can use the sam builder to assign some of the sam functions to a user. As root run sam -r

Unix uses SUID and SGID bits on file permissions to all the users executing a command to have priviliges of root for the time the command is executed

for eg

The passwd command

-r-sr-xr-x 1 root bin 86016 Jan 9 1998 /usr/bin/passwd

Has the SUID set which allows the user to have the priviliges of the owner and modify the /etc/passwd file

HTH

Steve
take your time and think things through
Pete Randall
Outstanding Contributor

Re: asroot command

Here's the "sudo" url for you:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.6/

Pete

Pete