Solved

start shell script at boot before user logs in

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ftp to port 21 4 53
Using Linux to replace Windows Server 2008 R2 for network drives 5 105
expand ext4 on centos 6 5 37
Syslog-ng works. Now what? How to filter and manage? 8 56
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.…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
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.

789 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