LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-31-2004, 05:50 PM   #16
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30

Just from look quickly looking shouldnt

david = David Waldie

be

david = "David Waldie"

???
 
Old 12-31-2004, 06:12 PM   #17
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
Happy New Year phn. I've tried the quotes. It worked last time but not this!
 
Old 12-31-2004, 06:22 PM   #18
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Are there any errors in any of the samba logs (located somewhere under /var/log)

And a happy new year to you to!
 
Old 01-01-2005, 05:49 AM   #19
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
Managed to get somewhere today. If I edit the smbusers file and change David Waldie to "David Waldie", it gets changed back. So I opened the Samba Configuration Screen in GNOME and changed the windows user to "David Waldie". Connected straight away. Yeehar. Copies 8G of files over then remembered I had not set up the firewall. So, turned the firewall on, set permissions for WWW, trusted device eth0 and set the Samba ports 137-139 tcp/udp. The I lost all connection. Went back and turned the Firewall off. And I'm back were I started. No connection, no shared device, no matter what I do to the username, no bloody connection.

I feel a Windows installation comming on
 
Old 01-01-2005, 06:07 AM   #20
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Did you reboot or flush your firewall rules?

You need UDP connections and TCP connections allowed on the ports.

netbios-ns 137/tcp NETBIOS Name Service
netbios-ns 137/udp NETBIOS Name Service
netbios-dgm 138/tcp NETBIOS Datagram Service
netbios-dgm 138/udp NETBIOS Datagram Service
netbios-ssn 139/tcp NETBIOS Session Service
netbios-ssn 139/udp NETBIOS Session Service

Also, if your machine is on a local network behind a router (presumably with a firewall), which is not directing any external/internet traffic to the system, do you need a local firewall (I am assuming that you are in a home situation)?

Try a windows reboot as well... apparently it may help...
 
Old 01-01-2005, 06:34 AM   #21
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
Set up the ports as you describe. It was then they machines stopped communicating. I turned off the firewall as a result. Still no connection.

My system is two Windows pc connected through a router with no firewall. The Linux box is connected to this router as well. I have tried shutting down (turning off) all machines and resetting the router as well. The difficulty I am having is the complete lack of consistency in resolving this problem. I have managed to get a connection through a variety of routes, but as soon as I change anything and lose connectivity, changing it back does not restore it. It's very reminiscent of internet sharing with Windows 98. Great in principal, but pointless much of the time.

I would guess Linux has about another hour left on this machine before being replaced with Windows once more. It's so bloody sad that that MS produces software that actually does what it says (well, mostly) at least it networks. Took me about 30 seconds last time I added a system, compared to over two weeks with Linux. Life is too short.

Sorry for the rant, but I feel better (ish).
 
Old 01-01-2005, 06:49 AM   #22
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
pnh,

Here's the contents of davidwaldie.log. I assume this the one that is used to connect to my Windows box:

[2004/12/31 15:07:33, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2004/12/31 15:07:33, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2004/12/31 15:07:33, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2004/12/31 15:07:33, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2004/12/31 18:39:12, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2004/12/31 18:39:12, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2004/12/31 18:39:12, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2004/12/31 18:39:12, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 09:46:22, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 09:46:22, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 09:46:22, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 09:46:22, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 10:08:55, 1] smbd/service.c:make_connection_snum(648)
davidwaldie (10.0.0.3) connect to service david initially as user david (uid=500, gid=500) (pid 3142)
[2005/01/01 10:08:57, 1] smbd/service.c:close_cnum(836)
davidwaldie (10.0.0.3) closed connection to service david
[2005/01/01 10:08:59, 1] smbd/service.c:make_connection_snum(648)
davidwaldie (10.0.0.3) connect to service david initially as user david (uid=500, gid=500) (pid 3144)
[2005/01/01 10:09:17, 1] smbd/service.c:close_cnum(836)
davidwaldie (10.0.0.3) closed connection to service david
[2005/01/01 10:13:51, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 10:13:51, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 10:13:51, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 10:13:51, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 10:27:17, 1] smbd/service.c:make_connection_snum(648)
davidwaldie (10.0.0.3) connect to service david initially as user david (uid=500, gid=500) (pid 3133)
[2005/01/01 11:30:27, 0] lib/util_sock.c:read_socket_data(384)
read_socket_data: recv failure for 4. Error = Connection reset by peer
[2005/01/01 11:30:27, 1] smbd/service.c:close_cnum(836)
davidwaldie (10.0.0.3) closed connection to service david
[2005/01/01 11:36:59, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 11:36:59, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 11:36:59, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 11:36:59, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 11:59:44, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 11:59:44, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 11:59:44, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 11:59:44, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 12:13:15, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 12:13:15, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 12:13:15, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 12:13:15, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 12:21:54, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 12:21:54, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 12:21:54, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 12:21:54, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)
[2005/01/01 12:32:58, 0] lib/util_sock.c:get_peer_addr(1000)
getpeername failed. Error was Transport endpoint is not connected
[2005/01/01 12:32:58, 0] lib/util_sock.c:write_socket_data(430)
write_socket_data: write failure. Error = Connection reset by peer
[2005/01/01 12:32:58, 0] lib/util_sock.c:write_socket(455)
write_socket: Error writing 4 bytes to socket 23: ERRNO = Connection reset by peer
[2005/01/01 12:32:58, 0] lib/util_sock.c:send_smb(647)
Error writing 4 bytes to client. -1. (Connection reset by peer)


I will be seriously impressed if you can make sense of that!
 
Old 01-01-2005, 06:58 AM   #23
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
That log is way way beyond me.

I would suggest that at this point you do a dual boot install of windows (first) and then install linux on separate partitions but they could share the data partition, so have partition 1 with windows, partition 2 with linux and partition 3 (formatted to vfat so linux can read and write and so can windows) as your "data" partition. This means that you can have a working system most of the time on windows and a linux system to fiddle with when you get the motivation/time to do so.

I would also suggest taking this problem to the samba mailing list (https://lists.samba.org/mailman/listinfo/samba) and they will probably be able to help you...

Sorry its been so difficult. It can be quite frustrating at times I know!
 
Old 01-01-2005, 07:12 AM   #24
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
Thanks for your help pnh.

I had pretty much the system you described and as networking seemed to be sorted, I repartitioned the drive to install Linux exclusively. Big mistake. I thought if I followed the same route as before it would work. It is this which has caused my frustration; it worked once, so why not this time.

Anyway, thanks for the link. I think I've subscribed. I assume once that's sorted I will be able to post my question there.

Better go and show my face to the family. I think they've forgotten what I look like
 
Old 01-01-2005, 08:36 AM   #25
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
I do hope my verbal diarrhoea has some use to others. I've managed to get a connection, and maybe those who indulge in the black art of networking might be able to explain this:

I tried to set up printer sharing on the two Windows machines (I built a new one for my Daughter for Xmas). No way could the New XP machine share the printer with the old one (mine). So I run the network wizard (netsetup.exe) I've been using for the past couple of years. It didn't sort out the printer sharing, but it did allow my machine to see the Linux box. I restarted the Linux firewall and lost connection as before. Ran the netsetup.exe on my XP machine and I have a connection once more. It even survives a power down (of both machines).

Maybe I've been barking up the wrong tree. Maybe the penguin is innocent!
 
Old 01-01-2005, 01:45 PM   #26
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
For those who haven't given up on my ramblings......

I've got to the point where I can get a connection every time, in a fashion.

I restart XP. When it starts, it shows a networked drive disconnected on bottom right. I got to explorer and, sure enough, the drive (the Linux one) is unobtainable. If I go to map a drive, I see localhost and nothing else.

Now the important bit. If I disable the network connection in XP, then restart it, I can see all the Linux shares as they should be.

If someone can make sense of that then maybe I can move on.
 
Old 01-01-2005, 05:34 PM   #27
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
Having just reconfigured my network recently which now consists of 2 linux servers one as a Samba PDC and various Windows Me, 2K and XP machines I can appreciate your frustration. I had similar sorts of problems with 'now you see it and now you don't' shares. I think there are 3 issues:

1) Windows browsing and shares are persistent and take a while to appear and a very long while to disappear - ie if you switch a Windows machine off the master browser still keeps a record of it for about 15 minutes or so in case it reappears. Therefore it can be deceptive just browsing using windows explorer because machines may still appear in the list but then you can't access them. Rebooting the master browser - which is probably one of the XP machines will refresh everything.

2) The browsing function may not work but mapping a drive to the //server/share may. Without going into too much detail there is a lot of different traffic involved in browsing and mapping drives - once a drive is mapped it can often bring the browsing back!

3) Firewall - pretty much all of my problems ended up as down to the firewall on the linux machine - which was installed by default (SuSE 9.2 with 2.6 kernel and iptables) . Initially I had one NIC in the server and was attempting to get the firewall to protect from the internet and allow LAN traffic on the same card. If I turned the firewall off I could browse and then after turning the firewall back on the browsing was still there for a while!
Putting an extra card in and separating the internal and external traffic enabled me to get the firewall working properly and all the Windows/Samba issues disappeared. The firewall issues could also be on the XP machines - the latest service packs switch on the Windows firewall by default and if you have a third party firewall active as well that can block LAN traffic whilst allowing internet access.

The other thing that I've found essential with Samba is to start with a simple configuration, get it working and then check it after each change with testparm. There's usually no need to stop and restart the nmbd and smbd daemons as any changes in smb.conf will get automatically picked up in seconds and each new connection from a Windows machine automatically reads the smb.conf file.

Finally if you're still stuck see if you've got ethereal or tcpdump on the linux box - they're packet sniffers that you can use to see exactly what's happening. You can also have a look in the system logs on the linux box to see if the firewall's DROPping SMB packets (ports 137,138,139 and 445).

Good luck!
 
Old 01-02-2005, 04:44 AM   #28
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
Thanks Andrew. Your second point has been of particular relevance. Even without an apparent connection, if I typed in the address, Iwould always get a connection. It might take five minutes, but it would connect. Incidentally, I used this exact same approach to get my shared printer back on-line on my other two XP machines. So thanks for that.

I can understand the problems you have had with the firewalls. In my case this doesn't seem to be the problem. For this morning at least, I think I may have cracked the problem. From other posts, I notice someone with similar problems being prompted to use the chkmod 777 <user folder> command. I don't know what the command does specifically, but it appears to have solved the connectivity problem. As long as I leave Windows alone for 30 seconds after booting, the shared folders are there as they should be.

As I think this is still related to the title of the post, here's another question:

I have one account on the Linux box, which is mapped to my Windows account. It is that which I am sharing. I want my Daughter's Windows machine to share the same resource. When I use the Samba Server Configuration to try and add her credentials, I enter my unix username (to share the resources in my /home folder) as the others are listed as adm, apache, bin and so on. I then enter her Windows username and passwords. The create new samba user dialogue box then says "an account for this user already exists".

What bit am I missing here?
 
Old 01-02-2005, 06:42 AM   #29
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
I'm not quite sure where you are getting stuck as I'm not familiar with Fedora and gnome, but if I explain how I would do it it might help.

I would add a separate linux user for each Windows user that you want and do the Samba user stuff for them. I tend to do this stuff at the command line so once the linux users exist (and they don't even have to be capable of logging on to linux) I do smbpasswd -a <linuxuser> as root in a console.

Whenever a Windows user connects to Samba it will get access to whatever shares are defined in the smb.conf file. Samba server itself runs with root privileges so it can read and write everything on the linux box. You can set the permissions for each share in smb.conf to allow or restrict users as you want. Therefore if you want a shared area that anyone can write to (eg /home/anybody) , set the linux permissions so that the linux users group has read/write access and then share the directory in the smb.conf, for instance like below:

[shared]
comment = Network shared directory
path = /home/anybody
valid users = @users
guest ok = no
printable = no
writeable = yes
browseable = yes
create mask = 0660
directory mask = 0770
 
Old 01-02-2005, 07:38 AM   #30
NomadABC
Member
 
Registered: Dec 2004
Posts: 189

Original Poster
Rep: Reputation: 33
Will do just that. What do the numeric entries mean?
 
  


Reply



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
Fedora Core 4 to WindowsXP network cbjhawks Linux - Networking 4 11-27-2005 04:47 PM
Samba in Fedora Core 4 arew264 Linux - Networking 5 10-27-2005 03:28 PM
Create Folder Error Fedora Samba WindowsXP MountainSurf Linux - Newbie 3 07-21-2005 04:27 PM
Can not install WindowsXP after uninstalling Fedora Core Test 3 futurist Fedora 20 07-30-2004 08:23 AM
Samba And Fedora Core 2 ikenbonnie Linux - Newbie 5 06-05-2004 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:27 AM.

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