Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-27-2004, 08:57 AM
|
#1
|
Member
Registered: Feb 2004
Location: Linuxland
Distribution: Ubuntu 5.10, KUbuntu 5.10, Mandrake 10.1 - Ubuntu 5.04 (Hoary)
Posts: 346
Rep:
|
Preventing Linux from booting in Single User Mode
I am a Linux user and a Green Linux website owner. I know that there is a "vulnerability" in the Linux boot managers which allows anyone with physical access to the computer to change the "Root" password.
Can someone please describe in detail the steps required to secure both Lilo and Grub, so I can upload it to my website? As far as I know it involves setting up a password so that boot managers will not boot in single user mode without this password.
Thank you for your help.
|
|
|
10-27-2004, 09:12 AM
|
#2
|
Member
Registered: Aug 2004
Location: USA
Distribution: FreeBSD-5.4-STABLE
Posts: 252
Rep:
|
Generaly, I prefer to have single user mode and as this is an attack which can only be done localy, as long as people have comman sense they should be fine =).
|
|
|
10-27-2004, 03:28 PM
|
#3
|
Member
Registered: Feb 2004
Location: Linuxland
Distribution: Ubuntu 5.10, KUbuntu 5.10, Mandrake 10.1 - Ubuntu 5.04 (Hoary)
Posts: 346
Original Poster
Rep:
|
I understand, but I need to find out how to prevent the boot manager from loading the OS in single user mode to upload it in my website.
|
|
|
10-28-2004, 07:07 AM
|
#4
|
Member
Registered: Dec 2002
Location: California
Distribution: Slackware & LFS
Posts: 799
Rep:
|
I don't know about Grub, never used it, but for lilo, you need to add the following to your lilo.conf file:
Code:
password=""
restricted
You can add these globally or to specific images. You need to specify 'restricted' so the machine will be able to reboot normally (not single-user mode) without entering a password. Then when you run lilo, to re-install the boot loader, you'll be prompted to set the password.
You can find more info by running 'man lilo.conf'.
Don't lull yourself into thinking that this adds much security, however. Anyone with physical access to the box can still use a boot disk to get access.
BTW It seems rather suspicious that you continually refer to doing this remotely, yet you're concerned about restricting those with physical access to the machine.
Enjoy!
--- Cerbere
|
|
|
10-28-2004, 07:34 AM
|
#5
|
Senior Member
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517
Rep:
|
Before I get to the point, I would like to make a remark:
As soon as someone has physical access to the server, it will not help you protecting the boot manager with a password if there is a CD or floppy drive present. Using a bootable CD or floppy, everyone can get around your well-protected boot manager. Disabling those drives and setting a bios passwort will make it a little harder to get around this.
OK, here's a grub configuration:
simply set the parameter password=***** in menu.lst
If you would like to use an encryted password, you need to create it first on a console with the command grub-md5-crypt, this you type/paste as password -md5 ***** in menu.lst.
If you would like to have different menus for the adminstrator and user, add the 'alternative' menu.lst to the password line:
password -md5 $1$91nYZ/$6VqqiGwU74JXhKK9TngRD /boot/grub/secret-menu.lst
This information is from a german grub HowTO and I did not test it!
http://www.4demon.com/t_system/grub-howto.html
Last edited by abisko00; 10-29-2004 at 10:59 AM.
|
|
|
10-28-2004, 04:33 PM
|
#6
|
Member
Registered: Jul 2004
Location: Ireland
Distribution: Fedora Core 2
Posts: 70
Rep:
|
Well I agree with what everyone else said. If anyone gets physical access to your box, you're already screwed, so why disable single-user? Its increibly handly for un-borking your system if you don't something stupid.
|
|
|
10-29-2004, 10:50 AM
|
#7
|
Senior Member
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028
Rep:
|
You donät have to entirely disable single user mode. set a secure enough password to enter single-user mode.
Don't know the procedure of hand.
As earlier stated, with physical access there is nothing called secure. The web a flooded with BIOS password recovery tools. Get a good lock on the server room, that should enhance the security.
|
|
|
08-28-2009, 01:15 AM
|
#8
|
LQ Newbie
Registered: Aug 2008
Posts: 2
Rep:
|
Enable Authentication for Single-User Mode
Single-User mode is used for a system recovery. However, by default, no authentication is used if single-user mode is selected. This can be used to bypassing security on the server and gaining root access. To enable authentication for single-user mode, open the /etc/inittab, file:
# vi /etc/inittab
Add the following line to the file:
~~:S:wait:/sbin/sulogin
Save and close the file.
PS: This method is just for education purpose only. As stated above there is no use of preventing Single-User Mode if physical accessibility is there.
Source: http://www.cyberciti.biz/tips/tips-t...le-access.html
|
|
|
08-28-2009, 08:12 AM
|
#9
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
ashvaibhav, please don't bring dead threads back to life (necroposting). We value your time and energy, and encourage you to spend it helping members with current issues. I'm closing this zombie thread so it may rest in peace.
|
|
|
All times are GMT -5. The time now is 04:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|