LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Reply
 
Search this Thread
Old 08-14-2004, 01:50 AM   #1
rml54321
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Rep: Reputation: 0
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.
 
Old 08-14-2004, 05:22 AM   #2
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
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/...
 
Old 08-14-2004, 05:58 PM   #3
rml54321
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 08-15-2004, 03:08 AM   #4
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
# 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
 
Old 08-16-2004, 12:45 AM   #5
rml54321
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Works perfectly. All my security problems are now fixed.
 
Old 08-16-2004, 02:32 AM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
cool - I'm glad it worked!
 
Old 08-16-2004, 02:32 AM   #7
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
...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

Last edited by jomen; 08-16-2004 at 02:36 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
No shutdown or restart option! thomasfingram Linux - Newbie 13 07-27-2005 04:35 PM
Adding shutdown option to gnome eranj Linux - Software 3 07-19-2005 10:20 AM
My version of Mandrake 10 has no option for shutdown available.. silentwhispers Mandriva 3 03-01-2005 06:59 AM
mandrake 10.1 not saving changes and no shutdown option aresgodofwar30 Mandriva 2 02-27-2005 10:28 PM
Mandrake Shutdown Option(s)??? Dunno_Linux Linux - Newbie 0 06-26-2003 10:00 AM


All times are GMT -5. The time now is 05:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration