Re: UID reorganization (Summary)

From: Jim Knutson (
Date: Tue Jan 23 1990 - 10:35:11 CST

Well, I've stopped getting replies to my query and I'm about to do the dirty
deed. It looks like I'll be using Chris Torek's package. The following is
a summary of the responses I got.

5 people pointed me to Chris Torek's UID Unification package. It includes
man pages and resides on as unify_uids.tar.Z. This package won't
compile as is under SunOS 4.0.3, but the changes are trivial:

        1. Change <sys/{quota,inode,fs}.h to

        2. Change short to unsigned short in
                checkfix.c - 1 line
                fixlastlog.c - 1 line
                fixquota.c - 1 line
                mapfile.c - 1 line
                zap.c - 1 line

        3. Do a make depend and then make.

2 people pointed me to some software written by Liudvikas Bukys <>. ]ke Sandgren <> has Sys V fixes for the software, but it does run under SunOS 4.x. The software is available from as pub/chug.tar or pub/chug.shar. Chug doesn't include any
man pages. It remaps UIDs in two passes by first mapping them to an intermediate
form and then to the final form. This is for safety and allows the process to
be interrupted (e.g. system crash) and re-run. There may be a bug with SunOS 3.4,
but the README file talks about it.

2 people pointed me to pwdiff which was posted to comp.sources.unix in March
of 1989. Pwdiff is a tool to aide in merging password files. It looks like it
should be available off of uunet in the Volume 18 archives.

Fletcher Mattox <> hacked fsck to change the uid/gid
of each inode as it made it's pass. Mapping was done by a configurate file.
He may have the diffs around somewhere.

Bruce Barnett <> sent me a note that he had written
a program in which you give it an old and new password file and/or an old and
new group file and it would either show you the changes or it would actually
do the changes. It may need a line or two changed, but did work on Sun's and

Colin Grant <logcam!> sent a note about a uid database program
he had written which keeps a central database of users and their uids. The system
is reasonable portable and is tested under 4.2, SunOS 4.0.3 and MSDOS.

Gary Duncan <> wrote a note about a program called fsid
he had written when they reorganized their UID/GID space. It's not well documented
or commented and was written as a throway, but is available. It works as follows:

        fsid /filesystem > idmap # get list of uid/gid pairs with counts
        <edit> idmap # replace counts with new uid/gid pair
        fsid -x idmap /filesystem # pretend to change filesystem
        fsid -x idmap -X /filesystem # really change filesystem
        <edit> /etc/passwd /etc/group # update passwd and group file
        fsid /filesystem # check how the new space compares

Jim Knutson!milano!knutson

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:05:55 CDT