Results 1 to 6 of 6
Thread: Etc renamed, Cant login
-
05-28-2005, 02:46 PM #1Retired Moderator
- Join Date
- Mar 2004
- Location
- Singapore
- Posts
- 6,990
Etc renamed, Cant login
I have a fantastic client who renamed his /etc to /oldetc then complain to me that he now can login to access his RHEL 4 server : (
Anyway to help that guy? Cant even access the server to rename back to /etc
-
05-28-2005, 06:45 PM #2Web Hosting Master
- Join Date
- Apr 2003
- Location
- NC
- Posts
- 3,093
Grab a remote kvm, or if you have physical access, and reboot the box into single user mode. You should be able to rename it there. If single user mode does not work download something like the knoppix-std cd, boot from it, mount the drive, and rename /etc.
John W, CISSP, C|EH
MS Information Security and Assurance
ITEagleEye.com - Server Administration and Security
Yawig.com - Managed VPS and Dedicated Servers with VIP Service
-
05-29-2005, 04:07 PM #3
Even in Single User Mode, you can not login without /etc. SU mode isn't anything but a local only mode which allows only one login, no X, nothing else. It still requires the root password, which, since it can't be obtained using shadow, will not work properly.
Your best hope at this point is a rescue cd with which you can mount the drive and move oldetc back to etc, but that may not even work as it should. A "live" cd might work, as long as you could mount the drive still.
lesson to learn? Don't mess around with crap unless you know what you're doing, because you CAN seriously screw this stuff up.Tom Whiting, WHMCS Guru extraordinaire
Linux problems? WHMCS Problems? Give me a shout
Check out my WHMCS Addons
-
05-29-2005, 04:31 PM #4Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
Linux-Tech
there is no reason why he wouldnt be able to mount the old drive. its not damaged or anything.
pop the disk in (i use slax)
mount /dev/hda1 /mnt
mv /mnt/oldetc /mnt/etc
take disk out and reboot.
please note /dev/hda1 need to be changed to match your partition schemeSteven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance
-
05-29-2005, 04:36 PM #5Web Hosting Master
- Join Date
- Jun 2003
- Location
- UK
- Posts
- 6,616
You might be able to boot it on the kvm and do
kernel init=/bin/sh
Which should avoid /etc
mount -o rw,remount /dev/hdax /
mv /oldetc /etc
RusRuss Foster - Industry Curmudgeon
Freelance Sysadmin for Hire - email vaserv@gmail.com
-
05-29-2005, 04:38 PM #6Problem Solver
- Join Date
- Mar 2003
- Location
- California USA
- Posts
- 13,681
Originally posted by vaserv
You might be able to boot it on the kvm and do
kernel init=/bin/sh
Which should avoid /etc
mount -o rw,remount /dev/hdax /
mv /oldetc /etc
Rus
Thats true. Never even thought of that.Steven Ciaburri | Industry's Best Server Management - Rack911.com
Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance