LinuxQuestions.org
Visit Jeremy's Blog.
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 05-31-2004, 06:43 PM   #1
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Rep: Reputation: 30
Question Root Access


Just out of curiosity, if I were to forget say my root password is there a way I can gain access without having to re-install?.

Moderators - I'm not sure if this is entirely a security question but from my perspective it seems to be
 
Old 05-31-2004, 06:58 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Yes, search for "linux single", and you'll find a number of threads.
 
Old 05-31-2004, 07:48 PM   #3
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
ranger_nemo,

I tried some of the suggestions but none of them seem to work in particular linux single
 
Old 05-31-2004, 08:09 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I'm not sure if this is entirely a security question
Yes it is. Amongst other things it shows one should think about physical security, running sulogin and not having the BIOS boot from fd/cdr.


I tried some of the suggestions but none of them seem to work
Please tell what doesn't work instead of *saying* it doesnt work.
 
Old 05-31-2004, 08:12 PM   #5
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
unSpawn,

Sorry I wasn't clear. When I said it doesn't work is that the kernel always goes inot panic mode and fails to boot.
 
Old 05-31-2004, 08:27 PM   #6
linuxzouk
Member
 
Registered: Apr 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 93

Rep: Reputation: 15
http://kitech.com.my/fedoraguide/ind...gerootpassword

Last edited by linuxzouk; 06-01-2004 at 01:18 AM.
 
Old 05-31-2004, 08:29 PM   #7
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
You assume I use Fedora which I am not.
 
Old 05-31-2004, 08:31 PM   #8
linuxzouk
Member
 
Registered: Apr 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 93

Rep: Reputation: 15
it's an example, should work the same for your distro...

you using redhat right? put in redhat cd1
then when u see boot, type "linux rescue"
then follow instructions
when u see the prompt
# chroot /mnt/sysimage
# passwd root

should be something like that
 
Old 05-31-2004, 08:35 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
When I said it doesn't work is that the kernel always goes inot panic mode and fails to boot.
Please describe what bootloader you're using and what bootloader arguments you added? If there's anything else different from booting a default Linux install, please tell.
 
Old 05-31-2004, 08:36 PM   #10
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
so anyone with a redhat cd could potentially reset my password?
 
Old 05-31-2004, 08:37 PM   #11
linuxzouk
Member
 
Registered: Apr 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 93

Rep: Reputation: 15
yes! not only reset password but can have full access

read this, it applies to redhat too and i think most linux
http://kitech.com.my/fedoraguide/ind...#basicsecurity

Last edited by linuxzouk; 05-31-2004 at 08:46 PM.
 
Old 05-31-2004, 08:50 PM   #12
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
unSpawn,

I am using Red Hat default bootloader. Hmm, I don't have immediate access to my linux box at the moment but I remember adding single and 1

linuxzouk,

I suppose I should disable running the CD-ROM from BIOS. Is there any other way I could prevent the user from gaining full access by simply using the Red hat CD.
 
Old 05-31-2004, 08:59 PM   #13
linuxzouk
Member
 
Registered: Apr 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 93

Rep: Reputation: 15
SET A GRUB PASSWORD

A user can have root access even without login and redhat rescue cd (if you do not set grub password)

i have not tested it on redhat, but should work in general

1) At your RedHat boot loader
-type 'a' to modify the kernel arguments before booting

2) Once you see the prompt, Add "1" to the end of the argument put a space before 1 eg.
-grub append> blah blah blah 1

3) When you see the prompt, you have root access

<going to add this topic to my guide>

Last edited by linuxzouk; 05-31-2004 at 09:08 PM.
 
Old 05-31-2004, 09:12 PM   #14
Obie
Member
 
Registered: Apr 2004
Distribution: Red Hat
Posts: 290

Original Poster
Rep: Reputation: 30
That seems easy enought but is there a way to prevent any of these issues?
 
Old 05-31-2004, 09:15 PM   #15
linuxzouk
Member
 
Registered: Apr 2004
Location: Malaysia
Distribution: Fedora Core
Posts: 93

Rep: Reputation: 15
have u read

http://kitech.com.my/fedoraguide/ind...#basicsecurity

it should answer your question (applies to redhat too)

maybe there is other ways that i am not aware of, if you found any! just let me know
 
  


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
How to get root access?? anjum Ubuntu 7 08-09-2005 10:47 AM
root access pazvant Linux - Security 4 03-12-2005 09:41 AM
need help with root access gue_andy Linux - Software 1 02-07-2005 11:47 AM
getting access to the root deathmonkey Linux - Software 6 09-10-2003 12:27 AM
Root don't have access Rabbit Linux - Hardware 2 10-03-2002 04:54 PM

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

All times are GMT -5. The time now is 10:42 AM.

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