From Windows to a Debian GNU/Linux desktop, sans the geekness
The Original - since June 2006 - Run Debian GNU/Linux and be Happy.
You might want to lock your .bash_history file so bash will stop adding all your console commands into the file. It's cool that bash saves a record, it can be handy. However, it can also be a security detriment.

See the forum post

 

this site  web    
The Goods
Home Page
Forum
debiantutorials.org Licensing
Website Disclaimer
Site Map
Links
w32codecs
How to really switch Mom to Linux
Documentation
Release Notes
Developers Reference
Debian Survival Guide
Debian Books
Manuals
Debian Security
Linux Dictionary
Leaving Windows
Resize Windows Partition for Dual-Booting
Back up your Partitions, Imaging
Still Suffering Windows
Keep your Money, your Sanity and your Self-Respect
Installing Debian Etch
Debian GNU/Linux (Etch) Installation Tutorial
My Etch Desktop in 150 words or Less
Upgrade Sarge to Etch
Configure Debian Etch
Multimedia on Debian Etch
Install nVIDIA 3d driver on Debian Etch
Wireless on Debian Etch: Broadcom - bcm43xx
Klikit, Klikit good
Handy Little Things
Package Management
Peripherals & Debian Etch
Set up your web cam on Debian Etch
Printing in Debian (Browsers, too)
Your ipod on Debian Etch
Atheros Wireless
Broadcom Wireless
Etch on the Desktop
Visitors apache log reader
Andrea del Sarto
(Poetry snippet for your Ignorant Ass)
Beagle on Debian Etch
Convert Digital Camera .mov Files
Some Debian Etch System Files
My Debian Desktop
Using wget
Copying or Ripping DVD's in Linux (Debian)
Reset root password
So, you want to run Linux
Convert mov files
Securing Debian
Password Protect Grub Boot Loader
Debian Etch as Server
Debian Linux file and print server: NFS, CUPS, LPR
Stream your music with gnump3d
Simple local web server on Etch
Web Server on Debian Etch
Miscellaneous Linux
Linux Conventions
Can People read my Documents?
Install Software on your Linux System (Debian)
Partition your Hard Drive
History of debiantutorials.org
A School Without Windows (PDF)
How to talk to Tech Support
Linux Demystified
Off Topic
A DRM Dissertation
An Artist's take on Downloading Music
An Insane and Damaging lack of Understanding
On Children and Drugs
On Visitor Q
Intellectualism for the Masses
debiantutorials.org stats
Smart Crows
How old are We?
Why we run Debian
How not to ask an egomaniac like myself for an article
Sarge Specific Tutorials
Installing Debian Sarge, net install, no DHCP
Easy Graphical Sarge Installation Tutorial
Rebuilding my Debian Sarge Machine
Multimedia for Sarge
w32codecs
nVIDIA on Sarge
Trouble Burning discs: cdrecord
Athcool on Debian Sarge
Where are my Newly Installed Apps?
Easy LAMP on Debian Sarge
Archive
Sites Worth a Look
Debian Mailing List
spidercider
Linux Comparison at PolishLinux.org
Thin Clients
Common Commands
Common iptables Filtering
iwouldntsteal.net
Big-Ass iptables info Page
iptables Port Reference
README: Firewall
General Security Tips
Newbie Security
Kickass RFC's
Data Breaches
Hemp Seed Oil
linux-hardcore.com
Search for a local Computer Tech
Evelyn's Linux Cheat Sheet
Lotsa (687) Linux Commands

Favorite Utilities

Super Grub Disc
System Rescue Disc
News Feeds
visitors run
operating system
Linux
Windows
Mac
Unknown
BSD
54.8 %
39.8 %
3.40 %
1.50 %
0.10 %

web browser
Firefox
Mozilla
IE
Opera
Epiphany
41.4 %
25.1 %
15.8 %
8.40 %
3.50 %
updated 17apr08
What's Root?
Root is the super-ultra-mega. All system commands on a Linux box need to be done as root. This means installing software and changing files not in your /home directory, etc. In your terminal, if you're logged in already become root by typing su at your $ prompt, then the root password. Log in the system directly as root from a terminal, but not the graphical login. # shows root.
dediantutorials.org is ad-free
debiantutorials.org has always been and will always remain ad-free I make no unrealistic demands that you "owe me for my time and bandwidth" in order to use my site. I detest all those scumbags out there that think that they are owed something for putting a web site up. I do debiantutorials.org because I love it. You owe me nothing.
If you can walk and chew gum at the same time, you can run Linux

    Thursday, May 15, 2008      Contact  Etch Info  what's new in Etch  Linux Demystified  Our Forum
Password protect Grub Bootloader PDF Print E-mail
Written by machiner   
Saturday, 20 August 2005
You're thinking a lot about computer security lately, and that's a good thing. You certainly made the right choice going to Linux, and Debian was wise, too. That's not the end of your thought about security I hope. This short tutorial will show you how to password protect your Grub boot loader rendering your machine un-boot-able (that's not even close to being a real word!) to the casual snoop, or anyone else without the ability to get around this; which for all intents and purposes is just about anybody you know. This is by no means absolute security for your machine, far from it - it's merely a wrinkle in the road.

There is a lot more to securing your Debian system than just password protecting Grub but physical security plays a large role in the overall scheme of securing your computer. However, most people shrug this off. This, along with setting your BIOS to only boot to your "hdd-0" and disabling all other boot devices, is an important first step. Don't forget to set a password for your BIOS as well while you're in there. If you lock the gate with a good enough lock you'll keep all but the most determined trespassers out - and for those malcontents we have more security in store but that's for another tutorial.

Password protecting your boot is simple and a pretty effective front-line defense. Soon enough, wherever you go, people will envy your savvy ways.

Open a terminal...

Become root and issue the following command:

# /sbin/grub-md5-crypt

You will be prompted for a password next -- please don't use your kid's name and birthday, we're protecting your computer here. I like to come up with passwords that are easy to type. Doesn't matter the combination of shifts, ctrls, numbers, or special characters. As long as my fingers can dance around the keyboard and type the password correctly then I'm good. Also, I like my passwords to be large and perhaps lyrical. If you put a thing like this to music or ascribe musicality in some fetching way, it will be easier to remember. Or think of an acronym. Remember learning the regions of the spine in 9th or 10th grade: C-T-L-S-C. Or how about the planets in 4th grade: M-V-E-M-J-S-U-N-P?

I just used "musicality in some fetching way" in a sentence. LOL.

If you have so little creativity or are pressed for time there are a couple software apps that will assist in password creation. Now, I use passwords - all over the place. I'm also not nearly smart enough to remember them all so I use some software. Sure I haven't opened much of the collective in months, but when I need one created - my criteria preset - or stored there is some help. Check out revelation or search for a password generator, keeper, manager in apt or your favorite outcrop.

OK - You've chosen your password, back to your terminal, type it in. Again. Notice that your are greeted with the MD5 hash of the password you typed. Copy that hash. Sure, highlight it with your mouse...

Now, you'll need to modify your menu.lst file to enable the password you just chose, so, as you are currently "root" in your terminal, let's open that file with Gedit:

# gedit /boot/grub/menu.lst

Look for this section:

## password ['--md5'] passwd
# 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'
# e.g. password top-secret
# password --md5 $1A$B5zFN9$dRKe5^f3Hd1t14Lk0e6NMoE5P
# password topsecret

The bold line is what we'll change. First, un-comment the line (delete the # sign) and then replace the hash value that is there with the one you just made. Highlight it and hit ctrl+v. Scroll down in the file until you come to your boot settings - the un-commented ones - put your cursor at the end of the initrd line in the first entry, hit enter. Now you tell Grub to lock the boot process unless the correct password is entered - type lock. Do it again for your other kernels. It'll resemble this:

title		Debian GNU/Linux, kernel 2.6.8-2-k7
root		(hd0,0)
kernel		/vmlinuz-2.6.8-2-k7 root=/dev/hda2 ro 
initrd		/initrd.img-2.6.8-2-k7
lock
savedefault
boot

Save the file. Close Gedit. Exit, exit out of your terminal, slide the chair back - stand up, stretch. Go outside and greet the world - you are the master of your universe.

When the machine(r) is rebooted the process will stop at the boot loader unless the proper password is entered. When the screen first appears in the boot process, type a p for the password prompt. Type your password, hit enter, arrow to your desired OS, hit enter again, continue booting.

machiner - early AM 22Aug05

Here's a terrifically informative article for you to read. It's juicy.





Reddit!Del.icio.us!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Newsvine!Furl!Yahoo!Ma.gnolia!Free social bookmarking plugins and extensions for Joomla! websites!
Trackback(0)
Comments (8)Add Comment
Psychologically speaking
written by Guest, August 24, 2005
This is a terrific way to get your family memners to try Linux. Scenario: Your \"family\" machine dual-boots, \'cause you\'re the ADMIN and you\'re cool like that. Well, in your menu.lst file password protect the Linux distros - you probably only have one anyway, Debian, and leave the Windows entry free to boot.

Soon enough your family will realize (whether correctly or not) that there must be someting special about \"that Linux\" if you have protected booting into it with a strong password. Finally - let them beg - tell them they\'re not savy enough, tell them they\'re not smart enough. By making Linux seem too: cool, good, or whatever, for them, you will have Linux converts in no time.

If you all have your own computers, there are some other psychologically compelling ways to get them "converted". Muuu hahahahahahaha...

glad to help

--machiner

help me i got trouble after trying this
written by Guest, September 09, 2005
after trying this tutorial no one be able to enter to my debian, but include me, i could not enter after typing my real password.., should i type the char that has been encrypt with md5?
so lemme know some more details
written by Guest, September 10, 2005
Your password fails? No, you don't use the MD5 hash - Have you hit the "P" like I mentioned?
Why?
written by Guest, March 24, 2006
Why would I want to do it? How does it make your computer more secure? If I am looking at GRUB\'s password dialog, I am physically sitting at your machine. I can boot it off of CD/USB stick/whatever with my copy of Knoppix or myriad other knoppix-like distros. Once there I can read all your data, change menu.lst to stop bugging me etc.
There are some cases where it could be useful (computer locked in a rack with accessible terminal) but in most cases this gives you additional inconvenience for no additional security.
Ummm...
written by machiner, March 24, 2006
OK - so what's your point, really? Of course you can boot to a disk - but you must not have read this article because I talk about password protecting BIOS. You know -- you're correct, people can get around this. Can your Mother?

Did you come here to show off? I can easily take apart your comment...but why? Thanks for coming by. Your comment is very simplistic, there is far more to this simple Grub password than you can apparently see.

Anyway - rock on, live and learn.

...
written by Guest, April 03, 2006
i could not find the #password line in my menu.1st file
GreySpace,,, I read the whole page... an
written by 'Guest', June 20, 2007
Hi Machiner;
I followed all your instructions,, but one!
I didn\'t Password all of my Kernel,,, until after I tried
the password on my first kernel.
And since that work like \"cake\", then I returned
and open my root terminal, pressed uparrow to return to
the gedit command and edited all the kernels.

Secondly, I like this tutorial because the menu stops giving me the time to choose between Debian and Windows XP. I am a Electronic Student and in London Ontario. I have to use both Operating Systems OS\'s until store start selling preloaded DeBian computers everywhere.

I can\'t wait for that day to come.

GreySpace.
Thank you, again I am a newbee
and this website is exactly what the doctor ordered.

[EDIT: I am very glad to have been some help to you. Become a member at the forum. It's small and not very active, but you'll learn more and maybe help others out. Always lurkers! Rock on]
password topsecret option
written by Efklsdjfaks, April 28, 2008
what does the "password topsecret" option do?

Write comment

security code
Write the displayed characters


busy
 
Creative Commons License © debiantutorials.org Thanks for dropping by. I hope you have found this site to be helpful.   Search for a local Computer Tech  debiantutorials.org