Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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??
Distribution: Gentoo, Redhat 9, SuSE 9.0, 9.2, Win XP
Posts: 149
Rep:
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.