mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2005-08-16, 11:22   #1
talcum
 
Aug 2004

2×3 Posts
Default autostart mprime under different credentials

Im running fedora core4 and id like to start mprime at startup but run as a non root account. How can I do this?

currently i ssh to the box and run
nohup ./mprime -d &

thanks
talcum is offline   Reply With Quote
Old 2005-08-16, 12:03   #2
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

2AD416 Posts
Default

Quote:
Originally Posted by talcum
Im running fedora core4 and id like to start mprime at startup but run as a non root account. How can I do this?

currently i ssh to the box and run
nohup ./mprime -d &

thanks
Short answer: RTFM, in particular "man su".


However, that's not very helpful, so here is a longer answer. Most things that start at boot time are fired up from scripts stored in /etc/rc.d/init.d and most of them are to start daemons, configure hardware and perform general housekeeping. You could create a script there and appropriate links from /etc/rc.d/rc?d.d but I personallly wouldn't do it that way.

There is another script in /etc/rc.d/rc.local which is also run at startup time and after all the init.d scripts. Put something like this line in that file:

Code:
/bin/su jruser -c "cd /full/path/to/mprime ; ./mprime -d > out_file 2> err_file & "
Here, "jruser" is the non-root user you want msieve to run under.


I hope there are no silly typos in that code. You should RTFM anyway, just to check my typing.

Good luck!


Paul

Last fiddled with by xilman on 2005-08-16 at 12:05 Reason: There was a typo in the script, despite my proofreading 8-(
xilman is offline   Reply With Quote
Old 2005-09-10, 06:45   #3
delta_t
 
delta_t's Avatar
 
Nov 2002
Anchorage, AK

35710 Posts
Default

This works in FreeBSD, so should work in Linux.

Create a simple script, say "start_mprime.sh":
#!/bin/sh
/home/user/mprime/mprime -b

Then use the crontab
@reboot user sh /home/user/mprime/start_mprime.sh

where user is a non-priviledged user account.
delta_t is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
mprime Unregistered Information & Answers 3 2011-08-05 09:17
Server schow not my last credentials Axel1 Software 3 2009-09-29 19:48
./mprime -B in 257 Lazlow PrimeNet 3 2008-10-29 20:40
mprime 25.2? Salz Software 10 2007-07-26 09:02
Problem with mprime (Fixed with mprime -d) antiroach Software 2 2004-07-19 04:07

All times are UTC. The time now is 22:06.


Thu Oct 28 22:06:44 UTC 2021 up 97 days, 16:35, 0 users, load averages: 1.11, 1.19, 1.25

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.