LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-03-2006, 04:35 PM   #1
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Rep: Reputation: 30
How to run startup script/daemon as a user other than root?


Suppose I have a script or daemon to run as runlevel 2 upon booting up, how do I configure the daemon to run as userA (assuming userA is not the owner of the file)? Do I need to su as userA after logon and restart the daemon / script each time after the system reboot so that it will run as userA?

Thanks for the help !
 
Old 02-03-2006, 06:11 PM   #2
bogoda
Member
 
Registered: Jan 2006
Posts: 32
Blog Entries: 2

Rep: Reputation: 15
hi Akhran,

Try to search inside Linux-newbie forum using keyword Daemon.I also found some threads reguarding ur problem in the past.At that time i was not interested in it.Try u will find a answer easily.

Good Luck.

bo

Last edited by bogoda; 02-03-2006 at 06:12 PM.
 
Old 02-04-2006, 01:20 AM   #3
Akhran
Member
 
Registered: Aug 2005
Distribution: Debian 'lenny'
Posts: 208

Original Poster
Rep: Reputation: 30
Just an update... from reading the man file for update-rc.d, I gather that I can get a script to run with sequence number 20 at runlevel 2, 3, 4, 5 with
Code:
update-rc.d script start 20 2 3 4 5
However, where to I add in the 'su command' for the script to run as a user besides root?

In the meantime, I'll continue to search through the newbie forum as suggested, but any help would be greatly appreciated.

Thanks !
 
  


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
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 03:48 PM
How to run a Script as root, after Login as User, in GDM MHOOO Red Hat 14 03-08-2005 08:41 AM
how do I make sure that the user that is going to run the script is a root user??? nikold01 Linux - General 3 09-10-2004 07:54 AM
Getting daemon to run at startup HaPPYFaCe Slackware 1 07-10-2003 08:50 PM
Startup service run by user other than root? WeNdeL Linux - Newbie 5 03-20-2003 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 11:32 PM.

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