LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FC 10: Samba. Shared folder getting repeated login requests for just one user (https://www.linuxquestions.org/questions/linux-newbie-8/fc-10-samba-shared-folder-getting-repeated-login-requests-for-just-one-user-745795/)

1ill 08-07-2009 06:49 AM

FC 10: Samba. Shared folder getting repeated login requests for just one user
 
Hi,

I am having a spot of bother with a single user account on my server.

My server is fedora 10, and is used as a Samba network share and Bugzilla server. Most of the users can connect to the network shared drive by mapping a network drive through windows (both XP and Vista), but I am having trouble with a single user account.

for the purpose of the discussion, I will call the two users gooduser and baduser; I can connect to the share as gooduser, but not as baduser.

If I try to connect as baduser, I am repeatedly prompted for my user name and password. as gooduser, I go straight in.

I have read in a number of places about problems with windows and mapped drives. I have performed a reboot of the windows machine and tried to map as baduser straight away, and still keep getting the login prompt.

I don't think it is related to the windows PC, as I have been able to connect as gooduser from two PCs, and been unable to connect as baduser from any.

here is a snippet from my smb.conf:


[Share]
path = /share/Public
public = yes
writable = yes
valid users = @user
force group = user
force create mode = 0664
force directory mode = 0775

both gooduser and baduser are in the group 'user'. Also, both users have entries in /etc/samba/smbusers.

one thing I've noticed is that if I look at /var/log/samba/log.smbd, I see the entry:


[2009/08/07 11:51:49, 0] lib/util_sock.c:get_peer_addr_internal(1676)
getpeername failed. Error was Transport endpoint is not connected

appears for each time I try to connect as baduser. Connecting as gooduser doesn't cause this line to appear. The forums talk about configuring iptables to drop connections on port 445, but wouldn't that cause the error to appear for all users?

I'm sure this is something silly, but I'm at a loss.

Can anybody think of anywhere I should be looking next?

Many thanks,
1Ill

jschiwal 08-07-2009 07:14 AM

Could you check which ports are open on BADUSER?
Code:

Starting Nmap 4.75 ( http://nmap.org ) at 2009-08-07 07:07 CDT
Interesting ports on hpmedia (192.168.1.101):
PORT    STATE  SERVICE
136/tcp closed profile
137/tcp closed netbios-ns
138/tcp closed netbios-dgm
139/tcp open  netbios-ssn
445/tcp open  microsoft-ds
MAC Address: 00:09:5B:8E:12:D2 (Netgear)

Nmap done: 1 IP address (1 host up) scanned in 0.20 seconds
jschiwal@qosmio:~> sudo nmap -PN -sU  hpmedia -p136-139,445

Starting Nmap 4.75 ( http://nmap.org ) at 2009-08-07 07:07 CDT
Interesting ports on hpmedia (192.168.1.101):
PORT    STATE        SERVICE
136/udp closed        profile
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm
139/udp closed        netbios-ssn
445/udp closed        microsoft-ds
MAC Address: 00:09:5B:8E:12:D2 (Netgear)

Compare these ports between GOODUSER and BADUSER.

Do the hosts have a wins entry? If so, check if it is set correctly with BADUSER.
Is BADUSER on a different subnet?

1ill 08-07-2009 08:24 AM

Thanks for the speedy response.

By 'compare the ports between gooduser and baduser, do you mean to run nmap whilst logged into the server as each user? If so, nmap shows the following in both cases:

PORT STATE SERVICE
136/udp open|filtered profile
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm
139/udp open|filtered netbios-ssn
445/udp open|filtered microsoft-ds

Nmap done: 1 IP address (1 host up) scanned in 3.71 seconds

I have never used nmap, so I don't know what this means

The wins = yes line is commented out in my smb.conf

I'm using one PC to test the share with both users, so the subnet hasn't changed.

Thanks 1Ill

vishesh 08-07-2009 08:59 AM

use following command and check attributes value for both users
#pdbedit -Lv

there in nothing serious in
getpeername failed. Error was Transport endpoint is not connected



Thanks

1ill 08-07-2009 09:13 AM

Solved
 
Thanks Vishesh.

I did as you asked, and found that baduser didn't exist.

running smbpasswd -a baduser created the user, and now the share works.

Thanks to you both for your help - you don't know how stuck I have been on this one!

Regards,
1Ill


All times are GMT -5. The time now is 06:33 AM.