As far as I know, all information needed to specify the users available on the system is saved in /etc/passwd, along with /etc/shadow if you have shadow passwords enabled. Group information is saved in /etc/groups.
All these files are plain ASCII text, so I presume you could just make backups of these, and restore them later if something bad happens (actually, backing up the entire /etc/ directory wouldn't be a bad idea, since it contains config stuff for everything else too).
Though, I have not experimented much with backups... perhaps there is a better system for doing this.
By the way, nobody's password is actually saved anywhere. /etc/passwd (or /etc/shadow, if shadow is on) simply contains a string of garbage known as a hash. When you enter your password, it gets hashed into garbage in a particular way. If the garbage matches the garbage in /etc/passwd, you get to log in. The hash function is one-way, meaning you can't figure out what someone's password is from the hash (without a ridiculous amount of brute-force guessing). Just a tidbit of info if you are interested