You are not logged in.

#1 2016-01-28 00:57:41

rabcor
Banned
Registered: 2013-02-09
Posts: 500

SAMBA not working

I just set up a samba server but can't seem to access the windows target from linux nor linux from windows even if both are able to detect each other (nmbd is working for windows to detect linux, but it always just fails to connect saying that linux rejected the connection) on linux if I try to access windows through nautilus, I only get as far as selecting the workgroup, when I want to open the workgroup to access the other computer I get this error:

Unable to access location"
Failed to retrieve share list from server: No route to host

but smbtree shows the windows computer's name just fine.

Contents of /var/log/samba/%m.log

[2016/01/28 00:53:40.250238,  0] ../source4/smbd/server.c:372(binary_smbd_main)
  samba version 4.3.4 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2015
[2016/01/28 00:53:40.273155,  0] ../source4/smbd/server.c:477(binary_smbd_main)
  At this time the 'samba' binary should only be used for either:
  'server role = active directory domain controller' or to access the ntvfs file
 server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint ser
vers = remote'
  You should start smbd/nmbd/winbindd instead for domain member and standalone f
ile server tasks
[2016/01/28 00:53:40.273231,  0] ../lib/util/become_daemon.c:111(exit_daemon)
  STATUS=daemon failed to start: Samba detected misconfigured 'server role' and 
exited. Check logs for details, error code 22

and testparm

Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[windows]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        server string = Linux
        security = USER
        log file = /var/log/samba/%m.log
        max log size = 50
        load printers = No
        printcap name = /etc/printcap
        dns proxy = No
        idmap config * : backend = tdb
        hosts allow = 192.168.1. 192.168.2. 127.


[windows]
        comment = Public Stuff
        path = /mnt/stash/Windows
        read only = No
        guest ok = Yes

and finally, smb.conf, I copied the example file and modified it like so>

[global]
   workgroup = WORKGROUP
   server string = Linux
   hosts allow = 192.168.1 192.168.2 127.
   load printers = no

[windows]
   comment= Public Stuff
   path = /mnt/stash/Windows
   public = yes
   writable = yes

(Everything not mentioned above should be set to it's default value, or was erased from the file)

I port forwarded ports 137-139 and 445, and just to be sure while testing I disabled the firewalls on both computers, but the result is the same.

I start samba, nmbd and winbindd with systemctl start (enabled on startup as well), so none of these is missing. I also used smbpasswd to set a password for my user account and enabled that user account with smbpassword as well just to be sure.

How can I get these computers to play along? They are detecting each other but not accessing each other. I feel like there's some minor detail I overlooked.

Last edited by rabcor (2016-01-28 00:59:52)

Offline

#2 2016-06-08 15:28:59

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: SAMBA not working

I get exactly the same error messages and even can't access my own network shares from local host.
Which is not surprising as the samba service fails to start showing the same message like you posted above.

So is there any solution yet? If you could fix it please post here - I'd be really glad to find a solution...

Anyone?

thx, p.

Last edited by piedro (2016-06-08 15:31:51)

Offline

#3 2016-06-12 05:33:58

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 288

Re: SAMBA not working

there might be some useful information here - I occasionally get delays accessing and have to try a couple more times before connecting and have one Win7pro64 laptop that won't share anything other than its Public folder but does access the Arch Linux Samba serer shares without issue haven't figured that out yet
Example simple home network with Arch Linux and a couple wIndoze machines, android TV's, and dlna receiver...

# Global parameters
[global]
	server string = Samba Server
	workgroup = HOMEGROUP
	log file = /var/log/samba/%m.log
	max log size = 1000
	printcap name = /etc/printcap
	name resolve order = bcast
	security = USER
	dns proxy = No
	idmap config * : backend = tdb

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

[Arch Documents]
	path = /home/bill/Documents
	veto files = /.*/
	create mask = 0664
	directory mask = 0775
	guest ok = Yes
	read only = No

[Arch Music]
	path = /home/bill/Music
	veto files = /.*/
	create mask = 0664
	directory mask = 0775
	guest ok = Yes
	read only = No

[Arch Pictures]
	path = /home/bill/Pictures
	veto files = /.*/
	create mask = 0664
	directory mask = 0775
	guest ok = Yes
	read only = No

[Arch Videos]
	path = /home/bill/Videos
	veto files = /.*/
	create mask = 0664
	directory mask = 0775
	guest ok = Yes
	read only = No

[Arch Downloads]
	path = /home/bill/Downloads
	veto files = /.*/
	create mask = 0664
	directory mask = 0775
	guest ok = Yes
	read only = No

[Arch ISO]
	path = /home/bill/ISO
	veto files = /.*/
	create mask = 0664
	directory mask = 0775
	guest ok = Yes
	read only = No

Last edited by WFV (2016-06-12 05:40:22)


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#4 2016-06-12 13:20:22

piedro
Member
Registered: 2013-04-11
Posts: 218

Re: SAMBA not working

I could solve it - one has to change and fiddle around with the resolve order in smb.conf - the default doesn't work.

For me this works:

name resolve order = lmhosts bcast host wins

Thx for posting,
p.

Last edited by piedro (2016-06-12 13:21:07)

Offline

Board footer

Powered by FluxBB