disable root login through recovery option

Asked by shashi

Through "recovery mode" option in Ubuntu, anyone can login to system as "root" through "last option", which we get when we select "recovery mode" in grub(last option there). I need to disable that option to login as root from there.

How to disable that option?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
Best Sam_ (and-sam) said :
#1

You may edit /etc/default/grub.
Related line:
# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"

https://wiki.ubuntu.com/Grub2#grub%20%28/etc/default/grub%29

Revision history for this message
Jim Bauwens (jimbauwens) said :
#2

Better :
Just run 'sudo passwd root' and set a password for root.
Then when you are in the recovery menu it will ask for the root password.

Jim

Revision history for this message
shashi (mahesh25sastra) said :
#3

Sir,

I had set password root, then also it loginto root from recovery without
password.

Mahesh Shaw

On Tue, Aug 3, 2010 at 12:56 AM, Jim Bauwens <
<email address hidden>> wrote:

> Your question #119708 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/119708
>
> Jim Bauwens proposed the following answer:
> Better :
> Just run 'sudo passwd root' and set a password for root.
> Then when you are in the recovery menu it will ask for the root password.
>
> Jim
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/119708/+confirm?answer_id=1
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/119708
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
Mahesh Shaw
Final Year , B.TECH - ICT
SASTRA UNIVERSITY
THANJAVUR
TAMILNADU-613402
Mob: +91-9787852586

Revision history for this message
shashi (mahesh25sastra) said :
#4

THANKS

Revision history for this message
Sam_ (and-sam) said :
#5

For the record:
to disable recovery mode is the simple method.
Regarding local security anyone with access to pc may boot it from LiveCD.
However, almost nothing to lose when disk is full encrypted.
Advanced method:
Grub_2 menus can be encrypted. Since changes in /boot/grub/grub.cfg don't survive the next update, using separate scripts, outside from grub.cfg, is recommended, e.g. /etc/grub.d/40_custom or any script in /boot/grub, important is they need to be recognized from bootloader.
Reference.
http://www.ubuntugeek.com/how-to-set-grub-2-password-protection.html
http://www.gnu.org/software/grub/manual/html_node/Security.html#Security
http://www.gnu.org/software/grub/manual/html_node/Invoking-grub_002dmkpasswd_002dpbkdf2.html#Invoking-grub_002dmkpasswd_002dpbkdf2

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#6

A note if it is still active the edit of grub menu... a casual smart user can get fully access by edit the grub rows... also at root

Revision history for this message
Jim Bauwens (jimbauwens) said :
#7

The best way is to encrypt the harddrive, and add a bios password.
Although you can then simply remove the battery of the motherbord to reset then bios...

Revision history for this message
shashi (mahesh25sastra) said :
#8

LinkedIn
------------

I'd like to add you to my professional network on LinkedIn.

- mahesh shaw

mahesh shaw
Student at Shanmugha Arts, Science, Technology and Research Academy
Tiruchchirappalli Area, India

Confirm that you know mahesh shaw
https://www.linkedin.com/e/xpp6n6-ggg75yzt-6z/isd/1899786178/1CpO6gUF/

--
(c) 2010, LinkedIn Corporation