LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-17-2003, 04:17 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Question Samba


I a couple samba issues I need help with:

1) When I connect to my XP Pro (SP1) box using my Linux box (RH 8.0 w/ samba 2.2.7a), I can't copy large files or large numbers of files (can't tell which... just large amounts of data in general) without causing the linux box to crash hard. I've tried using smbclient and get, mounting it to the file system on the linux box and using cp, and mounting it and then just doing a drag-and-drop with the GUI. How can I keep the transfers from crashing the linux box?

2) When I connect to the linux box with the xp box, it asks for a password, but regardless of what valid username or password I enter (including root), it denies me access. I have password encryption enabled in the samaba conf file, if that helps.


Anything you guys could come up with would be really helpful.
 
Old 01-17-2003, 06:48 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Regarding 1) - You should have a look at the log files from when the crach ocurred. You should find them /var/log/samba/log.smb (for samba problems) and /var/log/messages for other more general problems.

Reagarding number 2) It depends on how you sut up the samba shares and whether of not you added the usernames to smbpasswd. Samba is a stable, well-documented service so I'd suggest you read up on it over at samba.org.
 
Old 01-18-2003, 01:44 PM   #3
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Post A Little More Info

Here is some more info regarding my linux machine crashing when I try to copy large amounts of data (a few large files or a bunch of smaller ones) from my XP machine:


1) Thanks for the advice, mcleodnine, but I looked and the /var/log/samba folder didn't have any files in it after the crash.

2) I noticed that when the transfer is going, the HDD light on the XP box is on almost solid. The drive is running real hard, but it's not a slow computer/HDD and I don't have any other programs going on it. At the same time, however, the linux HDD light is normal for a network-speed transfer... flickering, and on about 30 percent of the time.

3) The time it takes the connection to die seems to be a constant. It takes about 90 seconds to crash, and that is why I need to transfer large amounts of data to get it to happen.

4) When connecting to the XP box using the following command:

# smbclient //102.168.1.100 -U gauge

I get the following error messages:

session request to 192.168.1.100 failed (Called name not present)
session request to 192 failed (Called name not present)

And then it prompts me for a password. Regardless of whether or not this helps solve the crashing issue, could some explain these messages to me and then explain why I still connect?


5) The machines are connected using standard cat5e cable and a linksys 4-port router/switch. Both have 10/100 cards. I believe a 3com in the linux machine and a linksys in the xp machine.


Now, I know that item 5 is probably not helpful, but considering item number 2, I though perhaps there was a buffer overflow ocurring on the linux machine. Perhaps (and I don't know if this makes sense), the XP box is sending at 100Mb/s but the linux box is only running at 10Mb/s? Just a thought. Any ideas?

Last edited by gauge73; 01-18-2003 at 01:49 PM.
 
Old 01-18-2003, 01:51 PM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Look in /var/log/warn, /var/log/messages...
 
Old 01-18-2003, 02:30 PM   #5
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Unhappy Logs

Okay, I've attempted the transfer another three times and checked the logs after each try. I've noted the time of the crash and looked for messages during that time in /var/log/messages and found nothing logged at that time.

Also, /var/log/warn and /var/log/samba/log.smb do not seem to exist.
 
Old 01-20-2003, 03:09 AM   #6
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
New developments

I tried downloading some files from my wife's 2k computer today. I was able to get a 744MB file from her without a problem. Then I tried downloading the same file from my XP computer to see if the problem was fixed or something. It worked. I was thrilled. Then I went back to a 550MB file that I had been failing on previously... and failed on it again. So I tried downloading about a 5GB directory from my computer. It downloaded about 3GBs of the directory and then the transfer died... but the computer didn't crash.

Also, I tried transfering data FROM the linux box TO the xp box, and it worked like a champ... transfered a GB or two without a problem.

This is some seriously weird stuff, guys. Does anyone know what this could be? I never had this problem previously with this computer when I had Win2K on it. So, it must be samba and/or linux. Ideas? There must be a genius out there somewhere!

Last edited by gauge73; 01-20-2003 at 03:14 AM.
 
Old 01-20-2003, 05:46 AM   #7
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
I've had similar problems between two windows machines, and it turned out to be the network card driver on one of them. So its possible the driver on the Linux box may be getting upset. You might try another driver, or even another card

Just a thought.
 
Old 01-20-2003, 09:23 AM   #8
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Thumbs up New Driver and/or Card

Thanks a bunch. That sounds like a solid lead.


Does anyone have any suggestions of a standard 10/100 network card that definitely has solid drivers in RedHat 8.0?


And a better question... are linux drivers distribution specific, or do all the distributions share the same drivers?
 
Old 01-20-2003, 11:14 AM   #9
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Two solid leads for network cards are 3Com and Intel.

I had a similar problem with my linux using an old 3Com 595 card and I replaced it with a newer 905 card (which incidently uses the same drivers and I never changed a setting, just swapped cards and rebooted) and it went away.

Drivers are part of the kernel and are pretty much the same on all distros ie if redhat is running kernel 2.4.18 and so is slackware then they will use the same network card driver. This was confusing when I came over from the windows world where vendors make their drivers and when the Windows OS is released they throw their current driver in if Microsoft lets em. In Linux most hardware drivers are part of the kernel package and are maintained by kernel developers or vendor coders working with kernel developers so you usually have support "in the kernel" for your hardware. This is starting to change though with the popularity of linux causing some vendors to develop their own drivers independant of the kernel source guys.

For all that logging in stuff, I'm not sure about XP pro but I think it's like NT workstation in that you have accounts for anyone accessing the box either locally or on the domain of an NT or 2K (or samba) domain controller. I'd suggest that you set up an account for yourself on XP and then use the same name to create an account in samba by creating a linux account then adding the matching samba account with smbpasswd -a {username} and use the same password there that you use in XP. Also try smbclient with the -U {username} option to tell the machine you connect to what name you want to use if you are logged into linux as root (which is frowned upon for normal user stuff.)
 
Old 01-20-2003, 02:02 PM   #10
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Talking Almost done

Thanks a whole lot, Darin. I really appreciate all the help. You said you had an issue with a 3com card when you changed to Linux, and that certainly sounds promising as I have an old 3com NIC in my linux machine now. I have no idea which type, though.

I really only have one question left, I believe (unless other issues pop up in the future regarding this):

When connecting to the XP box using the following command:
# smbclient //102.168.1.100 -U gauge

I get the following error messages:
session request to 192.168.1.100 failed (Called name not present)
session request to 192 failed (Called name not present)

And then it prompts me for a password. I assume that the requests are a broadcast to the specific address and then a broadcast to the network after failure on the first broadcast. Seems to me that two failures there would prevent connection success. Could some explain these messages to me and then explain why I still connect?
 
Old 01-20-2003, 02:46 PM   #11
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
I was able to get a "called name not present" error on my machine, it happens with me when I smbclient an IP address instead of a windows computer name...

Which is probably just not something SMB does well (remember it's window's netbios protocol and samba is just emulating that.) Probably why net neightborhood shows computer names and not their IP addresses

So basically use the computer names not their IP addresses, this is how windows boxes see each other and what samba emulates.

PS the "old" 3Com card of mine was REALLY old as in first generation PCI NIC and you probably don't have the same situation.
 
Old 01-21-2003, 04:21 AM   #12
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Spot on, this was my exact problem with Samba printer sharing.

Linux does not understand that when you type \\1.1.1.1\share that 1.1.1.1 is an ip addresses, it thinks it is a name. If you look into the packet you will see this is not just an address resolution issue because samba actually uses the host part as the called name in the SMB session request -

IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x10 (16)
Precedence: 000 - Routine
Delay: 1 - Low delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x007C (124)
ID: 0x943A (37946)
Flags
Don't fragment bit: 1 - Don't fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x40 (64)
Protocol: 0x06 (6) - TCP
Checksum: 0x3E2C (15916) - correct
Source IP: 169.254.10.7
Destination IP: 169.254.10.2
IP Options: None
TCP
Source port: 36020
Destination port: 139
Sequence: 0x9CE9F34F (2632577871)
Acknowledgement: 0x9E6E4AC1 (2658028225)
Header length: 0x08 (8) - 32 bytes
Flags: PSH ACK
URG: 0
ACK: 1
PSH: 1
RST: 0
SYN: 0
FIN: 0
Window: 0x16D0 (5840)
Checksum: 0xC88B (51339) - correct
Urgent Pointer: 0x0000 (0)
TCP Options
Timestamps
Value: 0x0016E885 (1501317)
Echo Reply: 0x00000000 (0)
Session Service
Type: 0x81 (129) - Session request
Length: 0x000044 (68)
Called name: 169.254.10.2
Calling name: LINUX

Note that it has use the correct IP address as per the command, but it also uses the command info in the called host field, and of cource this is no longer IP this is now windows networking speak, and 169.254.10.2 is not a valid hostname.

In windows you can type at the command prompt \\cartman\share OR \\169.254.10.2\share and windows twigs which is which. This seems to be a problem with the Linux Samba implementation in that it gets confused and uses the IP as the IP and the called name. I think windows reverse resolves the names first, I'd have to check.
 
Old 01-21-2003, 01:05 PM   #13
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Well, I can't use the NetBIOS host name on my network because I do not have a WINS or DNS server running. It appears to me that samba only resolves host names using DNS servers. Is that correct?

If it is correct, why doesn't it resolve the NetBIOS names automatically with broadcasts like Microsoft does? (i.e. broadcast to resolve from NetBIOS name to IP address, and then broadcast again to resolve from IP address to MAC address without the use of a DNS or WINS server)
 
Old 01-21-2003, 01:54 PM   #14
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
You CAN turn on samba's wins server. I think there is also an option for smb commands like smbmount to set the search order, use broadcast as the first search. Also, if the win boxes have ipx or netbeui protocols and do netbios over those then they will have their own netbios resolution under those protocols (using netbeui or ipx broadcasts) and samba will ignore those since it only talks netbios over IP...even if you have IPX set up on your linux box.
 
Old 01-21-2003, 02:19 PM   #15
jonnyjonjon
LQ Newbie
 
Registered: Jan 2002
Location: here
Distribution: SuSE
Posts: 21

Rep: Reputation: 15
/hosts

couldn't you just put an entry for the windows machine in /etc/hosts? i'm not in front fo my linux box so i can't really test it out. but that is just the first thing that comes to mind.
 
  


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
Samba/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 01:33 AM
Samba - Connecting from WinXP Pro to Samba running on Debian critical Linux - Networking 1 02-03-2005 09:36 AM
I need the content from thegoldenear.org/toolbox/unices/samba/samba-setup.html rtg2001 Linux - Networking 1 08-05-2004 05:54 PM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 01:21 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

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

All times are GMT -5. The time now is 01:07 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