[libnetAPI] Unable to unjoin using NetUnjoinDomain

okmanoj at indiatimes.com okmanoj at indiatimes.com
Mon Apr 25 00:14:14 MDT 2011


Dear Samba Team,

While creating sample application using libnetAPI I am able to successfully join Test Device to win2k8r2 server.

I am using below parameter for joining

NetJoinDomain ("MANOJTESTAPI"     /*Name of my device to join*/,
               "2k8"              /*Domain Name of the server to join*/,
               "CN=Computers,DC=2k8,DC=ms,DC=local"       /*account OU of the 2k8r2 server*/,
               "username"         /*Admin username of the server account*/,
               "password"         /*password of the above username*/,
                NETSETUP_ACCT_CREATE |NETSETUP_JOIN_DOMAIN /*flags for join*/)

With above parameter I am able to join successfully, also I am able to see my device account in domain server under "CN=Computers,DC=2k8,DC=ms,DC=local".

Now I want to un-join my device form win2k8servr and delete my account i am using below API format


NetUnjoinDomain ("MANOJTESTAPI"     /*Name of my device to join*/,
               "username"         /*Admin username of the server account*/,
               "password"         /*password of the above username*/,
                NETSETUP_ACCT_DELETE |NETSETUP_JOIN_DOMAIN /*flags for un-join*/)

But with this I am not able to delete the account in server. I am getting error "failed to disable machine account via rpc: No such domain"


Please suggest If I am doing anything wrong in un-join Process. I have also attached samba debug 100 logs

Thanks in advance for your support

Best Regards
Manoj

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SambaLogs.zip
Type: application/zip
Size: 9881 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110425/1cedc696/attachment.zip>


More information about the samba-technical mailing list