Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 08:31
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to Give Your GRUB Menu a Password
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 9257
Location: Stratford, Ontario

PostPosted: Tue 17 Aug 2010, 12:48    Post subject:  How to Give Your GRUB Menu a Password  

Before starting this procedure, you should set up a temporary back door so you can still boot into your system if you make a mistake. Open your GRUB menu.lst file and make a duplicate copy of your current entry. Once you have the password-protected entry working, you can delete the second entry.

1. Open a terminal and type
Code:
grub

This loads the GRUB emulator.

2. Type
Code:
md5crypt

Type in the password you want to use. GRUB will return the encrypted version. Leave this window open for now.

3. Open your menu.lst file in a text editor. Insert a blank line after the title line and add
Code:
password --md5  abcdefg

using the encrypted password from Step 2. Since you probably don't want to type this by hand, you can use the middle-click technique. Put your mouse in the Step 2 window and highlight the password. Then place your cursor in the Step 3 window and middle-click to paste the code in. Double-check that you have copied the password correctly.

4. Save the file and reboot.

If you somehow manage to completely lock up your system, you can always boot off the Live CD, mount your Puppy partition, open the menu.lst file and delete the password line.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 5373
Location: Charleston S.C. USA

PostPosted: Wed 16 Mar 2011, 00:03    Post subject:  

Do you know if this will work with a Grub4dos menu.lst?
Back to top
View user's profile Send private message 
r1tz


Joined: 09 Sep 2010
Posts: 165
Location: In #puppylinux (IRC)

PostPosted: Wed 16 Mar 2011, 12:00    Post subject:  

Cool! this is interesting Smile
Back to top
View user's profile Send private message MSN Messenger 
KusaNoKaito


Joined: 19 Feb 2010
Posts: 99
Location: Florida

PostPosted: Wed 16 Mar 2011, 14:53    Post subject:  

Wow. never knew one could do this. Thank you "rcrsn5" for posting.
_________________
Puppy Packages
My Website
Back to top
View user's profile Send private message Visit poster's website 
gerry

Joined: 26 Jul 2007
Posts: 946
Location: England

PostPosted: Wed 16 Mar 2011, 16:13    Post subject:  

Can one do this in Grub2?

Gerry
Back to top
View user's profile Send private message 
shadower_sc

Joined: 21 Apr 2010
Posts: 133
Location: Texas

PostPosted: Thu 17 Mar 2011, 11:42    Post subject:  Password for Grub2
Subject description: Grub2 Password Protection
 

Thanks rcrsn51 Smile I wouldn't have thought about it, if you hadn't posted it. Very Happy It looks to be fairly straight forward too.

There is a fairly lengthy and what looks to be a good explanation for Grub2 password protection on the Ubutnu forums here: http://ubuntuforums.org/showthread.php?t=1369019

It should work with any Linux Distribution using Grub 2. Same with rcrsn51's explanation for Legacy Grub.

I am sure you could apply either version to a grub4dos installl with a bit of adapting. Just make sure you know what version of grub your grub4dos is using and try to follow the guide for that version.
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2631
Location: Japan

PostPosted: Tue 22 Mar 2011, 21:44    Post subject: Grub4dos menu.lst  

bigpup wrote:
Do you know if this will work with a Grub4dos menu.lst?

Grub4Dos config > Grub4Dos Guide > Password Protecting Boot Options
I have not yet tried.

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
Digger


Joined: 16 Jan 2011
Posts: 6

PostPosted: Mon 28 Mar 2011, 23:47    Post subject:  

Thanks for this great tip.

It works great for me when I boot to Puppeee on my eee PC 901, but I am not getting a password query when booting into FREEDOS (on a different SSD on the same machine - Puppeee is on sda1 and FREEDOS is on sdb1).

Here is my menu.lst file:

Code:

# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'.  Tue Mar  1 22:34:39 2011
#
# The backup copy of the MBR for drive '/dev/sda' is
# here '/boot/grub/mbr.sda.32728'.  You can restore it like this.
# dd if=/boot/grub/mbr.sda.32728 of=/dev/sda bs=512 count=1
#
hiddenmenu
default=0
timeout=0
# Start GRUB global section
#timeout 30
color light-gray/blue black/light-gray
# End GRUB global section
# Linux bootable partition config begins
  title Linux (on /dev/sda1)
  password --md5 booboo
  root (hd0,0)
  kernel /boot/vmlinuz root=/dev/sda1 ro vga=normal
# Linux bootable partition config ends
# Other bootable partition config begins
  title FreeDOS
  password --md5 booboo1
  root (hd1,0)
  makeactive
  chainloader  +1
# Other bootable partition config ends
# Linux bootable partition config begins
  title Linux (on /dev/sdb2)
  root (hd1,1)
  kernel /boot/vmlinuz root=/dev/sdb2 ro vga=normal
# Linux bootable partition config ends
title Install GRUB to floppy disk (on /dev/fd0)
pause Insert a formatted floppy disk and press enter.
root (hd0,0)
setup (fd0)
pause Press enter to continue.
title Install GRUB to Linux partition (on /dev/sda1)
root (hd0,0)
setup (hd0,0)
pause Press enter to continue.
title -     For help press 'c', then type: 'help'
root (hd0)
title -     For usage examples, type: 'cat /boot/grub/usage.txt'
root (hd0)


I'm wondering why the line showing the "booboo1" password is not causing a password query to be generated when I boot into FREEDOS.

What am I doing wrong?

TIA!
Back to top
View user's profile Send private message 
stiginge


Joined: 22 Mar 2007
Posts: 420
Location: Kerry, Ireland

PostPosted: Wed 18 May 2011, 05:11    Post subject:  

Nice one rcr, got it goin no probs on 5.1.1.56
_________________
Buy silver, crash JPMorgan
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0688s ][ Queries: 11 (0.0045s) ][ GZIP on ]