Trouble Using RPC for Share Management

Jelmer Vernooij jelmer at samba.org
Sun Dec 19 19:01:17 MST 2010


Hi Ricardo,

On Sun, 2010-11-21 at 14:44 +0000, Ricardo Jorge wrote:
> I'm having some trouble using the RPC functions. Basically, they don't
> work. I can list shares without a problem but I can't Add or Delete
> them.
> 
> I keep get RuntimeError: (1, 'WERR_BADFUNC') when adding or deleting
> (have not got to setting info). I'm using some Microsoft documentation
> on MSDN for reference on parameters
> (http://msdn.microsoft.com/en-us/library/bb525393%28v=VS.85%29.aspx)
> 
> I ran Samba4 with debug level 3:
> 
> This message shows up so apparently everything is being loaded ok:
> 
> > (...)
> > DCERPC endpoint server 'srvsvc' registered
> > (...)
> 
> This happens when I try to add or delete a share:
> 
> > (...)
> > Terminating connection - 'NT_STATUS_CONNECTION_DISCONNECTED'
> > single_terminate: reason[NT_STATUS_CONNECTION_DISCONNECTED]
> > Got NTLMSSP neg_flags=0x60088205
> > Got user=[administrator] domain=[] workstation=[] len1=24 len2=24
> > auth_check_password_send: Checking password for unmapped user
> []\[administrator]@[]
> > auth_check_password_send: mapped user is:
> [SAMDOM]\[administrator]@[]
> > NTLMSSP Sign/Seal - Initialising with flags:
> > Got NTLMSSP neg_flags=0x60088205
> > Terminating connection - 'NT_STATUS_CONNECTION_DISCONNECTED'
> > single_terminate: reason[NT_STATUS_CONNECTION_DISCONNECTED]
> (...)
That looks alright, we're just not logging anything about the actual
function call.

> Here is the source code I'm using to test the functions. I've tried to
> do this a number if ways but I always get the RuntimeError above.
> - Specify 'localhost' or the IP Adress instead of None in the
> NetShare* functions
> - Different levels in addShare
> - Lots of other stuff :P
Quick update: I can reproduce this, but I haven't really figure out
what's going wrong yet. We do have some other C-based tests for srvsvc
that seem to do the same thing and work perfectly fine.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101220/204cdae8/attachment.pgp>


More information about the samba-technical mailing list