LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-12-2005, 08:29 PM   #1
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
Hacking root locally


Hi,

I know everyone's run into the problem of forgetting the root password and not being able to log in.

I learned this little trick in school but I'd like to know if this works with all Linux distros. As of this moment I've tested it with Suse 9.1 Professional and Fedora Core 3 using both LILO and GRUB.

To gain root access, at the boot screen you have to type the following as the boot option:
init=/bin/bash

Linux should then give you a command prompt. Next type
mount -o rw,remount / to remount the root filesystem read-write. Then you can run passwd to change the root password. Once that is done type
mount -o ro,remount / and then hit CTL+ALT+DEL to reboot the system. You should then be able to login using the new password.
 
Old 02-12-2005, 10:02 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
It will work, provided that no authentication has been set up in the bootloader for people who try to change kernel params. GRUB and (I believe) LILO support adding a password that a user must enter before being able to change the kernel command line.
 
Old 02-12-2005, 10:37 PM   #3
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
it may be easier to bypass the bootloader password by just using a knoppix cd to access the hard drives
then mounting the partition that contains /etc/passwd
then issuing the passwd command to your new password?
 
Old 02-12-2005, 10:51 PM   #4
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Original Poster
Rep: Reputation: 30
Is setting a password on the bootloader a common practice?
 
Old 02-12-2005, 11:29 PM   #5
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
no

if you want someone to use your pc locally you would give them an account aka userid
giving them a bootloader password does not help them......it may scare off some intruders but if that is your aim consider a bios password.

Unless you put a lock around your case so keyboards can not removed power switches touched etc i don't see how much paranoria you need.....

btw a bios passwd can be bypassed......remove bat
a bootloader passwd can be bypassed.....knoppix
a login passwd can be be bypassed......knoppix

if your system is not fully encrypted......mine isn't and i don't see the point.
 
  


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
Display locally UltraSoul Solaris / OpenSolaris 3 05-01-2005 07:37 AM
Hacking Exposed Wireless Hacking Chapter prompt Linux - Wireless Networking 0 05-08-2004 02:44 PM
sendmail - works locally but not from outside ereeno Linux - Software 5 02-03-2004 12:40 AM
Hacking into root protection jscerb Linux - Security 5 11-07-2003 05:30 PM
Can't Login Locally As Root Sword Linux - General 5 08-01-2003 03:25 PM

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

All times are GMT -5. The time now is 07:23 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