LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba - cannot see network (https://www.linuxquestions.org/questions/linux-networking-3/samba-cannot-see-network-508239/)

cvzyl 12-07-2006 11:04 AM

Samba - cannot see network
 
I recently swapped from SuSE10.2 to Kubuntu 6.10 and need a bit of help to be able to see the network shares.

My network is set up correctly and I can connect to the internet.
When going to Remote Places>Samba I see two workgroups, Home and Workgroup. The rest of my PC's are all on Home but when I try to browse it I get an error saying "Timeout on server". I can browse the Workgroup but obviously it is only the Kubuntu machine on it.
In System Settings>Sharing I can see that samba is running and that simple sharing is enabled.
When browsing my local network from a Windows machine, I can also see two workgroups, Home and Workgroup. When I try to connect to the Kubuntu machine it asks for a username and password. What should I enter here? I entered my login details for the Kubuntu machine but it is rejected.

My questions:
1. What should I do to get this samba sharing working?
2. How do I change the workgroup on the Kubuntu machine from Workgroup to Home?

Thank you
Cobus van Zyl

macemoneta 12-07-2006 12:56 PM

If you want to be able to browse samba (Windows SMB/CIFS) shares, you have to open a broad range of ports - this is why most folks don't permit it. If you want to allow it, you have to open ports 1025-65535, in addition to the usual 137-139 and 445 which are needed to actually use the shares. One way to do this is to limit access to the subnet on your LAN. For example:

Code:

# Samba
-A INPUT -s 123.45.67.0/24 -p tcp -m tcp --dport 137:139  --syn -j ACCEPT
-A INPUT -s 123.45.67.0/24 -p udp -m udp --dport 137:139        -j ACCEPT
-A INPUT -s 123.45.67.0/24 -p tcp -m tcp --dport 445      --syn -j ACCEPT
-A INPUT -s 123.45.67.0/24 -p udp -m udp --dport 445            -j ACCEPT
-A INPUT -s 123.45.67.0/24 -p udp -m udp --dport 1025:65535    -j ACCEPT

As far as the userid and password, that's what you've set with the "smbpasswd" command on the system running Samba. It does not have to be related to a system login at all.

cvzyl 12-07-2006 03:52 PM

Hi macemoneta

How do I open these ports? The extract you showed below, is that from a config file?

I also tried changing the samba password with the smbpasswd command. It seemed to succeed but when I try to log in from a Windows machine and type my username and password (new one specified) it just pops up the login box again, asking for a username and password.

My main problem is that I cannot see any other computers on the network. Is that related to the ports? In SuSE I did not have this problem. Although Windows machines could not access my shared drives, at least I could access theirs.

Cobus

macemoneta 12-07-2006 04:07 PM

Thats a sample configuration for an iptables firewall, common on Linux systems. You will have to adjust it for your configuration and LAN addresses. There's probably a GUI that you have in an administration tool that will let you configure the firewall, but they tend to be somewhat simplistic.

The basic idea is described in the text above the sample. Look at the documentation for the firewall configuration tool you are using, and try to determine how to open the ports.

Keep in mind the statement about not doing this. You are opening not one or two ports, but over 64,000! This has potentially serious security issues. If you are not sure, better to not do it. Just configure an id and password with smbpasswd and specify the specific share you want on the Windows machine. It's much safer.


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