|
From: Clemens O. <cl...@cs...> - 2003-05-23 00:05:46
|
Hi alltogether,
while trying to write some to code to synchronize users among multiple
machines upon creation/modification/deletion, I noticed that many
functionality lies in the corresponding .cgi-files, not in the user-lib.pl.
My naive idea was to have a useradmin_update.pl file on the master machine,
with something like:
&remote_foreign_call('my_user_synchronizer', 'create', %{$user_reference});
and on the client machines a module called my_user_synchronizer with a
lib-file containing:
sub create {
my (%user) = @_;
...
&foreign_call('useradmin', 'create_user', \%user);
&foreign_call('useradmin', 'make_changes');
...
}
Works great, user gets created (or deleted or whatever).
However, this way I'm missing all the extended functionality, such as
group changes, home dir movings etc. I also don't want to cut'n'paste code out
of the respective cgi-scripts (maintainability ...).
So it occured to me that clean one-function interfaces for each of the user
maintenance tasks (create, modify, delete) would be the perfect solution.
Maybe with an additional parameter to turn on/off all output.
Since I'm not aware of the rationale for the current layout of the useradmin
module, I'd like to ask for some comments on that issue. MAybe somebody even
has found a working solution already?
Cheers & thanks,
Clemens
|