Solved

start shell script at boot before user logs in

Posted on 2006-11-17
3
242 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 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

13 Experts available now in Live!

Get 1:1 Help Now