Start an application with the RC.D Scripts but under specific user
Hi to all... I need to be available to start an application each time the PC Starts... but I need to run it as an specific user rather than "root" how to I do that ? I mean told that the script that should strat the application "x or y" but not under root as it's processes owner ? Thanks b ye --ed
Linux User wrote:
Hi to all...
I need to be available to start an application each time the PC Starts... but I need to run it as an specific user rather than "root"
how to I do that ? I mean told that the script that should strat the application "x or y" but not under root as it's processes owner ?
/home/user/.profile -- Silviu Marin-Caea Systems Engineer Linux/Unix http://www.genesys.ro Phone +40723-267961
But... I then I will need to "login" in order to execute the application... and what I need it's to run it as soon as the Computer turns on (like all the rc.d run levels scrtipts) but I need that the application run's as if was owned by a user different than root. :( thanks !
Linux User wrote:
Hi to all... I need to be available to start an application each time the PC Starts... but I need to run it as an specific user rather than "root" how to I do that ? I mean told that the script that should strat the application "x or y" but not under root as it's processes owner ?
/home/user/.profile
-- Silviu Marin-Caea Systems Engineer Linux/Unix http://www.genesys.ro Phone +40723-267961
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
You can use su - <username> -c <command> syntax . Peter Linux User wrote:
But... I then I will need to "login" in order to execute the application... and what I need it's to run it as soon as the Computer turns on (like all the rc.d run levels scrtipts) but I need that the application run's as if was owned by a user different than root.
:(
thanks !
Linux User wrote:
Hi to all... I need to be available to start an application each time the PC Starts... but I need to run it as an specific user rather than "root" how to I do that ? I mean told that the script that should strat the application "x or y" but not under root as it's processes owner ?
/home/user/.profile
-- Silviu Marin-Caea Systems Engineer Linux/Unix http://www.genesys.ro Phone +40723-267961
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
-- Overflow on /dev/null, please empty the bit bucket.
Linux User wrote:
But... I then I will need to "login" in order to execute the application... and what I need it's to run it as soon as the Computer turns on (like all the rc.d run levels scrtipts) but I need that the application run's as if was owned by a user different than root.
Ok, then. Make an /etc/init.d/whatever script and put this in it: su --login --command=application user Look at /etc/init.d/skeleton to make a better script. -- Silviu Marin-Caea Systems Engineer Linux/Unix http://www.genesys.ro Phone +40723-267961
It works great !! Thanks to all !!!
Linux User wrote:
But... I then I will need to "login" in order to execute the application... and what I need it's to run it as soon as the Computer turns on (like all the rc.d run levels scrtipts) but I need that the application run's as if was owned by a user different than root.
Ok, then.
Make an /etc/init.d/whatever script and put this in it:
su --login --command=application user
Look at /etc/init.d/skeleton to make a better script.
-- Silviu Marin-Caea Systems Engineer Linux/Unix http://www.genesys.ro Phone +40723-267961
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wednesday 06 November 2002 14.34, Silviu Marin-Caea wrote:
Linux User wrote:
But... I then I will need to "login" in order to execute the application... and what I need it's to run it as soon as the Computer turns on (like all the rc.d run levels scrtipts) but I need that the application run's as if was owned by a user different than root.
Ok, then.
Make an /etc/init.d/whatever script and put this in it:
su --login --command=application user
Look at /etc/init.d/skeleton to make a better script.
SuSE's init scripts use startproc to launch processes. Have you tried using the -u flag to startproc?
participants (4)
-
Anders Johansson
-
Linux User
-
Peter van Eck
-
Silviu Marin-Caea