Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 02-03-2006, 05:35 PM   #1
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, 07:11 PM   #2
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.


Last edited by bogoda; 02-03-2006 at 07:12 PM.
Old 02-04-2006, 02:20 AM   #3
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
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 !


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:48 PM
How to run a Script as root, after Login as User, in GDM MHOOO Red Hat 14 03-08-2005 09: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 08:54 AM
Getting daemon to run at startup HaPPYFaCe Slackware 1 07-10-2003 09:50 PM
Startup service run by user other than root? WeNdeL Linux - Newbie 5 03-20-2003 03:57 PM > Forums > Linux Forums > Linux - Distributions > Debian

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

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