Did it completely crash immediately after you saved? That would be ... well ... really odd. I'm not very sure how PAM works and what it does, though, so yeah.
If you uninstall the PAM packages, might that help? Which distro is this? If Mandrake, there's a software manager program that you can use to uninstall the packages; if RedHat, there may be something similar, but I'm not sure.
It may suffice to just chown and chmod the /dev/nvidia* files, as well -- I'm not quite sure how often the PAM daemon thingy (I'm assuming it's a daemon, I guess it may not be) runs.