[1948] in Moira
banish Lincoln users to the hell of embarassing email addresses
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Tue Apr 2 05:46:48 2002
Message-Id: <200204021046.FAA16514@hodge-podge.mit.edu>
To: moiradev@MIT.EDU
Date: Tue, 02 Apr 2002 05:46:46 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
This patch will make all new Lincoln users get the agreed on
preassigned usernames. I checked with Theresa and she's ok with this
going into production, so it'll get deployed in conjunction with the
Kerberos only account stuff.
Garry
Index: common.pc
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/regtape/common.pc,v
retrieving revision 1.2
diff -u -r1.2 common.pc
--- common.pc 2001/10/17 21:35:48 1.2
+++ common.pc 2002/03/29 11:59:48
@@ -252,8 +252,19 @@
users_id = set_next_users_id();
uid = set_next_uid();
- sprintf(login, "#%d", uid);
- st = US_NO_LOGIN_YET;
+ if (!strcmp(e->type, "LINCOLN"))
+ {
+ strncpy(login, e->first, 2);
+ login[2] = '\0';
+ strncat(login, e->id+4, 5);
+ lowercase(login);
+ st = US_NO_LOGIN_YET_KERBEROS_ONLY;
+ }
+ else
+ {
+ sprintf(login, "#%d", uid);
+ st = US_NO_LOGIN_YET;
+ }
last = e->last;
first = e->first;
middle = e->middle;