'ChangeUserGroupId' changes the user and group id's of files.
Starting with a specified directory this program traverses recursively through
all directories below the specified directory (not following symbolic links)
and changes the user and group id's of all files.
The files 'table_user_id' and 'table_group_id' specifies which old id's
have to be changed to which new values.
This program also translates present password and group files ('passwd_old',
'group_old') to new ones ('passwd_new', 'group_new').
Since it changes the user and group id's you must have super user privilege
to run this program.

SPEED
=====
It took 65 minutes to translate a directory-tree of 6.1 GBytes.

FILES
=====
ChangeUserGroupId.c   C-program for changing user and group id's
ChangeUserGroupId*    Executable for sun4 and SunOS 4.1.3
makefile              Make file to build 'ChangeUserGroupId*'
UserTable*            Shell-program, generates the 'table_user_id' file
GroupTable*           Shell-program, generates the 'table_group_id' file
EdQuota*              Shell-program, generates commands to change quotas
table_user_id         Example translation table for user id's
table_group_id        Example translation table for group id's
passwd_old            Example password file with old user and group id's
group_old             Example group file with old group id's
ReadMe                This document

WARNING
=======
- Do not change anything in the filesystem while 'ChangeUserGroupId' is
  running! Otherwise the translation program may get confused!
- Make sure that nobody is logged in.
- Adjust the quotas right after the translation of user and group id's. 
  You may get troubles if you reboot the machine before doing so.

######################################## E X A M P L E #########################

##### cat table_user_id 
1002  5017
5101  5450
1000  5000
1001  5002
5102  5451
##### cat table_group_id 
100  500
130  503
110  501
120  502
140  504
200  506
##### ChangeUserGroupId | tee logfile
old uid -> new uid
   1000 ->    5000  demoline
   1001 ->    5002  duenki
   1002 ->    5017  kreier
   5101 ->    5450  icctpc
   5102 ->    5451  versaplo

old gid -> new gid
    100 ->     500  isi
    110 ->     501  research
    120 ->     502  prof
    130 ->     503  guest
    140 ->     504  stud
    200 ->     506  external

ok to use this translation table [y/n]: y

password file is translated: passwd_old -> passwd_new
 
group file is translated: group_old -> group_new

directory to start with translation   : /home

translation started

translating    /home
translating    /home/isi
translating    /home/isi/guest
translating    /home/isi/prof
translating    /home/isi/research
 1595 chown in /home/isi/research
translating    /home/isi/stud
 1600 chown in /home/isi
translating    /home/other
translating    /home/other/external
  762 chown in /home/other/external
  767 chown in /home/other
 2384 chown in /home

translation done
##### cat passwd_old 
demoline:pw:1000:110:gecos:/home/isi/research/demoline:/usr/local/bin/tcsh
duenki:pw:1001:110:gecos:/home/isi/research/duenki:/usr/local/bin/tcsh
kreier:pw:1002:110:gecos:/home/isi/research/kreier:/usr/local/bin/tcsh
icctpc:pw:5101:200:gecos:/home/other/external/icctpc:/usr/local/bin/tcsh
versaplo:pw:5102:200:gecos:/home/other/external/versaplo:/usr/local/bin/tcsh
##### cat passwd_new 
demoline:pw:5000:501:gecos:/home/isi/research/demoline:/usr/local/bin/tcsh
duenki:pw:5002:501:gecos:/home/isi/research/duenki:/usr/local/bin/tcsh
kreier:pw:5017:501:gecos:/home/isi/research/kreier:/usr/local/bin/tcsh
icctpc:pw:5450:506:gecos:/home/other/external/icctpc:/usr/local/bin/tcsh
versaplo:pw:5451:506:gecos:/home/other/external/versaplo:/usr/local/bin/tcsh
##### cat group_old 
isi:*:100:demoline,duenki,kreier
research:*:110:demoline,duenki,kreier
prof:*:120:
guest:*:130:
stud:*:140:
external:*:200:icctpc,versaplo
##### cat group_new 
isi:*:500:demoline,duenki,kreier
research:*:501:demoline,duenki,kreier
prof:*:502:
guest:*:503:
stud:*:504:
external:*:506:icctpc,versaplo
#####

################################################################################
