User context for init.d scripts
Posted: Mon Jan 10, 2011 3:10 am
Hello,
I'm a little confused with regards to the scripts in init.d. In which context are they executed?
I have a script with some commands. I cannot execute those commands from shell as user, but only as root. The script however seems to work fine once put into init.d.
Googled for it but found contradicting answers here as well. Some claim the context for init.d is root, others say su is needed. It seems the majority thinks that init.d is owned and executed by root, but still I would be glad if someone could clarify this.
Then again, the script used here http://wiki.amahi.org/index.php/Mount_Shares_Locally requires an input file with root credentials - why?
Thanks,
jayrock
I'm a little confused with regards to the scripts in init.d. In which context are they executed?
I have a script with some commands. I cannot execute those commands from shell as user, but only as root. The script however seems to work fine once put into init.d.
Googled for it but found contradicting answers here as well. Some claim the context for init.d is root, others say su is needed. It seems the majority thinks that init.d is owned and executed by root, but still I would be glad if someone could clarify this.
Then again, the script used here http://wiki.amahi.org/index.php/Mount_Shares_Locally requires an input file with root credentials - why?
Thanks,
jayrock