Find the answer to your Linux question:
Results 1 to 6 of 6
as the title says, there was a screw up earlier today done by me due to some stupid reasons and now I have a whole system with all the permissions ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    2

    chown -R root:root / screw up


    as the title says, there was a screw up earlier today done by me due to some stupid reasons and now I have a whole system with all the permissions changed to root.

    I still have access to root right now, but I can't su from other sessions and I really need to, I also don't have list of the system permissions to start fixing this mess I caused

    Any tips on what to do/list of perms of the system to fix this?

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,387
    In theory, you could (force-) reinstall each and every package of your system,
    but imho that doesnt pay off in terms of time compared to a re-install.

    My advice would be:
    Save your configs and data, reinstall and apply the config and restore the data.
    Then file that episode under "lesson learned: be careful with root privileges"
    No offence
    Last edited by Irithori; 06-18-2010 at 06:30 AM.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    2
    Good advice and in any other situation, I would have done it already, but a reinstall isn't an option in this case, hence this thread for new ideas.

    Can I get a list of perms for /etc/shadow and /etc/passwd and /bin/bash

    preferably if on an arch system, but others will suffice, ty

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,539
    Did you only run chown -R root.root / (changing ownership), or did you also run chmod as well? If you only changed ownership, you still have a lot of work to do since a lot of tools/services run as alternate users such as sshd, rpc, named, ntp, mysssql, clamav, etc. I think I have about 60 or so of those on my system. You can look at /etc/passwd to find out which those accounts. As for user files in /home, those you can change easily enough. In any case, some services will refuse to run if their configuration files are not owned by the appropriate account or have the wrong permissions. Good luck!

    Personally, I'd backup all the user and other volatile data, and then wipe and reinstall the system. That would probably be the fastest way to get back into service.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,539
    BTW, this is one of the reasons why I keep a regular bit-image backup of my operating system, plus daily backups of changed files, so I can restore the OS easily in cases where I really blow up the system. That doesn't happen often, but it does happen - usually when it's late and I'm tired. Trust me, every sysadmin has at one time or other forgot they were at / as root and executed 'rm -rf *' and then went "Oh, s**t!"...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #6
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3
    You should really only need to chown the home directories back to the specific users. Everything else is usually owned by root but the file perms lets other users interact with them. If you only did a chown and didn't chmod anything, just chown the home directories back and you should be ok.

Posting Permissions

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