#### This is preparation for the resync, to save non-Moira users. ####
First, get a recent copy of the prdb, and extract non-Moira entries:
- /moira/bin/udebug aggy -port 7002
- rcp -px root@aggy:/usr/afs/db/prdb.DB0 prdb.old
- /moira/bin/udebug aggy -port 7002
+ /moira/bin/udebug prill -port 7002
+ rcp -px root@prill:/usr/afs/db/prdb.DB0 prdb.old
+ /moira/bin/udebug prill -port 7002
If the two udebugs show that the version changed, lather-rinse-repeat.
-(udebug can be found in afsuser; "aggy" here and below is some DB server)
+(udebug can be found in /usr/athena/bin; "prill" here and below is some
+DB server)
(Also check for "0 of them for write" at the end. It might matter.)
/moira/bin/pt_util -x -m -u -g -d prdb.extra -p prdb.old
the old prdb for being reincorporated into the new prdb.
awk -F\| '$9 == 3 {print $1}' /backup/backup_1/users > /tmp/deactivated
- perl -e 'for(`cat /tmp/deactivated`) { chop; $ex{$_}=1;} \
- $punt=0; foreach $L (`cat prdb.extra.sort`){ \
- @w=split(/ /,$L); $_=$w[0]; if ( /:/ ) \
- {@x=split(/:/,$w[0]); if($ex{$x[0]}) {$punt=1;}else{$punt=0;}} \
- print $L unless $punt==1;}' > prdb.extra.trimmed
+
+and the following perl script:
+
+#!/usr/athena/bin/perl -w
+
+open(OUT, ">prdb.extra.trimmed");
+
+for ( `cat /tmp/deactivated` ) {
+ chop;
+ $ex{$_} = 1;
+}
+
+$punt = 0;
+
+foreach $L ( `cat prdb.extra.sort` ) {
+ @w = split(/ /,$L);
+ $_ = $w[0];
+ if ( /:/ ) {
+ @x = split(/:/,$w[0]);
+ if ($ex{$x[0]}) {
+ $punt=1;
+ } else {
+ $punt=0;
+ }
+ } else {
+ # If we got here, we're either a user, a prefixless
+ # group, or a group member.
+ $punt = 0 if $w[0];
+ }
+ print OUT $L unless $punt == 1;
+}
+
+close(OUT);
+exit 0;
+
to remove the personal groups for users who are deactivated
awk '/^[^ ][^:]*@/ {printf "KERBEROS:%s\n",$1}' prdb.extra.trimmed \
becasue we didn't trim the prdb.extra.sort file in the past.))
Assuming htese errors are due to a username change, the groups should
be renamed, and you should regenerate prdb.extra.trimmed starting with
-a fresh prdb from aggy. (You may want to abort and
+a fresh prdb from prill. (You may want to abort and
rm /moira/afs/noafs and try again later.)
pts listmax > prdb.listmax