Synchronize /etc/passwd between two hosts
Currently loading pw_sync and running 'run' demostrates the passwords being read and compared.
- The program reports missing users and corersponding uids.
- It also reports UIDs and user names where the UIDS are incorrect for the specified uder.
The source layout is setup up for doing an analysis of two passwords files. The default files are the /etc/passwd from a host mounted at /usr/ghost, and /etc/passwd of the current system--see pw_sync.pl to see where this is determined.
To run, load prolog. Consult pw_sync.pl. Run the goal 'run.' The run produces a report.
(this is not yet implimented)
-
Get a list of all files belong to the current host. The list must contain file ownerships. find / /usr /var /srv -fprintf /etc/perms.new "%04m %14u %14g %p\n" mv -b /etc/perms{,.bak}
-
Find users and groups the have the same meaning but different names on the two hosts. Create rules translate betwee the two naming conventions.
-
Run the annalysis and take action. Place the control (ideal) passw and group file on the new/current system (system must be halted.) Replace the items having the same function but diffent names with the names used on the new system. Add any missing users and groups to future prof the new system.
-
Use the ownerships in /etc/perms (or perms.new) to reassign the user and group ownenership of filysystem objects.