> From: Daniel Edward Lovinger <[EMAIL PROTECTED]>
> Subject: Re: Mass operations with pts and kas
> 
> Jeff Blaine <[EMAIL PROTECTED]> writes:
> >    What's the best way to dump a listing of all PTS IDs and all KAS IDs?
> 
> For KAS, "kas list" will get what you want. PTS is ugly since there is
> no way to dump that list. However, given the "pts listmax" command you
> can determine the upper extents of allocation in uid and gid space -
> from there, just exhaustively "pts examine id" and record your
> hits.

That's assuming maxID is something reasonable.
        llama% pts listmax -cell umich.edu
        Max user id is 554467 and max group id is -6471.

We've got over 70,000 kerberos instances, so we've had
to do horrible things so our Unix users can get short UID's,
for those OS's that don't yet properly support long UID's.
It turns out there's a way to change vice ID's in ptserver,
but it's not as straight-forward as one might like.
I've noticed in some other cells, there are also
"holes" in the ViceID space, although not quite this bad.

There are some other solutions, but they get more ugly.
db_verify, for instance, can be made to dump a pt database
in "pt client" form.  Even that has some interesting problems,
but it's does provide the highest quality information.  Instead
of running db_verify on the running database, it might be
preferable to find some way to copy the database out first.

Or, there are even more interesting solutions if one is
willing to write code.  It turns out that the PR_DumpEntry
call can be used to access any place in the database, and that
one doesn't need any special rights to call it.  It's a simple
enough matter to use PR_DumpEntry to walk through all the records
in the database and dump out all the users.  It's also possible
to use PR_DumpEntry to examine the header to the database,
and the hash links, but that gets a little bit dicy; DumpEntry
always returns entries in "network byte order", so if the
database machine is a Dec or Intel, things could get a bit
strange.

                        -Marcus Watts
                        UM ITD RS Umich Systems Group

Reply via email to