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 |
From: Jamie C. <jca...@we...> - 2003-05-23 13:33:45
|
On Fri, 2003-05-23 at 10:05, Clemens Oertel wrote: > 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? Unfortunately, there is no single clean function for creating a user with all the extras at the moment. The only good reason for the current design is that it allows the creation of users without a home directory, or without a corresponding Samba account. A few other modules do just this for creating mailboxes and so on. So anyway, right now you need to call several functions to create a user. Have a look at the Cluster Users and Groups module's create_user.cgi script to see how it is done remotely.. - Jamie |
From: konan <so...@ra...> - 2003-05-25 22:13:39
|
Hi Everybody! I hope you'll find some time to read this letter. I'm writing a web interface for wget-command. The problem is that i can;t insert my module into Webmin in the ordinary way. I have module.info containing: name=webget category=system or webmin (no effect) depends=1.070 version=1.070 desc=some desc and also images/icon.gif i also edited /etc/webmin/webmin.acl - added there my module name in order to access it After all of that - I couldnt find my icon at any tab. So how did i solve that problem: in webmin-1.070/ at ... webget 1) mv at at2 2) mv webget at Then refresh Webmin - and my Icon Appears!!!! then 1) mv at webget 2) mv at2 at And my icon is still on tab under webmin category But NOTICE THAT: when i change category from webmin to system for inst. icon.gif is left at Webmin category anyway - what't the bug??? It just says that module.info is not read for the second time!!! Thank you for your answer in advance!!! ___________________ Посмотрел "Матрицу-2" - не понравилось, зато поднял 40% на акциях РАО ЕЭС: http://www.rambler.ru/nettrader/ |
From: Jamie C. <jca...@we...> - 2003-05-25 23:25:26
|
For a few versions now, webmin has used the cache file /etc/webmin/module.infos.cache to store details of all installed modules. If you add one manually (by just creating a subdirectory) or change its module.info file, this cache will not be automatically refreshed and so your module won't appear properly. The solution is to just delete that module.infos.cache file after you make any of these changes, and it will be re-generated automatically. Of course, this is not needed when installing a module from a .wbm file, because the cache gets automatically flushed. Only module developers will run into this problem .. - Jamie konan wrote: > Hi Everybody! > I hope you'll find some time to read this letter. > I'm writing a web interface for wget-command. > The problem is that i can;t insert my module into Webmin in the > ordinary way. > > I have module.info containing: > name=webget > category=system or webmin (no effect) > depends=1.070 > version=1.070 > desc=some desc > > and also images/icon.gif > > i also edited /etc/webmin/webmin.acl - added there my module name in > order to access it > > After all of that - I couldnt find my icon at any tab. > So how did i solve that problem: > in webmin-1.070/ > at > ... > webget > 1) mv at at2 > 2) mv webget at > > Then refresh Webmin - and my Icon Appears!!!! > then > 1) mv at webget > 2) mv at2 at > And my icon is still on tab under webmin category > But NOTICE THAT: > when i change category from webmin to system for inst. > icon.gif is left at Webmin category anyway - what't the bug??? > It just says that module.info is not read for the second time!!! > > Thank you for your answer in advance!!! |