LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2014, 10:03 PM   #1
Logomachist
LQ Newbie
 
Registered: Aug 2009
Posts: 28

Rep: Reputation: 0
Unhappy Trouble password protecting Grub


I'm trying to password protect my Grub 2 boot entries. This is how I've modified the menuentry lines in 10_linux according to the directions I've read on the web. I've created users and passwords in 40_custom, and I've run update-grub. The "superuser" I set in 40_custom is recognized and I get asked for a password if, for example, I press 'c' to access the grub prompt. However Grub does not ask me for a password when I select one of the menu options.


Suggestions?

Here's my grub.cfg: http://privatepaste.com/ce751d6c85
 
Old 05-24-2014, 12:32 AM   #2
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
What distro?
 
Old 05-24-2014, 09:08 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 8,845

Rep: Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847Reputation: 1847
Quote:
However Grub does not ask me for a password when I select one of the menu options.
The quote below is from the Ubuntu page you linked in your initial post which states it is only required if someone attempts to edit Grub2.

Quote:
If any form of GRUB 2 password protection is enabled, the superuser's name and password are required to gain access to the GRUB 2 command line and menu-editing modes.
 
Old 05-26-2014, 09:37 PM   #4
Logomachist
LQ Newbie
 
Registered: Aug 2009
Posts: 28

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
The quote below is from the Ubuntu page you linked in your initial post which states it is only required if someone attempts to edit Grub2.
But there are also instructions for preventing Linux from booting without a password:

Quote:
Originally Posted by https://help.ubuntu.com/community/Grub2/Passwords
Once a superuser and password are identified, the password feature is enabled the GRUB 2 menu will appear as it does normally. When a menu item requiring a password is selected, the user will be prompted to enter the correct username and password. If entered correctly, the selected menuentry will continue to boot. If incorrect, the user will be returned to the GRUB 2 menu.

If GRUB 2 is set up to boot directly to a password-protected menuentry without displaying a menu, the username/password prompt will appear and booting will not occur until they are correctly entered.
Similar directions are provided on other sites too:

Quote:
Originally Posted by http://www.howtogeek.com/102009/how-to-password-protect-ubuntus-boot-loader/
Ubuntu’s Grub boot loader lets anyone edit boot entries or use its command-line mode by default. Secure Grub with a password and no one can edit them — you can even require a password before booting operating systems.
(emphasis mine).

And I'm running Kubuntu.
 
Old 05-26-2014, 11:45 PM   #5
Logomachist
LQ Newbie
 
Registered: Aug 2009
Posts: 28

Original Poster
Rep: Reputation: 0
Question Update: I added "--users" to 10_lupin too but still no password solicitation to boot

I've continued trying to get Linux to ask for a password before booting, to no avail.

One thing I tried was to run grub-mkconfig and I'm not sure what that did, if anything. Its output, however, alerted me to the fact that 10_linux seems to be ignored when creating grub.cfg and /etc/grub.d/10_lupin is used instead. I added the "--users [usernames]" into the menuentry lines in 10_lupin too, but that hasn't done the trick.

Here's my current grub.cfg: http://pastebin.com/bEAj4e42
And here's my 10_linux: http://pastebin.com/KfAwcM9y
And here's my 10_lupin: http://pastebin.com/4A4DJ7Uy
 
  


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
password protecting a folder ankit_mcgill Linux - General 4 04-14-2006 04:46 AM
HTML password protecting darin3200 General 19 06-03-2003 04:13 AM
Password Protecting OS's in LILO Bigun Linux - General 8 05-09-2003 03:46 AM
password protecting directories jayakrishnan Linux - General 2 02-10-2003 06:49 AM
password protecting a webpage jonfa Linux - General 5 03-22-2002 07:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:01 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration