Results 1 to 4 of 4

Thread: oops, chown used the wrong way

  1. #1
    Join Date
    Mar 2013
    Beans
    31

    oops, chown used the wrong way

    I accidently used sudo chown <username> -R / instead of just everything from the point down. Now pretty much is messed up. some of the stuff was permission denied, but appearntly I messed up quite a bit anyway. I can't even backup my home directory right now.

    I'm getting this message when doing sudo
    Code:
    sudo: /etc/sudoers is owned by uid 1000, should be 0
    sudo: no valid sudoers sources found, quitting
    sudo: unable to initialize policy plugin
    What can I do? Atleast I want to repair it enough so that I can backup my home directory.

  2. #2
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,163
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: oops, chown used the wrong way

    This way the system is messed up so badly that the fastest way to fix it is reinstalling. Usually you should still have access to your home directory, but if you don't, you can try a live disk. That will definitely give you access to everything and allow you to make the backups you need. The live disk is the same as the installation disk, so you'll need is anyway.

  3. #3
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: oops, chown used the wrong way

    I might try a couple of things, but you will have to reinstall as the settings are not just root but other system owners and it would take forever to fix them all.

    I would use live installer to copy /home first

    You might just try changing everything to root and then change /home to you, but a lot of things still will not work as neither root nor you are the correct owner.

    These are the settings for /home 0 some duplicate as I copied from different places.
    Sometimes there are dmrc errors or permission errors and this has how to correct them:
    https://help.ubuntu.com/community/dmrcErrors
    #Replace all instances of username with your login name or use $USER
    sudo chown username:username /home/username/.dmrc
    chmod 644 /home/$USER/.dmrc
    sudo chown $USER:$USER /home/username
    sudo chown $USER:$USER /home/username/.ICEauthority
    sudo chmod 644 /home/username/.ICEauthority
    sudo chmod 644 $HOME/.ICEauthority
    look at the permissions on ~/.Xauthority, too. It often gets changed when ~/.ICEauthority gets changed. The same fix applies.



    You can try a "dirty" install or where you just overwrite files (no reformat) and keep data. But I would backup first. Probably still have to reset /home.


    Over install without formatting to reuse same home data. "Dirty Install"
    System settings or anything in / may be overwritten with defaults. Good backups still important
    https://help.ubuntu.com/community/UbuntuReinstallation
    http://ubuntuforums.org/showthread.php?t=1941872
    Last edited by oldfred; August 30th, 2013 at 08:13 PM.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  4. #4
    Join Date
    Jul 2005
    Location
    England
    Beans
    13,527

    Re: oops, chown used the wrong way

    I think you will have to backup your home either using a live session from DVD or USB or you may just be lucky enough to be able to boot to recovery mode from the grub menu, though I think that could be impossible as well if file permissions and ownership are incorrect.
    DISTRO: Xubuntu 12.04-64bit --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo

Tags for this Thread

Bookmarks

Posting Permissions

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