You are not logged in.

#1 2013-04-30 10:35:55

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Can i make grub refuse to load/boot anything depending on the clock?

As the title says, i want my computer to be inaccessible during certain times of day (lets say between 6am and 6pm for an example) but accessible (boot up normally) at any other time.

I do realize that the clock time can be changed in the bios settings but that's not an issue.

Has something like this been done already? or would i have to edit grub's source to do this? (i'm all up to editing the source but i will need a few pointers to know where to start with it, where it would be ideal to add the code, how to test it and so on and so forth. It sounds like it'd be fairly easy anyways.)

How to do this is completely optional, wether grub will just refuse to load entirely or whether it'll deny access to any of the installed operating systems is pretty irrelevant to me, all i want is that the computer will only be accessible when the clock says it is.

Last edited by rabcor (2013-04-30 10:37:12)

Offline

#2 2013-04-30 10:41:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: Can i make grub refuse to load/boot anything depending on the clock?

You should take to google for this one... I doubt grub offers anything to allow for it.

Offline

#3 2013-04-30 14:49:07

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: Can i make grub refuse to load/boot anything depending on the clock?

I don't know about grub but why not limit access at login using pam_time (man pam_time, man time.conf)?


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#4 2013-04-30 17:42:10

rabcor
Banned
Registered: 2013-02-09
Posts: 500

Re: Can i make grub refuse to load/boot anything depending on the clock?

*reads up on the 2 man pages...*

Interesting, i didn't know about this. thanks Stebalien that does seem like the ideal thing to use in this situation. i just need to figure out better how it works.

But i'd still like to be able to lockdown booting through grub (or another boot manager, i wouldn't mind that.) my purpose is to keep none other than myself out of the computer and since i'm the admin it's too easy for me to bypass pam, in grub's case as i explained before it basically wouldn't be worth the trouble to change the clock in my bios to get into my computer hence that'd keep me out, i need to limit my time on the computer cus i've got other things i must do but it's harder than i thought so i decided that maybe the computer itself could help me out somehow and then this scheme came to mind.

I already wrote myself a little startup program for windows that'll just shutdown immediately after boot unless it's the time where i want to be able to access the computer. far from being a perfect solution but it's a start.

If pam can deny even root login access then it's probably powerful enough for me.

Last edited by rabcor (2013-04-30 17:42:45)

Offline

Board footer

Powered by FluxBB