Sign in to follow this  
Followers 0
Ark Rat

Gaining Root Access to Red Hat Linux

12 posts in this topic

Alright, here's the deal:

In A+ class, we set up some old systems, and one of the class was fortunate enough to have Red Hat Linux be the OS. Unfortunately, it had a password protected Root, so unable to do anything. I was wondering if you guys knew anything could be done to circumvent the password so as to make a new one so they can use the terminal instead of just reformatting (which would take forever in my class). Open to all suggestions, including brute force scripts. Also necessary is a way to remote-access the terminal. We're not talking making it a zombie, just a way to crack its pw to reset it. Thanks in advance.

0

Share this post


Link to post
Share on other sites

Boot into single usermode (if LILO is the boot loader, then try: linux 1), and run the passwd command, which will allow you to set a new root password.

As for remote access, it may already have sshd configured, or perhaps telnetd if it is an oldish (<= 6.2?) release. Install or update OpenSSH, if you're concerned about security.

Check out http://www.tldp.org/ for some documentation.

Edited by Inode
0

Share this post


Link to post
Share on other sites

Hell, that's easier than I thought. I know its a 6.something version of Red Hat. I'll try that, and if it no worky, then I'll check my old Red Hat manual. Thanks, node.

0

Share this post


Link to post
Share on other sites

You can also pull the hard drive, place it in another Linux machine, and copy the /etc/shadow from the host Linux machine onto the RedHat machine whose root password you don't know. The password hashes for the system are stored in /etc/shadow, so replacing the one on the RedHat box with one from a Linux machine with a known root password will result in the RedHat machine's root password (and all other passwords, for that matter) becoming the same as whatever the passwords were from the host machine.

I recently did this to gain root access on some Sun Sparc Classic boxes I'd bought at an auction. They had Debian Linux installed, but no root password was provided, and I wanted to check them out before attempting a netboot install or anything. Fortunately, I still had an old Adaptec 50-pin PCI card that worked with the drives!

Edited by systems_glitch
0

Share this post


Link to post
Share on other sites

You could also use some live cd based linux distro, mount the particular partition you're interested in, change the root directory to the directory that the partition is mounted to (with chroot), and then execute passwd.

Edited by Inode
0

Share this post


Link to post
Share on other sites
Hell, that's easier than I thought. I know its a 6.something version of Red Hat. I'll try that, and if it no worky, then I'll check my old Red Hat manual. Thanks, node.

Hey what college do you go to? The un-named college I'm at here in Chicago also has an older passworded version of Red Hat sitting on our A+ Lab computers.

0

Share this post


Link to post
Share on other sites

Yo no attendo college, mi amigo. But I was wrong, it's not a 6.something. Its release 9. And I no longer need access, because the guy I was asking for just kinda scrapped the hard drive, and picked up another one. But that one had no OS, and we're tired of screwing around with it. It's time to move on anyway. Sides, I'm gonna learn Linux using a VPC anyway. Less hassle, although you do have to change some stuff to make the mouse work and to get the graphics to look un-wonky.

0

Share this post


Link to post
Share on other sites
Yo no attendo college, mi amigo. But I was wrong, it's not a 6.something. Its release 9. And I no longer need access, because the guy I was asking for just kinda scrapped the hard drive, and picked up another one. But that one had no OS, and we're tired of screwing around with it. It's time to move on anyway. Sides, I'm gonna learn Linux using a VPC anyway. Less hassle, although you do have to change some stuff to make the mouse work and to get the graphics to look un-wonky.

If he was my tech I would have smacked him around. If he is tampering with a linux machine he should know run levels. If he gives up and just replaces the hd, then he didn't get anything from troubleshooting his issue.

0

Share this post


Link to post
Share on other sites

Considering that Redhat 9 was end-of-life'd three years ago, I'd say that was a good call.

0

Share this post


Link to post
Share on other sites
isnt redhat server side up to RH7?

I haven't run RHEL, and haven't run a Redhat workstation (other than VMs for testing) since 9, but poking around a little bit shows that the latest version of RHEL is 5, and it's based on Fedora Core 6.

0

Share this post


Link to post
Share on other sites

ok, thought FC6 translated directly to rh enterprise server 6. good to know

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0