On Thu, 2005-02-10 at 23:44 -0700, der.hans wrote:
ok - got it and am looking at your getopts.sh and will look at
getopts.pl later
My problem is awkward - without getting too deep in background.
Webmin LDAP Users and Groups uses rather stupidly as far as I can tell,
a perl module for cyrus that probably predates their perl utilities for
cyradm called Net::IMAP (NetxAP.pm) - this module was last updated in
1999 and apparently, SuSE has slightly modified in and continued it.
This pretty much leaves everyone else in the cold - I tried downloading
the tarball from cpan.org and patching it with available patches and it
still doesn't work right on RHEL systems. I am trying to convince Jamie
- the Webmin guy to shuck the old perl module and just make his calls
directly to Cyrus::IMAP::Admin which is distributed with cyrus-imapd and
probably has been for some number of years.
I see the need to do 3 things outside of this perl module.
1 - create an 'AddressBook' ou inside each new users personal container
and I can do this with a shell script. This is performed 'after' the
create user and even if it were to fail for some reason, his program
doesn't wait for any return value from the external program called
'after' the new user is created
2 - delete the users mailbox in cyrus. I have a perl script working -
still outputs an error if run from command line but it does the job and
I can troubleshoot the error till I get it right but like 1 above, this
runs 'after' the user is deleted and so Webmin doesn't wait for return
of success/failure report from external program
3 - delete the 'AddressBook' ou inside each users personal container
which I can do from shell script. This is the tricky one. User cannot be
deleted from LDAP DSA if the AddressBook container exists so this script
must be run 'before' the Webmin executes it's delete command and thus it
waits for a return - I presume a value of '0' . So to accomplish this, I
must return the 'success' value from shell script to Webmin so it
proceeds.
I do plan on changing the LDAP scripts from shell to perl - modules for
using Net::LDAP already are in place and the only thing preventing me
from doing them is lack of perl knowledge (I probably need a perl
class).
So the problems that were manifest - I have a number of variables passed
to my shell script from Webmin - values of which are obtained by adding
a line '/bin/env > /tmp/env.txt' in my shell script.
The value of LDAPADMIN_USER must be passed from the shell script to the
perl script so that it deletes the right mailbox. I have tested each
step by declaring the value of LDAPADMIN_USER at the start of each shell
script and then comment it out to test it from within Webmin.
The biggest problem I have now is returning the value of 'success' to
perl based Webmin. If you can tell me how to do that, I would be ever
grateful....I am working with 'return 0' but that isn't making Webmin
happy.
Craig
---------------------------------------------------
PLUG-discuss mailing list -
PLUG-discuss@lists.plug.phoenix.az.us
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss