Results 1 to 6 of 6
  1. #1
    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

  2. #2
    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

  3. #3
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    14,135
    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

  4. #4
    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 scheme
    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

  5. #5
    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

    Rus
    Russ Foster - Industry Curmudgeon
    Freelance Sysadmin for Hire - email vaserv@gmail.com

  6. #6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •