Home How to reset the OS back to the base permissions and uid/gids
Post
Cancel

How to reset the OS back to the base permissions and uid/gids

If your system have been compromised RedHat has a way to reset the OS back to the base permissions and uid/gids.

This is how you do it.

Resets uids and gids on files and directories:

for i in $(rpm -qa); do rpm --setugids $i; done

Resets perms on dirs & files:

for i in $(rpm -qa); do rpm --setperms $i; done
This post is licensed under CC BY 4.0 by the author.