how can I run something as root (modprobe, to be exact) every time computer starts.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers how can I run something as root (modprobe, to be exact) every time computer starts.
# 1  
Old 07-24-2006
how can I run something as root (modprobe, to be exact) every time computer starts.

I have the root password for my box, but I'm ignorant.

So, every time I start my computer, I have to run this command

Code:
/sbin/modprobe fuse

as su, so that I can do other stuff (like mount remote directories locally using sshfs)

I guess there's some file, like .bashrc, only it's applicable for everybody, and it has root powers, which I could modify so that I don't have to do this manually every time I boot up.

I googled around a bit, and found

http://www.fedoraforum.org/forum/arc...p/t-45318.html

This suggested I modify /etc/rc.d/rc.local to run commands as su at startup. But that file doesn't exist on my system. (SUSE 10.1).

What shoulld I be googling under, or what documentation should I be reading, to figure out the right way to do this on my system?

Thanks!
# 2  
Old 07-24-2006
Hi.
If you need to execute whatever when your system boots (as root), just create an script in, for example, /etc/init.d and then use yast2 to configure when (run level) it should be run. Smilie
Searching in google, I've found http://www.slgfg.de/SLGFG/chapter7.html
which could help you. Though, probably there are better tutos on this...
# 3  
Old 07-25-2006
do a
Code:
man modules.conf

this file is designed for that
# 4  
Old 07-25-2006
man modules.conf doesn't work on my system unfortunately.

But that's okay. the earlier suggestion about what to read was very helpful. I'm working my way through that, and believe the solution will eventually shake out.

Thanks again for those who have helped me.
# 5  
Old 07-25-2006
If you only need to load a kernel module, just add its name in /etc/modules

This works for my Debian.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to write a shell script that starts one, then kills it, then starts another?

This is on a CentOS box, I have two scripts that need to run in order. I want to write a shell script that calls the first script, lets it run and then terminates it after a certain number of hours (that I specify of course), and then calls the second script (they can't run simultaneously) which... (3 Replies)
Discussion started by: btramer
3 Replies

2. Homework & Coursework Questions

When I run the script, the cursor starts on the wrong line?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: It's a shell script using a looping logic, trap, tput, if, while. Most of the scripts in this book aren't written... (2 Replies)
Discussion started by: ckleinholz
2 Replies

3. Shell Programming and Scripting

While loop - how to run processes one after another (2nd starts after first completes, and so on)

I'm a programming noob. I'm trying to run a memory intensive process for many files. But when I use the following script, it runs fine for the first 5-7 files, then runs out of memory. Monitoring the output files, it's clear the processes are going on in parallel. Once 5-7 of the files are being... (18 Replies)
Discussion started by: pathunkathunk
18 Replies

4. UNIX for Dummies Questions & Answers

Two questions. First one; What are the ways in which a program starts to run.

This is my first post here so hello everyone! I know that a command of the programs name can start a program and clicking on a icon in GUI can as well as a startup shell script but how do I educate myself of the method that starts an application? Does the GUI run a script? What are the ways/ way... (2 Replies)
Discussion started by: theKbStockpiler
2 Replies

5. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

6. Shell Programming and Scripting

How to run a process when the computer is idle?

Hi there, I wrote a script that scans a folder for new files. I don't want to run it at specific times but only when the computer is NOT busy. I tried to use nice but it doesn't really work. I mean, even if my process has less priority, it still slows down the other processes. I did a test... (3 Replies)
Discussion started by: chebarbudo
3 Replies

7. UNIX for Dummies Questions & Answers

Getting exact time

I had a question regarding the creation time stamp (or modified time stamp) of a file. when I use the ls -all command I only get the time in hours:minutes. I'm looking for the time in hours:minutes:seconds . Any ideas??? Thanks in advance! (1 Reply)
Discussion started by: tdst
1 Replies

8. UNIX for Dummies Questions & Answers

How to run a script when your computer is idle

I am trying to run a script that I made when my computer is idle. How do I go about doing this. Thanks :) (4 Replies)
Discussion started by: rehansaeed
4 Replies

9. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 Replies
Login or Register to Ask a Question