LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-28-2008, 05:51 AM   #1
Carlos2dub
LQ Newbie
 
Registered: Aug 2007
Location: Madrid
Distribution: Debian 4, openSUSE 10.3, RHEL 5
Posts: 24

Rep: Reputation: 15
boot script executed in specific user environment


Hello,

Im trying to load a background process from a boot script that I have in /etc/init.d/script

The case is that I need this process to run on the environment of a specific user. Any ideas of how can I perform this?

I use debian.

Thanks for your help,
Carlos.
 
Old 05-28-2008, 06:49 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Use something like 'su -c /path/to/binary username' in your initscripts case "start" statement.

Last edited by unSpawn; 05-28-2008 at 06:51 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script executed inside another script dont make changes potraike Linux - Newbie 4 03-05-2008 05:27 AM
run a specific script with root privilege as any user(possibly with ssh) z940303 Programming 5 09-05-2007 08:20 PM
Script is executed when user logout karthi26 Linux - Newbie 10 07-12-2007 07:26 AM
script in crontab do not execute or take proper environment of user mayank_a Linux - Server 1 07-02-2007 05:03 AM
Specific Crontab Job is not executed . Itsik Harel Linux - Server 1 03-11-2007 09:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration