Open file : /boot/grub/menu.lst
There add or modify line :
password <give here your password>
If you want your password to be more secure then you can encrypt it,
For that first run following command:
grub-md5-crypt
It will then ask you for password to encrypt then shall give output of random characters ie. encrypted password.
Copy that and post into same file ie. /boot/grub/menu.lst with -md5 in front of "password directive" .
So should be now.
password -md5 AeozDoktasokaXasdfasd
here "AeozDoktasokaXasdfasd" is random password generated by that command.
This is to increase security, now only you know the real passwrd, even if someone open that file but cannot understand the password.