need GRUB to password protect DOS

need GRUB to password protect DOS

Post by Colin Keena » Sat, 23 Feb 2002 08:37:05



Is there any way to make GRUB ask for a password before booting DOS?  If
not, how do you make GRUB run PowerQuest BootMagic instead of booting DOS
(because BootMagic has a boot-time password that prevents anything from
being booted until a password is provided).
 
 
 

need GRUB to password protect DOS

Post by Molchu » Sat, 23 Feb 2002 20:40:16


Yes, there is a way. If you want to know about it do 'info grub' to get
a quite good manual but in short you put password keyword in your
menue.lst file ( or whatever it's called ) like this:

password 'your password' (without quotes though)
then you put 'lock' keyword above the entry you want to protect with
your password like this:

lock
kernel (hd0,0)/boot/linux root=/dev/hda1
(or whatever is your entry)

Good luck.

Ruslan.


> Is there any way to make GRUB ask for a password before booting DOS?  If
> not, how do you make GRUB run PowerQuest BootMagic instead of booting DOS
> (because BootMagic has a boot-time password that prevents anything from
> being booted until a password is provided).


 
 
 

need GRUB to password protect DOS

Post by Colin Keena » Sun, 24 Feb 2002 09:12:16


I'm glad you provided the answer - it worked -
thanks.  I had tried 'info grub' before posting
the question, and didn't get anywhere.  I disagree
that it's quite a good manual.  Now that I know
the answer (lock) I can find the answer by looking
for 'lock' in the index.  But before I knew that,
it really didn't look like GRUB could do what I
wanted.

As an example of how bad the manual is, look at
what you get if you try the obvious and read the
"password" entry:

"File: grub.info,  Node: password,  Next: rarp,
Prev: parttype,  Up: General commands

password
--------

 - Command: password [`--md5'] passwd
[new-config-file]
     If used in the first section of a menu file,
disable all
     interactive editing control (menu entry
editor and command-line)
     and entries protected by the command `lock'.
If the password
     PASSWD is entered, it loads the
NEW-CONFIG-FILE as a new config
     file and restarts the GRUB Stage 2, if
NEW-CONFIG-FILE is
     specified. Otherwise, GRUB will just unlock
the privileged
     instructions.  You can also use this command
in the script
     section, in which case it will ask for the
password, before
     continueing.  The option `--md5' tells GRUB
that PASSWD is
     encrypted with `md5crypt' (*note
md5crypt::)."

It does refer to 'lock' but in a hard to
understand way.  It really doesn't point a new
user to the 'lock' command.  In fact, I still
don't understand what the above "info" is trying
to tell me about the password command.


Quote:> Yes, there is a way. If you want to know about

it do 'info grub' to get
Quote:> a quite good manual but in short you put

password keyword in your
Quote:> menue.lst file ( or whatever it's called ) like
this:

> password 'your password' (without quotes though)
> then you put 'lock' keyword above the entry you

want to protect with
> your password like this:

> lock
> kernel (hd0,0)/boot/linux root=/dev/hda1
> (or whatever is your entry)

> Good luck.

> Ruslan.


> > Is there any way to make GRUB ask for a

password before booting DOS?  If
Quote:> > not, how do you make GRUB run PowerQuest

BootMagic instead of booting DOS
Quote:> > (because BootMagic has a boot-time password

that prevents anything from
Quote:> > being booted until a password is provided).

 
 
 

need GRUB to password protect DOS

Post by Molchu » Mon, 25 Feb 2002 06:33:03


I'm glad I could help you.
Ok. Maybe I forgot to mention that was my personal opinion about the
info file. But don't forget that things like bad and good are all
relative (thanks to Einstain) and not absolute. It was very good for me
technically, quite complete and I got lots of new knowledge out of it,
but tastes differ :)
You can still omit the 'lock' keyword and use just 'password'.
If you put just the 'password' line without 'lock', GRUB will stop you
from doing some dangerous things :), although it will not ask for
password during the boot, you will not be able to edit or change any
entries on the fly as you would without the 'password' line by hitting
'e' on the entry. GRUB is a very powerful thing it acts like a small
shell and you can destroy files on the system even before you get to
login prompt. That's what the 'password' line for as soon as you try to
do something smelly it will ask for password.

Good luck.

Ruslan.


> I'm glad you provided the answer - it worked -
> thanks.  I had tried 'info grub' before posting
> the question, and didn't get anywhere.  I disagree
> that it's quite a good manual.  Now that I know
> the answer (lock) I can find the answer by looking
> for 'lock' in the index.  But before I knew that,
> it really didn't look like GRUB could do what I
> wanted.

> As an example of how bad the manual is, look at
> what you get if you try the obvious and read the
> "password" entry:

> "File: grub.info,  Node: password,  Next: rarp,
> Prev: parttype,  Up: General commands

> password
> --------

>  - Command: password [`--md5'] passwd
> [new-config-file]
>      If used in the first section of a menu file,
> disable all
>      interactive editing control (menu entry
> editor and command-line)
>      and entries protected by the command `lock'.
> If the password
>      PASSWD is entered, it loads the
> NEW-CONFIG-FILE as a new config
>      file and restarts the GRUB Stage 2, if
> NEW-CONFIG-FILE is
>      specified. Otherwise, GRUB will just unlock
> the privileged
>      instructions.  You can also use this command
> in the script
>      section, in which case it will ask for the
> password, before
>      continueing.  The option `--md5' tells GRUB
> that PASSWD is
>      encrypted with `md5crypt' (*note
> md5crypt::)."

> It does refer to 'lock' but in a hard to
> understand way.  It really doesn't point a new
> user to the 'lock' command.  In fact, I still
> don't understand what the above "info" is trying
> to tell me about the password command.



>>Yes, there is a way. If you want to know about

> it do 'info grub' to get

>>a quite good manual but in short you put

> password keyword in your

>>menue.lst file ( or whatever it's called ) like

> this:

>>password 'your password' (without quotes though)
>>then you put 'lock' keyword above the entry you

> want to protect with

>>your password like this:

>>lock
>>kernel (hd0,0)/boot/linux root=/dev/hda1
>>(or whatever is your entry)

>>Good luck.

>>Ruslan.


>>>Is there any way to make GRUB ask for a

> password before booting DOS?  If

>>>not, how do you make GRUB run PowerQuest

> BootMagic instead of booting DOS

>>>(because BootMagic has a boot-time password

> that prevents anything from

>>>being booted until a password is provided).

 
 
 

1. Help Please! Need help with password protecting directories

I am trying to set up a password protected directory...  

I have set up a .htaccess file in the directory which contains:

AuthUserFile /usr/sitename/www/dirname/.htpasswdAuthGroupFile
/dev/null
AuthName ByPasswordAuthType Basic

where sitename and dirname are obviously replaced with appropriate
names.....

I run htpasswd and create a .htpasswd file, but when I try to load an
html file from this directory, i get it without being asked for a
password...

What am I missing?

Jim

2. Anyone know if an iPaq will run FreeBSD?

3. Password CGI: Add links within a password protected area

4. Problems YOU can have?

5. Protect files with password ... without the password

6. Nameserver Problem

7. Phttpd and password protected dirs.

8. E3500 board 5 off lined

9. Password protect web folder

10. password prob using grub

11. password reset grub

12. How can I protect My backup with Password

13. telnetd[#####]: can't find user in protected password database