You can probably fix the chmod. Al you need to do is figure which rpm packages are affected. Once you know the package you can find the original state by doing this:
Code:
# rpm -q --dump setup-2.4-2mdk|awk '{print $1,$6,$7}'
/etc/bashrc root root
/etc/csh.cshrc root root
/etc/csh.login root root
/etc/exports root root
/etc/filesystems root root
/etc/group root root
/etc/host.conf root root
/etc/hosts.allow root root
/etc/hosts.deny root root
...
I cut the listing short but you should get the Idea. If I totally screwed up my /etc directory I could use the output of that command to un-chmod everything. All I have to do is change the awk statement a little awk '{print $6":"$7,$1} and put the whole thing in a chmod.
Code:
# rpm -q --dump setup-2.4-2mdk|awk '{print $6":"$7,$1}'
root:root /etc/bashrc
root:root /etc/csh.cshrc
root:root /etc/csh.login
root:root /etc/exports
root:root /etc/filesystems
root:root /etc/group
root:root /etc/host.conf
root:root /etc/hosts.allow
root:root /etc/hosts.deny
Of course you need to find out which rpm packages are affected, which you can do by using rpm -Va. That will check all packages and report any modifications. But you are only concerned about user/group ownership so you could do something like this:
rpm -Va|grep [UG].
This will probably take a very long time. Once you find the modified files you just need to identify the package the file belongs to then you can re-chmod the files back to where they need to be.
There is probably an easier way but if so I don't know what it would be.