LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems with samba, can't see samba shares (https://www.linuxquestions.org/questions/linux-software-2/problems-with-samba-cant-see-samba-shares-563943/)

windsurfer 06-23-2007 08:44 AM

Problems with samba, can't see samba shares
 
Hi

I have be trying to get my samba shares to be seen by windows, here below is my smb.conf. I am using swat to configure this. My samba shares do not show up on my windows machines. I have tried several combinations of configuration but do not know what else to do. Please could someone help?

smb.conf is:-

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2007/06/22 22:35:48

[global]
workgroup = HANG10
null passwords = Yes
passdb backend = tdbsam
username map = /etc/samba/smbusers
syslog only = Yes
announce version = 5.0
name resolve order = hosts wins bcast
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = CUPS
printing = cups
print command =
lpq command = %p
lprm command =

[print$]
path = /var/lib/samba/printers
write list = root
create mask = 0664
directory mask = 0775
guest ok = Yes

[printers]
path = /tmp
guest ok = Yes
printable = Yes
browseable = No

[MyFiles]
path = /tmp
browseable = No
available = No

[tmp]
comment = adrians tmp
path = /home/adrianr/tmp
browseable = No
available = No

[music_store]
comment = Geko4
path = /music_safe/music_store
username = adrianr
valid users = adrianr
admin users = adrianr
read only = No
guest ok = Yes
hosts allow = 192.168.1.0/255.255.255.0, geko10, geko4, geko80

[homes]
valid users = %S
read only = No
browseable = No

[geko10]
comment = Michaels pc
path = /music_safe/music_store
guest ok = Yes


Please does anyone know what I have done wrong?

Adrian

macemoneta 06-24-2007 05:26 PM

The reason that the shares don't show up is usually because the firewall is blocking the necessary ports. Browsing SMB/CIFS shares requires that you open up a lot of your firewall, which is why it's usually disabled. 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


windsurfer 06-25-2007 05:25 AM

Hi

Thank you for the reply, I have firestarter installed, which file do I change ?

macemoneta 06-25-2007 06:34 AM

You'll need to tell Firestarter to allow incoming connections (from the subnet your machines are on) to ports 137-139 (tcp/udp), 445 (tcp/udp), and 1025-65535 (udp) on the policy page.

windsurfer 06-25-2007 04:19 PM

Still cant see my shares whats next?

macemoneta 06-25-2007 04:39 PM

You want to set "browseable = yes" for the shares you want to be seen by other machines. See 'man smb.conf'.

Are you sure the firewall on the other side is open to the ports?

You can restart samba, restart Windows, then wait about 15 minutes. SMB/CIFS sucks as a protocol, and the share browsing is the worst part of it.

windsurfer 06-26-2007 03:40 AM

Well I have done everything that has been said and there is still no shares! The firewall ports are open, I really can't think of anything to look at, anyone got any ideas?

macemoneta 06-26-2007 05:42 AM

You can try adding the following to your smb.conf in the global section, using your subnet:

remote browse sync = 123.45.67.0/24
remote announce = 123.45.67.0/24

Other than that, I can't think of anything else.

michaelk 06-26-2007 08:40 AM

Is the workgroup name the same on all computers?
What version of windows are you running?

In a command prompt box on the windows computer try:
net view \\hang10
or
net view \\IP_address (use actual IP address of hang10)

What are the error messages if any?

Might need to enable netbios over TCP/IP on the windows box.

You also do not have any settings for security like:
security = share
encrypt passwords = Yes

Remove the available = No since this will turn off the service.

The output of the command testparm will show the default settings and check for syntax errors. You should not have any errors since you are using swat.

windsurfer 06-26-2007 03:42 PM

So I tried all of this, when I did net view on the windows box I got : System error 53 has occurred, the network was not found,
I am using windows home edition version 2002 sp2. I removed the no on available, I still have no shares?

macemoneta 06-26-2007 03:49 PM

You are restarting iptables (the firewall), samba, etc after making changes, correct?

michaelk 06-26-2007 03:55 PM

Is samba running? Try this command from the linux box
smbclient -L hang10

At the password prompt just press the enter key.

windsurfer 06-27-2007 04:22 AM

Hi

When I do this cmd I get an error :-smbclient -L hang10
Connection to Hang10 failed.

I don't know what this means, I am restarting the firewall and samba when I make changes.

michaelk 06-27-2007 06:48 AM

My bad use the actual hostname of the computer.
smbclient -L hostname

windsurfer 06-27-2007 07:28 AM

Hi

Well when I do that the answer comes back:-

Domain=[HANG10] OS=[Unix] Server=[Samba 3.0.22]

Sharename Type Comment
--------- ---- -------
print$ Disk
tmp Disk adrians tmp
music_store Disk Geko4
homes Disk
geko10 Disk Michaels pc
music Disk
IPC$ IPC IPC Service (Samba 3.0.22)
ADMIN$ IPC IPC Service (Samba 3.0.22)
tp0 Printer Canon_PIXMA_iP3000
Domain=[HANG10] OS=[Unix] Server=[Samba 3.0.22]

Server Comment
--------- -------
GEKO4 Samba 3.0.22

Workgroup Master
--------- -------
HANG10 GEKO4
adrianr@geko4:~$

showing all my shares and workgroup, but still nothing is seen on my windows machines


All times are GMT -5. The time now is 02:52 AM.