Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Samba 3.6.6

We have a piece of software that runs on a Windows Server 2008 box that appears to use a C++ API to send a NetSessionEnum request to our Samba PDC server. From what we can tell this should return a list of active sessions logged on the server.

NetSessionEnum does not appear to be working properly on the Samba server. This software logs the following error code:

11/01/2012 17:14:31,Warning,WebsenseDCAgent@x.x.x.x,XidDcAgent,WsWin32Net.cpp:120,0x20010001,The Windows system call NetSessionEnum returned  an error for server DOMAIN\box. Error Code: 124

We did a packet capture to see what was going on and we observed an error message from the Samba server just after the NetSessionEnum request we was sent from the Windows machine. This is part of the packet capture:

SRVSVC NetSessEnum response, Error: WERR_UNKNOWN_LEVEL

On the Samba we can see the NetSessionEnum request come in and it is logged, but there doesn't appear to be any error messages associated with it. Here is a snippet from the log:

[2012/11/01 14:42:22.526710,  4] rpc_server/srv_pipe.c:1611(api_rpcTNP)
  api_rpcTNP: \srvsvc op 0xc - api_rpcTNP: rpc command: SRVSVC_NETSESSENUM
[2012/11/01 14:42:22.526764,  3] rpc_server/srv_pipe_hnd.c:121(free_pipe_context)

We have managed to find a tool to test the NetSessionEnum here: Test app for NetSessionEnum

We get the same error when trying it against our Samba server:

Error: NetSessionEnum (124) The system call level is not correct.

Another update: We discovered that there are 5 levels at which a NetSessionEnum call can be made 0,1,2,10,502. Between the two applications we are testing with, one uses 10 and one uses 502 (as far as we call tell from the Wireshark captures). We know that both these levels fail when sent to a Samba server. Currently we have no way of testing levels 0, 1, and 2.

Can anyone shed some light on perhaps what might be causing this problem? We haven't been able to find to much information about the NetSessionEnum or how to test if it is configured properly. So we are having some problems doing further troubleshooting.

Any help or suggestions would be greatly appreciated!

share|improve this question
Well we found a work around for this. We were never able to identify why the Samba would not response correctly. So we used a Windows machine to simulate a DC and the sessions enumerate correctly on that machine – bourne Nov 9 '12 at 14:36

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.