Solved

start shell script at boot before user logs in

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

707 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

17 Experts available now in Live!

Get 1:1 Help Now