LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-20-2011, 12:05 AM   #1
shaveta
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
secure login password


Protect against root password change

[Log in to get rid of this advertisement]
I have recently had to force a change of the root password on a linux box I was running. It was a test system which I had not used in a while, so I forgot the root password (not so smart).

Anyway, I found that it was amazingly easy to reset the root password. Here is a straight forward article on how to do it.
http://aplawrence.com/Linux/lostlinuxpassword.html

My question is: how can you protect against this? I see this as a security hole.

I understand that the user must have physical access to the computer, but if I want to lock the system down so you cannot easily enter single user mode or the root password cannot be changed.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-20-2011, 12:25 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 254Reputation: 254Reputation: 254
Greetingz!

It's called "Limit Physical Access". This is why important servers are stored behind locked doors, and console-access requires multi-factor authentication (usually something you know, like a password, and something you have, like a SecurID token).

The old saying; "If I can get to the server, you've already lost" really does mean something. However you can *try* the following;

BIOS Settings
(Implementing any of this is highly dependent on your BIOS that is on your motherboard. Read the manual for specifics)
1) Set a BIOS password
The "when entering Setup" password, not "every-time-the-computer-boots" password"

2) Set the BIOS to boot off of only the hard disk.
That means you tell the BIOS "don't look for a CD-ROM, then a floppy, then a USB stick, then the network" and so forth.
Exactly how you do this is going to depend on your MotherBoard manufacture.

3) Disable any sort of "diagnostic" menus your BIOS prompts you for.
This could be anything from "Hit F12 for boot menu" to "Hit F2 to run diagnostics"


GRUB
1) Password protect any "alternate boot" lines.
Here's a link for securing Grub 1.99. Might help.

Linux itself
1) Set the "noauto" option for /boot in your /etc/fstab.
You *did* create a separate filesystem for your /boot directory, right?
I mean, the kernel is stored there, that's really important!

2) Limit "sudo" usage.
Only specify exact commands. Don't give someone free reign on the system.
Also, don't allow them to use commands as root that let you escape to a shell
(Example: vi, vim, less...not sure what else you could use)

3) Patch your OS!
Might want to make sure you have backups first. I've seen Apache updates blow away web server configurations before...

4) For the truely paranoid, google-up some security scanners for Linux.
CIS has a few good documents and recommendations.
Might want to try the NIST guys, too.

5) If you're really insane, start reading up on SELinux.
Warning: It will drive you mad the first few weeks (months?) you use it.


If this post (or any others) help you out, make sure you mark that post helpful!
(This way others that have your same question will know!)


P.S: Please note that none of this will protect a server against someone standing in front of it with a screwdriver.
If you want to secure your data, use whole-disk encryption! The kind where you have to have a USB key plugged in when rebooting, and take the USB key out when it's done decrypting the drives.

Last edited by xeleema; 01-20-2011 at 12:28 AM. Reason: Added Encryption note.
 
2 members found this post helpful.
  


Reply



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
seen a Visual Password login for Linux? like the droids 9 circle password? szboardstretcher Linux - Software 3 03-07-2011 09:49 AM
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 09:59 AM
How to set login and password and root password in suse 10.2 sirius57 SUSE / openSUSE 8 07-24-2007 09:51 AM
Secure Password Management win32sux General 0 04-30-2005 08:11 AM
Secure Password Authenication danielrcummins Linux - Software 2 03-26-2003 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:53 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
Open Source Consulting | Domain Registration