Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am posting this to the newbie section since I am new to Linux. Although I have almost completed reading a Linux book I can't quite figure out how to get started on my problem.
I need to write a script/program to test out a program my company is developing in Linux. When complete, the program will reboot the system. I need to stress test the program by running it, rebooting the system, running the program again and checking status. This has to support multiple linux distributions but not necessarily the GUI managers (KDE, gnome) since the program will have a silent command line option but it would be nice if i could autologin into KDE or Gnome and run the script.
Because of the memory locations the program accesses I need to run it as root. How can I setup multiple distributions of Linux so that it boots, runs the program as root, and then reboots and does the same thing over again? I need to do this for Red hat 9.0 and Suse 8.2 at the very least.
Thanks! This is exactly what I needed to get started. I tired this out with a simple cat /etc/rc.local > test.txt and it seems to be working. The program that I need to run and test out uses a linux driver to write to a restricted memory location which requires the user to be logged in as root. Does this run it as root or is there a way to use su and have it put in the root password automatically?
The /etc/rc.local script is run as a root uid at the end of the boot sequence. If you need to do something as a different user, you can use su to change yourself to somebody else (su doesn't need password if you transform from root to otheruser (but the opposite is not true, of course)).