Hi,

I am using samba4 and libsmbclient.h and libsmbclient.so.

I have implemented the below apis locally within linux machines, but now I want 
to connect to my windows machine for this I am giving my windows machine 
username and password
In below get_auth_data_fn() function:

static void get_auth_data_fn(const char * m_pserver, const char * m_pshare,
                                                                                
                                 char * m_pworkgroup,
                                                                                
                                 int m_maxLenWorkgroup,
                                                                                
                                 char * m_pusername,
                                                                                
                                 int m_maxlenUsername,
                                                                                
                                 char * m_pPassword,
                                                                                
                                 int m_maxLenPassword)
{
            m_pworkgroup = "igatecorp";
            m_maxLenWorkgroup = 100;
            m_maxlenUsername = 100;
            m_maxLenPassword =100;
            m_pusername = "abc";
            m_pPassword = "1";
}

smbc_init( get_auth_data_fn, l_ndebug );



Int smbc_open(const char *furl, int flags, mode_t mode);


But it is giving following debugt errors:

START INIT
INFO: Current debug levels:
  all: 50
  tdb: 50
  printdrivers: 50
  lanman: 50
  smb: 50
  rpc_parse: 50
  rpc_srv: 50
  rpc_cli: 50
  passdb: 50
  sam: 50
  auth: 50
  winbind: 50
  vfs: 50
  idmap: 50
  quota: 50
  acls: 50
  locking: 50
  msdfs: 50
  dmapi: 50
  registry: 50
Using netbios name MER19640.
Using workgroup WORKGROUP.

 INIT SUCCESSSMBC_server: server_n=[172.31.130.148] server=[172.31.130.148]
 -> server_n=[172.31.130.148] server=[172.31.130.148]
Connecting to 172.31.130.148 at port 445
Socket options:
Doing spnego session setup (blob length=83)
got OID=1.2.840.48018.1.2.2
got OID=1.2.840.113554.1.2.2
got OID=1.2.840.113554.1.2.2.3
got OID=1.3.6.1.4.1.311.2.2.10
got principal=pc-a49240$@
     negotiate: struct NEGOTIATE_MESSAGE
        Signature                : 'NTLMSSP'
        MessageType              : NtLmNegotiate (1)
        NegotiateFlags           : 0x60088215 (1611170325)
        DomainNameLen            : 0x0009 (9)
        DomainNameMaxLen         : 0x0009 (9)
        DomainName               : *
            DomainName               : 'WORKGROUP'
        WorkstationLen           : 0x0008 (8)
        WorkstationMaxLen        : 0x0008 (8)
        Workstation              : *
            Workstation              : 'MER19640'
     challenge: struct CHALLENGE_MESSAGE
        Signature                : 'NTLMSSP'
        MessageType              : NtLmChallenge (0x2)
        TargetNameLen            : 0x0012 (18)
        TargetNameMaxLen         : 0x0012 (18)
        TargetName               : *
            TargetName               : 'PC-A49240'
        NegotiateFlags           : 0x628a8215 (1653244437)
        ServerChallenge          : cc22f263c3a9cbd1
        Reserved                 : 0000000000000000
        TargetInfoLen            : 0x0084 (132)
        TargetNameInfoMaxLen     : 0x0084 (132)
        TargetInfo               : *
            TargetInfo: struct AV_PAIR_LIST
                count                    : 0x00000005 (5)
                pair: ARRAY(5)
                    pair: struct AV_PAIR
                        AvId                     : MsvAvNbDomainName (0x2)
                        AvLen                    : 0x0012 (18)
                        Value                    : union ntlmssp_AvValue(case 
0x2)
                        AvNbDomainName           : 'PC-A49240'
                    pair: struct AV_PAIR
                        AvId                     : MsvAvNbComputerName (0x1)
                        AvLen                    : 0x0012 (18)
                        Value                    : union ntlmssp_AvValue(case 
0x1)
                        AvNbComputerName         : 'PC-A49240'
                    pair: struct AV_PAIR
                        AvId                     : MsvAvDnsDomainName (0x4)
                        AvLen                    : 0x0026 (38)
                        Value                    : union ntlmssp_AvValue(case 
0x4)
                        AvDnsDomainName          : 'pc-a49240.patni.com'
                    pair: struct AV_PAIR
                        AvId                     : MsvAvDnsComputerName (0x3)
                        AvLen                    : 0x0026 (38)
                        Value                    : union ntlmssp_AvValue(case 
0x3)
                        AvDnsComputerName        : 'pc-a49240.patni.com'
                    pair: struct AV_PAIR
                        AvId                     : MsvAvEOL (0x0)
                        AvLen                    : 0x0000 (0)
                        Value                    : union ntlmssp_AvValue(case 
0x0)
        Version: struct ntlmssp_VERSION
            ProductMajorVersion      : NTLMSSP_WINDOWS_MAJOR_VERSION_5 (0x5)
            ProductMinorVersion      : NTLMSSP_WINDOWS_MINOR_VERSION_1 (0x1)
            ProductBuild             : 0x0a28 (2600)
            Reserved                 : 000000
            NTLMRevisionCurrent      : NTLMSSP_REVISION_W2K3 (0xF)
Got challenge flags:
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60088215
     authenticate: struct AUTHENTICATE_MESSAGE
        Signature                : 'NTLMSSP'
        MessageType              : NtLmAuthenticate (3)
        LmChallengeResponseLen   : 0x0018 (24)
        LmChallengeResponseMaxLen: 0x0018 (24)
        LmChallengeResponse      : *
            LmChallengeResponse      : union ntlmssp_LM_RESPONSE(case 24)
            v1: struct LM_RESPONSE
                Response                 : 
1845a8c3bc8ab143649a254a5509680933841b5c5e34cc9c
        NtChallengeResponseLen   : 0x00b0 (176)
        NtChallengeResponseMaxLen: 0x00b0 (176)
        NtChallengeResponse      : *
            NtChallengeResponse      : union ntlmssp_NTLM_RESPONSE(case 176)
            v2: struct NTLMv2_RESPONSE
                Response                 : 66819fadbb9ffea71f5e2bb8300198b5
                Challenge: struct NTLMv2_CLIENT_CHALLENGE
                    RespType                 : 0x01 (1)
                    HiRespType               : 0x01 (1)
                    Reserved1                : 0x0000 (0)
                    Reserved2                : 0x00000000 (0)
                    TimeStamp                : Mon Feb  4 12:35:08 2013 UTC
                    ChallengeFromClient      : 169cba86b3fef203
                    Reserved3                : 0x00000000 (0)
                    AvPairs: struct AV_PAIR_LIST
                        count                    : 0x00000005 (5)
                        pair: ARRAY(5)
                            pair: struct AV_PAIR
                                AvId                     : MsvAvNbDomainName 
(0x2)
                                AvLen                    : 0x0012 (18)
                                Value                    : union 
ntlmssp_AvValue(case 0x2)
                                AvNbDomainName           : 'PC-A49240'
                            pair: struct AV_PAIR
                                AvId                     : MsvAvNbComputerName 
(0x1)
                                AvLen                    : 0x0012 (18)
                                Value                    : union 
ntlmssp_AvValue(case 0x1)
                                AvNbComputerName         : 'PC-A49240'
                            pair: struct AV_PAIR
                                AvId                     : MsvAvDnsDomainName 
(0x4)
                                AvLen                    : 0x0026 (38)
                                Value                    : union 
ntlmssp_AvValue(case 0x4)
                                AvDnsDomainName          : 'pc-a49240.patni.com'
                            pair: struct AV_PAIR
                                AvId                     : MsvAvDnsComputerName 
(0x3)
                                AvLen                    : 0x0026 (38)
                                Value                    : union 
ntlmssp_AvValue(case 0x3)
                                AvDnsComputerName        : 'pc-a49240.patni.com'
                            pair: struct AV_PAIR
                                AvId                     : MsvAvEOL (0x0)
                                AvLen                    : 0x0000 (0)
                                Value                    : union 
ntlmssp_AvValue(case 0x0)
        DomainNameLen            : 0x0012 (18)
        DomainNameMaxLen         : 0x0012 (18)
        DomainName               : *
            DomainName               : 'WORKGROUP'
        UserNameLen              : 0x0008 (8)
        UserNameMaxLen           : 0x0008 (8)
        UserName                 : *
            UserName                 : 'root'
        WorkstationLen           : 0x0010 (16)
        WorkstationMaxLen        : 0x0010 (16)
        Workstation              : *
            Workstation              : 'MER19640'
        EncryptedRandomSessionKeyLen: 0x0010 (16)
        EncryptedRandomSessionKeyMaxLen: 0x0010 (16)
        EncryptedRandomSessionKey: *
            EncryptedRandomSessionKey: DATA_BLOB length=16
[0000] E9 C0 C5 F7 63 03 2C 0E   8A 41 8C EF 89 BE 8F B2   ....c.,. .A......
        NegotiateFlags           : 0x60088215 (1611170325)
Got NTLMSSP neg_flags=0x60088215
  NTLMSSP_NEGOTIATE_UNICODE
  NTLMSSP_REQUEST_TARGET
  NTLMSSP_NEGOTIATE_SIGN
  NTLMSSP_NEGOTIATE_NTLM
  NTLMSSP_NEGOTIATE_ALWAYS_SIGN
  NTLMSSP_NEGOTIATE_NTLM2
  NTLMSSP_NEGOTIATE_128
  NTLMSSP_NEGOTIATE_KEY_EXCH
SPNEGO login failed: No logon servers
cli_init_creds: user  domain WORKGROUP
 session setup ok
s3_event: Added timed event "tevent_req_timedout": 0x9ffd798
s3_event: Schedule immediate event "tevent_queue_immediate_trigger": 0x9fdbb50
s3_event: Run immediate event "tevent_queue_immediate_trigger": 0x9fdbb50
s3_event: Destroying timer event 0x9ffd798 "tevent_req_timedout"
map_errno_from_nt_status: 32 bit codes: code=c0000022
smbc_open: Permission denied

START INIT 13

Please tell me what am I missing.

Please reply as soon as possible.
thanks


Thanks and Regards,

Nirmit Kansal

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Information contained and transmitted by this e-mail is confidential and 
proprietary to iGATE and its affiliates and is intended for use only by the 
recipient. If you are not the intended recipient, you are hereby notified that 
any dissemination, distribution, copying or use of this e-mail is strictly 
prohibited and you are requested to delete this e-mail immediately and notify 
the originator or mailad...@igate.com <mailto:mailad...@igate.com>. iGATE does 
not enter into any agreement with any party by e-mail. Any views expressed by 
an individual do not necessarily reflect the view of iGATE. iGATE is not 
responsible for the consequences of any actions taken on the basis of 
information provided, through this email. The contents of an attachment to this 
e-mail may contain software viruses, which could damage your own computer 
system. While iGATE has taken every reasonable precaution to minimise this 
risk, we cannot accept liability for any damage which you sustain as a result of
  software viruses. You should carry out your own virus checks before opening 
an attachment. To know more about iGATE please visit www.igate.com 
<http://www.igate.com>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to