[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Running program at startup as user

Posted on 2005-05-05
1
Medium Priority
?
455 Views
Last Modified: 2010-04-20
How do I run a program at startup as a certain user under Redhat?

I don't want to run a cron script, as the program I wish to run has its own auto-restart script, just need it to kick-start the program once at boot.

(Perhaps I am simply fearing my lack of experience with crontab...)
0
Comment
Question by:purpleonyx
1 Comment
 
LVL 40

Accepted Solution

by:
jlevie earned 2000 total points
ID: 13942557
You an auto-start something as a specific user by adding something along the lines of:

su username -c "/path-to/program program-options"

to /etc/rc.d/rc.local.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month19 days, 18 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question