Running program at startup as user

Posted on 2005-05-05
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...)
Question by:purpleonyx
    1 Comment
    LVL 40

    Accepted Solution

    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.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now