Operating System - HP-UX
1826502 Members
2162 Online
109693 Solutions
New Discussion

Re: privileges of init process

 
SOLVED
Go to solution
jose angel_3
New Member

privileges of init process

how can I execute the process init with an normal user (not root).

I try execute "init 2" and i received this message:

Could not send signal to "init"


thanks
3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: privileges of init process

Jose,

Stop and think about it - do you really want any user to be able to switch run levels? I don't think so.

You could look into sudo:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/


Pete

Pete
Graham Cameron_1
Honored Contributor
Solution

Re: privileges of init process

You can't.

init is always running (check out "ps -fp1").

When you run init from the command line you send a signal to the real init, and if you aren't root, you don't have permission to send the signal.

It would be extremely scary to think it could be otherwise. If any user could run "init 2", to bring he system down to level 2, there would be mayhem.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Mark Grant
Honored Contributor

Re: privileges of init process

You really don't want your users sending random signals to "init". If you want to achieve it yourself you can write a quick "C" wrapper around the command which you then set as SETUID or you use an application like "sudo" which you can get from here

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.7p5/
Never preceed any demonstration with anything more predictive than "watch this"