[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webmin-l
Subject:    Re: [webmin-l] XML-RPC Issue
From:       Murray Trainer <mtrainer () central-data ! net>
Date:       2008-07-08 4:09:06
Message-ID: 1215490147.11943.4.camel () localhost
[Download RAW message or body]

> On 04/Jul/2008 01:56 Murray Trainer wrote ..
> > Hi Jamie,
> > 
> > I have got xml-rpc calls working for our admin user working fine.  I want to run
> > the xml-rpc calls as another more restricted user.  When I do that I get the error
> > below: 
> > 
> > Method call failed : Fault returned from XML RPC Server, fault code 1: Invalid
> > user for RPC
> > 
> > I can't see anywhere to allow the user to do xml-rpc calls?  If you have to add
> > some code please e-mail me a copy to test.
> 
> You have to enable RPC on a per-user basis at Webmin Users -> username -> Global
> ACL, by setting 'Can accept RPC calls' to 'Yes'.
> 
>  - Jamie
> 

Thanks for the above - that fixed the issue.  I am now trying to create
a group and run the post execution script after the group is created.  I
can create the LDAP group OK but can't get the post execution script
working.  My perl xml-rpc script is below.  I don't think the
USERADMIN_* variables are being set correctly but the xmlrpc cgi
script.  

Thanks

Murray 


#!/usr/bin/perl
# Create a new LDAP group

use Frontier::Client;
use Data::Dumper;

$groupname = "mygroup";
$gid = "1040";
$action = 'CREATE_GROUP';

chop($url = `cat url.txt`);
eval {
  $server = Frontier::Client->new('url' => $url);
  };
$@ && die "Failed to create server : $@";

# Create the group object

$group = {
          'group' => $groupname,
          'gid' => $gid,
         };

# Create LDAP group
$server->call("ldap-useradmin::create_group", $group);

print "Created LDAP group $username with uid $uid and gid
$group->{'gid'}\n";

$server->call("ldap-useradmin::set_group_envs", $group, $action );
$server->call("ldap-useradmin::made_changes");




-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
-
Forwarded by the Webmin mailing list at webadmin-list@lists.sourceforge.net
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic