[846] in Moira
Re: Big Reg Job request for Phys Plant
daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Fri Dec 16 14:02:37 1994
Date: Fri, 16 Dec 1994 14:02:17 +0500
From: Theodore Ts'o <tytso@MIT.EDU>
To: mgood@MIT.EDU
Cc: moira-admin@MIT.EDU, accounts@MIT.EDU
Cc: moiradev@MIT.EDU
In-Reply-To: [59]
From: mgood@MIT.EDU
Date: Thu, 15 Dec 94 16:52:18 -0500
I was wondering if there was a way to run a job through moira so that the
username discovery and username assignment could be done all at once,
instead of doing only one person at a time.
There are a couple of steps here.
For each of the users, something we can do now is to check to see make
sure that the username that PP wants for them to reserve isn't already
in use (if it is, we need to let PP know about the conflict). That's
best done in SQL.
The next thing to do is to for the remaining users, set their status to
status 4, and set the username to the username that PP wants them
reserved for. That will have the effect of locking out the username
from being registered by other people. That's again something that can
be done in SQL.
The final step is one that will actually require a bit of moira
development, and that is to prevent a user who is in status 4 and has a
username assigned to him already from choosing a new username. In the
userreg client program (/mit/moiradev/src/userreg), in the routine
dolook(), in the case where the error routine is UREG_NOT_ALLOWED, there
needs to be a check so that if the user already has a username assigned
(i.e., the first character of db_user.u_login is not '#'), the user
should be told that the following username has already been assigned,
and then not allow the user to pick a new username. I estimate that
this is probably about half an hours worth of coding, and then a couple
of hours worth of testing.
Dave, do you think you could handle the first two items? I've talked to
Jonathan, and he's going to put the userreg client changes on his todo
list.
- Ted