shutdown option on boot
Is it possible to have an option in lilo where if Someone enters a password wrong or if too much time elapses then the computer shuts down. I'm using the settings the install put in it for me. Also I'd like to start linux in the command line and then if i want to start the Graphical mode.
|
It is possible - but needs some work..
password-protecting the booting is not difficult - but it needs more setup to do, what you want - shutting the machine down after a certain time. I don't know of an option in lilo, which counts, how many times a password can be entered and acts on that accordingly - so, what I know about this is, that it not possible to allow only 3 attempts for instance and the deny further inputs. As for the shutting down - to do that, you will have to configure lilo to boot anyway (after a timeout - to a runlevel - which you can set up - which will immediately shut down the system without anyone being able to even attempt to log in. This needs to be done this way, because lilo is a boot-manager - and cannot by itself shut down the system - the system has to do this. But I'm not sure if this works together with mandatory passwords!? try: man lilo.conf and/or post your /etc/lilo.conf the options needed are: mandatory ...and... password=<password> and the option restricted has to be disabled - in favour of: mandatory for the timed booting... timeout=... As for not starting in graphics-mode: you need to disable the startup of your display-manager (xdm or kdm or gdm) - which is started via the init-scripts in /etc/rc.d or /etc/init.d/... |
I was told to boot into runlevel 0 for the shutdown image but i tried "append = runlevel=0" but that didn't seem to change anything (I did remember to rerun lilo to update the bootloader).
Also where do the password and manditory arguments go? I don't remember seeing them in the man pages here's my current lilo.conf boot = /dev/hda compact root = /dev/hda1 image = /zImage label = awdr image = zImage label = default append = runlevel=0 other = /dev hda3 label = zscf other = /dev/hda4 label = qxev |
# global section
boot = /dev/hda compact root = /dev/hda1 # waits for input # sets timeout to 5 minutes and then boots the default image # which is not password-protected prompt timeout=3000 # per image settings image = /zImage label = awdr restricted password=<password> image = zImage # make this the default to boot up after timeout default label = turn_off_machine # this should be correct to boot up zImage to runlevel 0 append ="init=0" #bypass # this may be needed in case the password is recognized as a global setting other = /dev/hda3 label = zscf restricted password=<password> other = /dev/hda4 label = qxev restricted password=<password> #end /etc/lilo.conf The default level is "mandatory" so - no need to give that... each image which needs to be protected, gets a "restricted" and a "password=..." the one image you want to use to shut down the machine has to be the default - I changed the name to: turn_off_machine You could put the password option just once in the global section - if it is to be the same for all images, but then you would need the option "bypass" for the default-image - which is now commented out ...I have not tried this - I hope it will work as expected the man-page is: man lilo.conf |
Works perfectly. All my security problems are now fixed.
|
cool - I'm glad it worked!
|
...my browser was not responding - tried to reload the page and go back and forth - and this way it got send two times - please take that out
|
All times are GMT -5. The time now is 03:31 PM. |