Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-05-2017, 06:33 PM   #1
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
Synology DiskStation DS216play: Can access Samba share from Windows and Mac, but not Linux

I'm able to access the shares from Windows and Mac computers, and even from non-Linux virtual machines that are on my Linux workstation. However, when I try to access the shares via Linux, I get errors.

From the Ubuntu Unity GUI:
Oops! Something went wrong.  Unhandled error message: Failed to retrieve share list from server: Connection timed out.
(This message comes up instantly, so I don't think it's actually a timeout.)

From the terminal:
$ smbclient -L diskstation.local -U username
WARNING: The "syslog" option is deprecated
Enter username's password: 
protocol negotiation failed: NT_STATUS_INVALID_NETWORK_RESPONSE
I've tried this from multiple Linux workstations, with the same results. (Note: actual username has been redacted.)

Fortunately, the Synology device is running Linux, and I'm able to SSH into it. Here's its auto-generated smb.conf, as reported by testparm:
# Global parameters
	realm = *
	printcap name = cups
	server min protocol = SMB2_10
	passdb backend = smbpasswd
	security = USER
	winbind enum groups = Yes
	winbind enum users = Yes
	idmap config * : backend = syno
	include = /var/tmp/nginx/smb.netbios.aliases.conf

	comment = "Shared resources for Operations Department"
	path = /volume1/Operations
	guest ok = Yes
	invalid users = nobody,nobody
	read list = nobody,nobody
	read only = No
	valid users = nobody,nobody
	write list = nobody,nobody
	edit synoacl = Yes
	enable recycle bin = Yes
	mediaindex = No
	recycle bin admin only = Yes
	service exist = Yes
	skip smb perm = Yes
	syno fstype = 2
	win share = Yes
Here is the smb.conf on my Linux workstation (which doubles as a file server):
# Global parameters
	server string = %h server (Samba, Ubuntu)
	log file = /var/log/samba/log.%m
	max log size = 1000
	syslog = 0
	panic action = /usr/share/samba/panic-action %d
	usershare allow guests = Yes
	client use spnego = No
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	passwd program = /usr/bin/passwd %u
	server role = standalone server
	unix password sync = Yes
	dns proxy = No
	idmap config * : backend = tdb

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

	comment = Printer Drivers
	path = /var/lib/samba/printers

	comment = Temporary storage on workstation
	path = /srv/samba/operations
	create mask = 0660
	directory mask = 0770
	read only = No
	valid users = operations
Any idea why I can't get into the Synology share from Linux, but it's working from other OSes?

Old 06-06-2017, 01:31 PM   #2
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
Lightbulb Solution

I discovered that adding "-m smb3" to the smbclient command fixed it:

$ smbclient -L diskstation.local -m smb3 -U username
WARNING: The "syslog" option is deprecated
Enter username's password: 
Domain=[DISKSTATION] OS=[] Server=[]

	Sharename       Type      Comment
	---------       ----      -------
	Operations      Disk      Shared resources for Operations Department
	IPC$            IPC       IPC Service ()
Domain=[DISKSTATION] OS=[] Server=[]

	Server               Comment
	---------            -------

	Workgroup            Master
	---------            -------
To make this the default for smbclient and client-side browsing, so that it works system-wide, add this to /etc/samba/smb.conf (and remove any contradictory entries):

client max protocol = SMB3
To apply this change, reload or restart the Samba service. How this is done will change depending on the distribution you're using. For Ubuntu 16.04 and similar:
$ sudo service samba reload
Hopefully, this explanation will save someone else a headache. :-)

Last edited by DaneM; 06-06-2017 at 01:36 PM.
Old 06-06-2017, 05:48 PM   #3
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
To mount the share on /mnt/directory:
$ sudo mount -t cifs //diskstation.local/operations /mnt/directory -o vers=3.0,username=username,password=password
The second "username" should be the actual username; and the second "password" should be the actual password for the share. If "password=password" is omitted, it will prompt for a password. If "username=username" is omitted, username "root" will be assumed (which is probably not what you want). Note that cifs-utils must be installed for this to work.

Last edited by DaneM; 06-06-2017 at 05:49 PM.


diskstation, nas, samba, synology

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Synology Diskstation, NFS backup Dinithion Linux - Server 1 09-03-2015 05:22 AM
Samba share cant access in windows sagar666 Linux - Server 12 04-23-2015 06:00 AM
[SOLVED] samba cannot access share from windows 7 ted_chou12 Linux - Software 3 08-15-2012 10:14 PM
Access linux SAMBA share from windows pengu Linux - Software 6 02-17-2007 12:55 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration