> After chmod'ing -R 777 /etc/ by accident, the system refuses to > login, and complains about the wrong permission on /etc/pam.conf. > chmod 777 would remove setuid, setgid and the sticky bit from all > files. > How to recover from it quickly? > Tried to chmod back /etc/pam.conf to 644 via booting from a CD, but > it still didn't work.
"pkgchk -f" However, this will only fix those files/directories that have entries in the package manifests, so it's not going to get your system back to the way it was (as I expect things like what lives under /var/ sadm/ to not get their proper permissions back, as the files there don't show up in package maps) . Restoring from backup is probably the better approach (depending on the way backups are made it may be possible to retrieve the permissions from the backup media, and do some scripting to reset permissions on the system without having to copy back any data). Bart