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!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.