Solved

start shell script at boot before user logs in

Posted on 2006-11-17
3
249 Views
Last Modified: 2010-04-20
I need to start a shell script at boot before the user even logs in. The script will have 1 parameter needed to run. (Fedora 4)
0
Comment
Question by:JPERKS1985
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 17969019
put it in /etc/rc.d/rc.local
0
 
LVL 14

Expert Comment

by:ygoutham
ID: 17970543
putting a entry in /etc/rc.d/rc.local will run the script as root.  who supplies the parameter???  does the script know by itself. if so, good and if the script does not do any great damage go ahead and since it has all privileges be careful.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 17971351
ygoutham does bring up a good security point.  Anything from rc.local is executed as root.  You can use su or sudo to exectue commands as a different user.

You also need to make sure that STDERR/STDOUT is re-directed to a log file.  Otherwise you will not know if they actually did what intended.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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

734 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