Moved private folder... Can't move it back!

Discussion in 'macOS' started by Masna, Feb 7, 2010.

  1. Masna macrumors newbie

    Joined:
    Apr 20, 2007
    #1
    I moved my Mac HD's private folder to the trash not knowing that it stores thousands of crucial UNIX folders (one of which that stores the admin password). I haven't yet trashed it, but I can't move it back to its original location because when I try to do that Leopard asks for the admin password but the password doesn't exist anymore because it's been moved to the trash. Is there anyway I can remove the private folder from the Trash and put it back? Maybe some kind of Terminal command?

    Thanks!
     
  2. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #2
    This is a tough one.

    You could *maybe* do this in Terminal, the problem is you will need admin privileges since the private folder is owned by root.

    Here is the command though:
    Code:
    sudo mv ~/.Trash/private /
    It is going to ask for a password. Good luck.
     
  3. Masna thread starter macrumors newbie

    Joined:
    Apr 20, 2007
    #3
    Geez, just when I thought things couldn't get any worse...

    When I try to open Terminal, I get this: "You are not authorized to run this application. The administrator has set the shell to an illegal value."
     
  4. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #4
    I would recommend Single User Mode, but that isn't going to work either. And once you reboot, your options have dwindled.

    I would backup your data (if you can) and reinstall. Or do an archive and install.

    I am not sure what computer you have, but a possibility is to take out the HD and put it into an enclosure or another computer and use the "Ignore Permissions option."

    You are stuck in a vicious loop. I would worry about making sure you data is secure and reinstall.
     

Share This Page