[1130] in Moira

home help back first fref pref prev next nref lref last post

duplicate unix_uid values

daemon@ATHENA.MIT.EDU (David K Krikorian)
Thu Nov 6 05:39:31 1997

Date: Thu, 6 Nov 1997 05:39:25 -0500
From: David K Krikorian <dkk@MIT.EDU>
To: danw@MIT.EDU
Cc: moiradev@MIT.EDU

We've had duplicate unix_uid values in the Moira users table for a
while now.  I manually set numvalues past these the last time we hit
them, but we just wrapped around in IDs again.

Loads of new users hit these values (below 1000) and die because while
the load program is searching for the next free ID, it gets that there
is more than one record with a given ID, and can't deal.

Here are lines 566 through 575 of src/regtape/employee.pc, in the
function set_next_uid():

    while (flag) {
	value++;
	if (!high && value > MAX_ID_VALUE)
	    value = MIN_ID_VALUE;
	flag = 0;
	EXEC SQL SELECT unix_uid INTO :flag FROM users WHERE unix_uid = :value;
	if (sqlfail()) sqlexit();
	if (sqlca.sqlerrd[2] == 0)
	  flag = 0;
    }

FYI, the duplicates:

SQL> select u.clearid, u.unix_uid, u.status, u.login, u.last from users u,
  2  users u2 where u.unix_uid=u2.unix_uid and u.users_id!=u2.users_id
  3  order by unix_uid;
 
CLEARID            UNIX_UID     STATUS LOGIN    LAST
---------------- ---------- ---------- -------- ----------------
                          0          1 root     Root
                          0          2 [nobody]
                        992          0 EZsetup
900043666               992          1 sgalan   Galan
                        993          0 demos
956163662               993          1 hyunkim  Kim
                        995          0 OutOfBox
950857383               995          3 statskuo Clayton
                        999          0 4Dgifts
980125615               999          3 rastinko Nukovic
 
10 rows selected.


-- 
David Krikorian <dkk@mit.edu>,  radio: KA1NAP,  groups: APO LSC SIPB Grey17,
employment: MIT/IS/Service/ASO (Athena Server Operations)

home help back first fref pref prev next nref lref last post