LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-23-2003, 04:35 PM   #1
SpotsPaw
LQ Newbie
 
Registered: Nov 2003
Location: Houston, TX
Distribution: Red Hat 9, Windows XP Pro
Posts: 6

Rep: Reputation: 0
Question WinXP Cannot Access RH9 Shares


I am running Samba on RedHat 9 to share file and print services over my home network with my Windows XP Pro workstation.

From the Linux side, printing to my Windows printer is fine, and accessing the Windows file shares is fine.

From the Windows side however, I cannot access the Linux file shares. From the command line net view \\<MyLinuxBox> takes forever to return, and then returns "System error 1234 has occurred. No service is operating at the destination network endpoint on the remote system".

I have confirmed the following:
- I can ping the Linux box from Windows both by hostname and IP
- I can ftp the Linux box from Windows both by hostname and IP
- I do have a Samna user setup that matched the Windows username/password
- Both the nmbd and smbd daemons are running
- netstat -a show the following lines mentioning netbios (although nothing for ports 137 or 139)
tcp 0 0 *:netbios-ssn *:* LISTEN
udp 0 0 rascal.garfm:netbios-ns *:*
udp 0 0 *:netbios-ns *:*
udp 0 0 rascal.garf:netbios-dgm *:*
udp 0 0 *:netbios-dgm *:*

My smb.conf looks like this:
[global]
workgroup = garfmahlers
security = user
browsable = yes
server string = samba server
hosts allow = 192.168.8. 127.
printcap name = /etc/printcap
load printers = yes
printing = cups
log level = 3
log file = /var/log/samba/%m.log
max log size = 50000
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
passwd program = /usr/bin/passwd %u
encrypt passwords = yes
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
local master = yes
domain master = auto
preferred master = auto
username map = /etc/samba/smbusers
guest ok = yes
guest account = rmaciver
dns proxy = no
[homes]
comment = Home Directories
browseable = no
guest ok =no
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
printable = yes
[MyHome]
path = /home/rmaciver
writeable = yes
user = rmaciver

I'd really appreciate any idea, advice or suggestions about what it wrong.

Thanks...
 
Old 11-23-2003, 04:39 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
To see listening ports try:
netstat -nlp

Also check waht firewall rules are in place:
iptables -L

If you are unsure then post the output from those two commands.
 
Old 11-23-2003, 05:04 PM   #3
SpotsPaw
LQ Newbie
 
Registered: Nov 2003
Location: Houston, TX
Distribution: Red Hat 9, Windows XP Pro
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for your reply.

The netstat -nlp looks like this:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2600/smbd
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN 2008/X
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1840/httpd
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1788/vsftpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1745/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 3387/cupsd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1810/sendmail: acce
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 1840/httpd
udp 0 0 192.168.8.62:137 0.0.0.0:* 2604/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 2604/nmbd
udp 0 0 192.168.8.62:138 0.0.0.0:* 2604/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 2604/nmbd
udp 0 0 0.0.0.0:663 0.0.0.0:* 1759/xinetd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1585/dhclient
udp 0 0 0.0.0.0:631 0.0.0.0:* 3387/cupsd
udp 0 0 192.168.8.62:123 0.0.0.0:* 1778/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 1778/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 1778/ntpd

iptables -L looks like this:
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Lokkit-0-50-INPUT (2 references)
target prot opt source destination
ACCEPT udp -- clock.redhat.com anywhere udp spt:ntp dpt:ntp
ACCEPT udp -- clock.redhat.com anywhere udp spt:ntp dpt:ntp
ACCEPT udp -- 192.168.8.60 anywhere udp spt:domain dpts:1025:65535
ACCEPT tcp -- anywhere anywhere tcp dpt:http flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:telnet flags:SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable


Both don't mean much to me. What are you looking for?
 
Old 11-23-2003, 05:22 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
The netstat lines here:
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2600/smbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 2604/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 2604/nmbd

Show that samba is running and the lines:
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable

show that ports 0-1023 will be blocked unless there is a rules above to allow them. The rules you have in place were created by lokkit (redhats firewall tool). You will need ot run it and allow connections to the following:
137:UDP
138:UDP
139:TCP

Or write an iptables script to create your own firewall rules.
 
Old 11-23-2003, 06:00 PM   #5
SpotsPaw
LQ Newbie
 
Registered: Nov 2003
Location: Houston, TX
Distribution: Red Hat 9, Windows XP Pro
Posts: 6

Original Poster
Rep: Reputation: 0
Ah, the light is coming on. I have changed the firewall rules. Now however I have a different problem. From Windows I not get an Access Denied error.

I changed the Samba service security to share and can then access the Linux shares from Windows just fine. So I obviously don't understand how user security works. I set security to user, encrypted password to yes. Also verified that I have a Samba user account that is the same username/password as the logged on WIndows account. What am I missing??

Thanks a bunch for your help!
 
Old 11-24-2003, 05:23 AM   #6
paul.nel
Member
 
Registered: Nov 2003
Location: Cape Town
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149

Rep: Reputation: 15
Well, there is one other thing that can cause access to be denied ie the privilages on the files you are sharing on the Linux machine. If you eg created the files as user "linuxuser" and the samba user is "sambauser" you will find that access is denied. You must make sure that the samba user has rights to the files/directories shared on the linux machines. You can do this by either changing the file ownership with the chown command or by changing the file privileges using chmod.

Hope this helps.

p.n
 
Old 11-24-2003, 04:57 PM   #7
SpotsPaw
LQ Newbie
 
Registered: Nov 2003
Location: Houston, TX
Distribution: Red Hat 9, Windows XP Pro
Posts: 6

Original Poster
Rep: Reputation: 0
Success at last. Thanks for pointing to file permissions it helped. Also thanks to david_ross for walking me through it...
 
Old 11-13-2005, 05:56 AM   #8
mohhingman
LQ Newbie
 
Registered: Nov 2005
Location: Brisbane, Australia
Distribution: Debian Sarge
Posts: 1

Rep: Reputation: 0
Thumbs up File sharing works thru Samba for XP - solved

Hi.

Thanks paul.nel, your suggestion solved the problem

SOLVED

I run a Debian sarge linux box which shares the printer and provides a file storage location. From the smb.conf's point of view, all the share settings were correct. Changing the user ownership of the folder to be shared allowed full write access to the folder. I can now happily write files to the debian share drive.

The situation existed before the fix was as follows. The WinXP machine could see the shared folder on the debian box. It was possible to browse the folder and retrieve files from there. However, write access was not allowed. And this was even when the smb.conf had explicit orders to allow writing to the folder (writeable = yes). I changed the owner of the shared folder from "root" to "smbprint", my guest user for printing.

Upon restarting the samba server, it worked

Thank you
 
Old 01-24-2006, 01:10 AM   #9
JoshuaCurtiss
LQ Newbie
 
Registered: Dec 2004
Location: Illinois
Distribution: Fedora Core 3
Posts: 9

Rep: Reputation: 0
Lightbulb Ports 137 and 138 for Samba

Quote:
Originally Posted by david_ross
allow connections to the following:
137:UDP
138:UDP
139:TCP
Thank you. I have been wondering why the heck my samba shares work fine, but I could only find my samba servers by directly accessing their IP or putting the IP in all my computers' hosts files. I have port 139 opened but not ports 137 and 138.

Thanks again for your post.

Josh
 
  


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
WinXP cannot access samba shares from RH9 kc8tbe Linux - Software 24 02-20-2006 08:33 PM
dual-boot WinXP-RH9 shared Internet access via DSL provri Linux - Wireless Networking 0 07-26-2005 01:41 AM
Samba: Can't access shares with WinXP thorax Linux - Software 14 07-28-2004 06:13 AM
How to access Linux Shares from WINXP Pro? murbz Linux - Networking 4 07-17-2004 06:10 AM
access linux shares from winxp flynnhandley Linux - Networking 2 08-27-2003 02:55 PM

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

All times are GMT -5. The time now is 11:16 PM.

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