[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: groups


Something like that might be nice... it might be nice to factor the existing
tools into lib calls so the actual data structure of the user/group database
is abstracted away; I would never install anything I didn't write that
did the same job as useradd that did not use useradd to do the real work.

So your command "group" would figure out what the user wanted, and should
call groupadd, groupdel or usermod. That is, it should not modify the 
passwd or group files directly.

On the other hand!! These commands are horribly slow!! Especially groupadd
and groupmod. I commonly add 1000-2000 accounts in one shot, and it is
extremely slow. I add groups named for classes when they change, groups
named for each new user, then the users themselves, then I place the users
in the class groups. It's not uncommon for this process to take a good 3,
4 or 5 hours depending on how I arrange things, and whether I have to solve
problems in the code (which I wrote, and which is GPLed) that day. And yes,
I will eventually package it. It's not polished enough yet tho. 

Some people in debian say: "Keep the user and group databases as text
databases", and for me, that may not be very convenient due to its 
inherent lack of speed. The machine we have should be able to do the
job of actually modifying these databases in under a minute.

Some other people say: "Use perl and modify the databases yourself."
That would certainly be faster, but I would be treading on the internal
structure of them and I would rather not do that if I can help it.

So, I will ask here if there is a way to swap out the database code
that all apps use with something like dbm, db, even some form of sql?
If pam is supported everywhere in debian, this would seem to be a 
simple matter. The only thing left would be to write the code, and 
then everything would use it automatically. True?

At this point, I will shamelessly plug a package I maintain and am the
author of, called "members". It installs a command called members which
does the inverse of the command "groups", that is, given a group, writes
a list of members of that group to stdout. This package is in potato.


Jim Lynch       Finger for pgp key
as Laney College CIS admin:  jim@laney.edu   http://www.laney.edu/~jim/
as Debian developer:         jwl@debian.org  http://www.debian.org/~jwl/

Reply to: