LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2005, 01:54 PM   #1
MD3
Member
 
Registered: Apr 2004
Location: Italy
Distribution: Gentoo
Posts: 81

Rep: Reputation: 15
[Multiuser Runlevel] executing a process with a defined user


hi
i'd like to know how to have a user (e.g. my_user) to execute a command (e.g. my_server_start) when in multiuser mode... it means by writing the needed lines in /etc/rc.M

my system is slackware 10.0 with linux 2.4.26

thanks.. and bye
 
Old 04-12-2005, 02:12 PM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
In the init script that is used to start whatever you're wanting to start. When the actual application is being run, put an su - user_id -c command

Example, say you want to run the service foo, normally it might just appear on the line like this

foo

You'll want to run it as joe, so it would now look like:

su - joe -c foo

***

The other option of course is to look at the program itself and see if it has some way to execute itself as a different user - some apps do this.
 
Old 04-12-2005, 02:23 PM   #3
MD3
Member
 
Registered: Apr 2004
Location: Italy
Distribution: Gentoo
Posts: 81

Original Poster
Rep: Reputation: 15
won't this ask someone somewewre for a password?

thanks
 
  


Reply


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
User defined protocols with Guarddog Shafted Linux - Security 4 09-01-2005 12:56 PM
displaying popuo message by daemon process running in runlevel 5 using xmessage kalpesh_rathod8 Programming 2 11-22-2004 03:19 AM
user defined variables linuxdev Linux - Newbie 4 02-09-2004 12:43 PM
Linux multiuser capabilities for one user? mlhammer Linux - Newbie 4 11-10-2003 09:41 PM
Executing commands with child process benjaminrtz Programming 5 12-18-2002 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:12 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