Samba-Connecting to Windows server Problem

Posted on 2005-04-22
Last Modified: 2007-12-19
I am trying to connect from RH Enterprise Linux 3 EN using samba-3.0.9-1 to a Windows 2000 server.

I have looked all over for a solution to this, but have not found the exact problem yet.  When I connect using smbclient, I recieve an error message:

[jmendez@DB2]$ smbclient -d3 -I //win3/backup
lp_load: refreshing parameters
Initialising global parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
added interface ip= bcast= nmask=
Client started (version 3.0.9-1.3E.2).
Connecting to at port 445
Doing spnego session setup (blob length=119)
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=win3$@CPCORP.CPCORP.COM
Got challenge flags:
Got NTLMSSP neg_flags=0x62890215
NTLMSSP: Set final flags:
Got NTLMSSP neg_flags=0x60080215
NTLMSSP Sign/Seal - Initialising with flags:
Got NTLMSSP neg_flags=0x60080215
SPNEGO login failed: Logon failure
session setup failed: NT_STATUS_LOGON_FAILURE

No matter which options I specify, (such as the domain, etc.) during my connect, I get the NT_STATUS_LOGON_FAILURE error.  I have tried many different options in my smb.conf file also.  Any ideas?  Thanks.  Currently, this is what my smb.conf file looks like:

        workgroup = DATAONCALL
        server string = DB2
        interfaces = bond0
        log file = /var/log/samba/%m.log
        max log size = 150
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        printcap name = /etc/printcap
        local master = No
        domain master = No
        dns proxy = No
        cups options = raw
        comment = Home Directories
        read only = No
        browseable = No
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No
Question by:barthalamu
    LVL 7

    Accepted Solution

    Is a Domain (PDC) in use?  If so, has the Linux box been joined to the domain yet?  Is your username on the Windows server also jmendez?
    LVL 38

    Expert Comment

    > smbclient -d3 -I //win3/backup
    How about
    smbclient -U <username> -W <domain name>  //win3/bacckup
    where win3 is the server name with a "backup" shared directory.
    LVL 2

    Expert Comment

    it seem to be an authentication problem.

    You will have to add a user with same username and password on both linux box and windows box which you are sharing files. if you are using domain controller you have to do what Macker- saids.

    smb.config us gerneral used for the other way around. when you are try to access share files on linux with windows.
    LVL 7

    Expert Comment

    smbclient will default to using your local (Linux) username when connecting, if you do not supply one with -U
    LVL 1

    Expert Comment


    Try mounting the desired directory on the linux box.

    If target machine is on a domain use:

    mount -t smbfs -o username=<domain username>,workgroup=<domain> //win3/bacckup /mnt/<desired mount point>

    If not, use:

    mount -t smbfs -o username=<win3 username>,workgroup=<win3 computer name> //win3/bacckup /mnt/<desired mount point>


    LVL 7

    Expert Comment

    mounting with smbfs should only be done once you have things working with smbclient.  also, use of 'smbmount' may be preferred.

    Author Comment

    I have not been able to try macker-'s suggestion yet.  I don't believe that the linux box has been added to the Windows domain, which as macker suggest may be the problem.  The usernames and passwords on both Windows and Linux are the same, however.  Thanks for the suggestion and I will try it as soon as I have access to that box again.
    LVL 38

    Expert Comment

    smbclient -U <username> -W <domain name>  //win3/bacckup

    This command doesn't require to join to the AD domain. I would recommend to use -U <username>
    for testing first.

    Author Comment

    Forgot about this one for a while...Thanks for the help everyone.  Domain was the problem.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
    SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now