Re: Root Script (Was No Subject)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I want a process to be running with root privileges, without providing the
> root password. Since i have my process in a remote machine. I want it such
> that, as soon as the system boots up, my process should be running with
> root privilege. Is there any way in which i can attain it?
> Is there any possibility of forking c program as a child process of init
> process.
> If so please guide me on how to do it.
>
> Thank You
>
> --
> *Regards
> Shreyas.M

Well I'm assuming you do have root access to this remote machine? If
that's the case then it could be as simple (if I have understood your
request correctly) as:

1) Log on to the remote machine
2) "su -" + password to attain root privilages
3) create your script (eg: /root/myscript.sh)
4) make it executable "chmod +x /root/myscript.sh"

and then - if you want to have it started at boot time you could put this
in crontab:
5) still as root do "crontab -e" and put in the line:
"@reboot /root/myscript.sh"

NOTE: All the above commands to be entered WITHOUT quotation marks ""

HTH

Mark






-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux