[SOLVED] Samba not working - Router settings?

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
teilnehmer

[SOLVED] Samba not working - Router settings?

Post by teilnehmer »

Hey there,

I've read through altair4's great tutorial, and what I intend to to is a usershare between two computers. The laptop is called bruder and runs Mint 11, the desktop is called butler and runs Mint 10.

I went through the steps in Nautilus with both machines for the images folder (called "bilder" in debug output, because it's German), successfully setting up usershares. They do show up in /var/lib/samba/usershares. Alas, the machines only see themselves in the network. Here's the output of my smbtree on BRUDER:

Code: Select all

mueller@bruder ~ $ smbtree
Enter mueller's password: 
WORKGROUP
	\\BRUDER         		bruder server (Samba, LinuxMint)
		\\BRUDER\bilder         	
		\\BRUDER\Print_to_PDF   	Print to a PDF File
		\\BRUDER\IPC$           	IPC Service (bruder server (Samba, LinuxMint))
		\\BRUDER\print$         	Printer Drivers
On BUTLER, I get a similar ouput with BUTLER instead of BRUDER.
Both machines are in the same workgroup, I haven't encrypted my home directory.

Is there anything I need to teach my router to let traffic through? Nmap gives me no information on the remote computer, but seems to find correct open ports for the local one, strengthening my suspicion regarding the router:

Code: Select all

mueller@bruder ~ $ sudo nmap -sS -sU -PN 192.168.178.34

Starting Nmap 5.21 ( http://nmap.org ) at 2012-01-06 10:18 CET
Nmap scan report for 192.168.178.34
Host is up (0.000031s latency).
Not shown: 1994 closed ports
PORT     STATE         SERVICE
139/tcp  open          netbios-ssn
445/tcp  open          microsoft-ds
68/udp   open|filtered dhcpc
137/udp  open          netbios-ns
138/udp  open|filtered netbios-dgm
5353/udp open|filtered zeroconf

Nmap done: 1 IP address (1 host up) scanned in 1.56 seconds
Note: If I use Nmap without the -PN option, it doesn't see anything and yields "Host seems down. If it is really up, but blocking our ping probes, try -PN"
Blocking ping probes doesn't sound like something I want to happen when setting up a network.

My router is a Fritz!Box 7170. Thanks for reading through this!

Jan

--
Additional info:

Code: Select all

mueller@bruder ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
	server string = %h server (Samba, LinuxMint)
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d

[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	printable = Yes
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
--> Interestingly, "workgroup" is not reported. When I change it in my smb.conf to something other than "WORKGROUP", it is displayed correctly. When I change it back to "WORKGROUP", it vanishes again.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba not working - Router settings?

Post by altair4 »

Let me see if I can answer the easy one first:
--> Interestingly, "workgroup" is not reported. When I change it in my smb.conf to something other than "WORKGROUP", it is displayed correctly. When I change it back to "WORKGROUP", it vanishes again.
This is what happens when you run "testparm -s":

* The system interprets that command as: testparm -s /etc/samba/smb.conf a file that it then compares to the default Samba settings.
* Any parameters that are not in the defaults or those that have values that are different from the default are kept.
* Any parameters that have values that are the same as the default are ignored.

So what you get is the affect that smb.conf has on the default setting of samba not the total set of parameters that Samba is using. If you run the following command which forces testparm to run against an empty file you will get the default settings of Samba:

Code: Select all

testparm -sv /dev/null
You should notice that workgroup = WORKGROUP.

Set workgroup to the same value in smb.conf and you will get no reference in "testparm -s". Set it to something else and you will.

As far as the real problem you are having I'm at a loss at the moment. The output of nmap and testparm look textbook correct. I am not at all familiar with that router but I will see if I can download the user manual to see if something jumps out. My first though would be that the 2 machines are in different subnets since samba cannot ( normally ) browse for hosts by name across subnets. But the fact that nmap can't find it suggest something more fundamental is wrong here - I'm just not smart enough to see what it is.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
teilnehmer

Re: Samba not working - Router settings?

Post by teilnehmer »

Thanks for the clarification on the testparm command. That's what comes from not reading the man-pages, but just providing the output I've read people need to help me :=)

That you also believe the router to be at fault made me rethink my knowledge of that - I realized I did an update for the router some time ago... and now that I think about that: I used to be able to remote-access my MusicPal (internet radio device) from the browser by entering it's IP, something that no longer works.
I just checked, and indeed, my router didn't allow the wifi-devices to communicate with each other! Obviously that was reset to factory default during the update!

I don't have time to check this out further (my lunch is done :) ), but please don't make the effort to read the manual (if you insist, I found an URL). I'll play around there and see if I can ping my different machines. Right now, I can't...

UPDATE: Ha!! Without further meddling, it now works! I can access the usershare! Samba took a few minutes, I guess. Thanks for the heads-up regarding the router, that helped me look in the right direction. Great help, altair4!
Locked

Return to “Networking”