Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-17-2005, 10:08 AM   #1
LQ Newbie
Registered: Oct 2003
Location: Australia
Posts: 8

Rep: Reputation: 0
Arrow Samba -- XP user can log in to shares but smbclient user always gets password errors

I have a samba server set up with two shares - one requires a password, one doesn't. I can access both shares using an XP box just fine - access the public share, it works; access the password-protected share, it asks for the password, then it works. Problem is I can't do the same thing from a Linux box. Using smbclient, I can access the public share fine, but when I access the password-protected share, I type the password in, and it won't accept the password.

//blinky/shared is my public share. Both XP box and smbclient have no trouble with it.
//blinky/joe is my password-protected share...

[root@rocko ~]# smbclient //blinky/joe
Password: (I type the password in)
Domain=[NEWIEHOUSE] OS=[Unix] Server=[Samba 3.0.10-1.fc3]
tree connect failed: NT_STATUS_WRONG_PASSWORD

[root@rocko ~]# smbmount //blinky/joe /mnt/joe
Password: (I type the password in)
6451: tree connect failed: ERRSRV - ERRbadpw (Bad password - name/password pairin a Tree Connect or Session Setup are invalid.)
SMB connection failed

If I try connecting to smb://blinky/joe in Konquerer, it asks for the login details, but doesn't accept anything. It just keeps asking for the login details, over and over.

I know the password I am typing is correct, because it works in XP.

I have also tried:
smbclient //blinky/joe username=joe
smbclient //blinky/joe username=Joe
but I am led to believe that having "security = share" in smb.conf means the username does not matter.

Any hints as to why smbclient is failing while XP is getting through? Perhaps this is something to do with whether plain-text or encrypted passwords are being used? I guess this because smbclient will successfully connect to my public share, just not to the password protected one, though I can't find much info on this. I'm probably way off anyway

I am using Fedora Core 3 on both server and client. Here's the server's config files:

        workgroup = newiehouse
        server string = Newiehouse Samba
        hosts allow = 192.168.19. 127.
        dns proxy = yes
        guest account = newie
        bind interfaces only = yes
        interfaces = lo
        lanman auth = no
        log file = /var/log/samba/%m.log
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        domain master = yes
        preferred master = yes
        wins support = yes

        idmap uid = 16777216-33554431
        idmap gid = 16777216-33554431
        template shell = /bin/false
        winbind use default domain = no
        username map = /etc/samba/smbusers
        security = share
        encrypt passwords = yes
        guest ok = yes

        comment = Joe's Files
        path = /home/joe/files
        valid users = joe
        writeable = yes
        printable = no
        browseable = no

        create mask = 0600
        force create mode = 0600
        directory mask = 0700
        force directory mode = 0700

        comment = Newiehouse Shared
        path = /home/shared
        writeable = yes
        printable = no
        guest ok = yes

        create mask = 0660
        force create mode = 0660
        security mask = 0660
        force security mode = 0660
        directory mask = 0770
        force directory mode = 0770
        directory security mask = 0770
        force directory security mode = 0770

        follow symlinks = no
        force user = newie
# Unix_name = SMB_name1 SMB_name2 ...
#root = administrator admin
#nobody = guest pcguest smbguest
joe = Joe
joe:500:0B7C116B4B217D98D3FA0823D124F9E0:93477CE0040622CF348900E0600D4397:[U      ]:LCT-426262BF:
Old 04-17-2005, 10:29 AM   #2
LQ Newbie
Registered: Mar 2005
Distribution: SuSe, Debian, Knoppix
Posts: 3

Rep: Reputation: 0

You should trie machinename/username when you log in. (smbclient //blinky/joe username=blinky/joe .
Old 04-18-2005, 02:41 AM   #3
LQ Newbie
Registered: Oct 2003
Location: Australia
Posts: 8

Original Poster
Rep: Reputation: 0
smbclient //blinky/joe username=blinky/joe
No luck. I've tried:
smbmount //blinky/joe /mnt/joe username=blinky/joe
smbmount //blinky/joe /mnt/joe username=blinky/Joe
smbmount //blinky/joe /mnt/joe username=blinky\joe
smbmount //blinky/joe /mnt/joe username=blinky\Joe
smbmount //blinky/joe /mnt/joe username=rocko/joe (and all the other / or \, Joe or joe combinations...)
smbmount //blinky/joe /mnt/joe username=newiehouse/joe (and the other combinations...)
smbmount //blinky/joe /mnt/joe username=USERS/joe (and the other combinations...)
smbmount //blinky/joe /mnt/joe username=BLINKY/joe (and the other combinations...)

The smbclient man page doesn't say much about usernames and passwords. Anyone know where I can find some better info?
Old 04-18-2005, 11:55 AM   #4
LQ Newbie
Registered: Oct 2003
Location: Australia
Posts: 8

Original Poster
Rep: Reputation: 0

Shouldn't have had lanman auth = no in smb.conf.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Config not working setting up user shares. cogs_bobv Linux - Software 9 10-11-2005 09:58 PM
Mounting Samba Shares ad user hobz Linux - Software 1 06-17-2005 11:10 PM
AMSN 0.83 try to log in but always says Wrong user name or password jimdaworm Linux - Software 2 01-10-2004 05:17 PM
Samba user/password EternalKnight Linux - Networking 3 01-12-2002 06:35 AM
User Group and samba shares Sylhouette Linux - General 0 01-09-2002 04:26 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration