Timed Startup with Linux

Started by Tacitus, Jun 03, 2008, 11:09:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tacitus

On a Mac it is possible to set startup and shutdown times, when the machine will boot and perform certain tasks and then shutdown.

Do any of the Linux gurus out there know if it is possible to do this with a Linux box?  Don't think Cron jobs would do it but I'm not a Linux expert.  I imagine it depends on the particular hardware which is one of the strengths of the Mac since hardware is tightly integrated with the OS.

Lance

On a lot of machines, you can set in the bios the time you want it to come on. Could you then schedule the tasks to run on start up?
Lance
_____

This post reflects my own views, opinions and experience, not those of IDNet.


Rik

Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

Tacitus

Quote from: Lance on Jun 03, 2008, 11:12:15
On a lot of machines, you can set in the bios the time you want it to come on. Could you then schedule the tasks to run on start up?

TBH I don't yet have the machine I intend to use. 

Some background.  At present I use an old power hungry and noisy PowerMac G4 as a server intended for remote access.  When away from home I can either VPN or SSH into it drop or get some files and log out.  The machine is set to come on at certain times, both to save power and (particularly with SSH) reduce the possibility of security breaches.

To replace this machine I can either get another Mac - a Mac Mini is obtainable for around £300 on EBay, or I thought I could look at putting together a quiet PC using a mini or micro ATX board and associated kit.  Cost maybe the same or a bit less but perhaps a better machine for the purpose.

Before going further I thought it prudent to enquire whether timed boot was possible.  The link supplied by somanyholes (thanks  :)  ) suggests it is, so now I'll look at what's going in the mini/micro ATX world.  CPU power is not critical but 2Gb Ram and a fast HD should do the business.

somanyholes

on the security front, just disable root logins for ssh, create a hard to guess username, i.e. not a word, and a crazy password,or use a cert. Also if possible lock the access down to certain ip's, and change the default ssh port, make it a nice high one, just to stop the scanners out there.

Tacitus

Quote from: somanyholes on Jun 03, 2008, 11:46:27
on the security front, just disable root logins for ssh, create a hard to guess username, i.e. not a word, and a crazy password,or use a cert. Also if possible lock the access down to certain ip's, and change the default ssh port, make it a nice high one, just to stop the scanners out there.

Thanks for the tips.  Root is disabled and I do use certificates.  I also use a non standard port, both on the firewall and the machine itself.  I can't restrict the access to particular IPs since I don't always know what they're going to be, although I have restricted user access to myself.  Should be fairly safe, certainly from the script kids although a determined hacker might get in.  Not that he'd find much - it's what they leave behind that might do the damage.

I've not explored it - I'm not even sure it's available on the desktop Macs, although it may be on the server version of OSX - but I believe it's possible to use PAM authentication to lock people out after a set number of failed logins.  I imagine this would need a cron job to reset it (say) every hour in case I lock myself out....

I'll check some of the prices and see whether it's worth going for the PC/Linux combo or whether a Mini off e-bay would be as good.

Thanks for the help.

Dangerjunkie

#7
Hi,

Have you checked out http://www.linitx.com/ They seem to have a really good range of motherboards, cases and complete machines. I'm sure they could tell you if what you want to do is possible too. If you can't find a machine that can wake at a given time there is always the bodge of using Wake On LAN...

I like the look of the Jetway motherboards as they have modular I/O and you can select or change I/O modules so the box meets your needs.

I don't know if it's still true but in the old Unix days cron used to run all the missed jobs when a machine was turned on... May be worth checking.

edit: You can install Linux on the Mac Mini too if that works for you :)

Cheers,
Paul.


Tacitus

Quote from: Dangerjunkie on Jun 03, 2008, 12:05:48
Have you checked out http://www.linitx.com/ They seem to have a really good range of motherboards, cases and complete machines. I'm sure they could tell you if what you want to do is possible too. If you can't find a machine that can wake at a given time there is always the bodge of using Wake On LAN...

Looks a good site Paul, thanks for the tip.  Wake on LAN wouldn't be any good as I'd be working away from the machine, hence the need for automatic startup.

Cheers.

Tacitus


Inactive

Quote from: Tacitus on Jun 03, 2008, 12:46:24
Another useful tip.  Good forum this, and I'm not even on iDNet  ;D

Come on, we need to know, who are you with? ;D
Anything and everything that I post on here is purely my opinion, it ain't going to change the world, you are under no obligation to agree with me, it is purely my expressed opinion.

Rik

He could tell you, In, but then he'd have to kill himself. ;)
Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

Inactive

Now you have got my thoughts running riot Rik..  ;D
Anything and everything that I post on here is purely my opinion, it ain't going to change the world, you are under no obligation to agree with me, it is purely my expressed opinion.

somanyholes

go on rik, ip whois look up  :angel:

Tacitus

Quote from: somanyholes on Jun 03, 2008, 13:24:44
go on rik, ip whois look up  :angel:

Save you the bother - I'm with Demon.  Have been for the best part of 10 years.  They were good - rather like Pipex - but have gone downhill in recent years.  Support is now in Bangalore.  If you get a good one they're OK, but it's pure luck of the draw.

Reason I'm still with them is that I signed up for a 12 month contract to get the (modest) price reduction.  Since then the line has gone downhill, something which is not their fault but they are not eager to get involved with OR. 

Reason I'm over here is that my sister moved from Pipex/Tiscali (Vodali - see elReg) to iDNet, so I signed up to find out what was going on as I'm first line tech support for her  :)


Inactive

It's OK, we all have a cross to bare..  ;)

Thanks for the info..
Anything and everything that I post on here is purely my opinion, it ain't going to change the world, you are under no obligation to agree with me, it is purely my expressed opinion.

somanyholes

the only address rik would have given is 127.0.0.1  ;)

Tacitus

Quote from: somanyholes on Jun 03, 2008, 14:05:55
the only address rik would have given is 127.0.0.1  ;)

Nice one..   :laugh:

Dangerjunkie

#19
Quote from: somanyholes on Jun 03, 2008, 12:33:43
this should help on the pam stuff.

http://blinkeye.ch/mediawiki/index.php/SSH_Blocking#List_of_past_login_attempts_.28IPs.29

a nice script called blacklist.py



You could have a look at Fail2Ban too. I think that should do a good job of shutting script kiddies out.

Just make sure you set the rules so you can get back in within a reasonable time if you accidentally get yourself banned :)

Cheers,
Paul.

QuoteLooks a good site Paul, thanks for the tip.  Wake on LAN wouldn't be any good as I'd be working away from the machine, hence the need for automatic startup.

You're welcome... If you give them a ring I'm sure they'll tell you if any of their motherboards have a timed wake function. Another last resort would be to use wake on ring with a PSTN modem then just ring your home phone whenever you want it to wake up.

Rik

Quote from: somanyholes on Jun 03, 2008, 14:05:55
the only address rik would have given is 127.0.0.1  ;)

You'll get nothing more out of me, I say! :)
Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.