Cannot view and copy files using 2 Linux machines <SOLVED>

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Cannot view and copy files using 2 Linux machines <SOLVED>

Post by lstam » Wed Apr 11, 2018 4:38 pm

Hello, trying to view and copy files from one desktop and one laptop both using Linux Mint Cinnamon. I have used altair4 avahi-daemon method. When I click network file in nemo this is error message: Could not display "network:///". Nemo cannot handle "network" locations.

Code: Select all

lou@lou-P35-DS3L ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.

Code: Select all

lou@lou-P35-DS3L ~ $ net usershare info --long
WARNING: Ignoring invalid value 'share' for parameter 'security'
Can't load /etc/samba/smb.conf - run testparm to debug it

Code: Select all

lou@lou-P35-DS3L ~ $ sudo service smbd start
smbd start/running, process 4785
Last edited by lstam on Thu Apr 12, 2018 3:16 pm, edited 1 time in total.

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot view and copy files using 2 Linux machines

Post by altair4 » Wed Apr 11, 2018 5:13 pm

Could not display "network:///". Nemo cannot handle "network" locations.
Sounds like you are missing a package:

Code: Select all

sudo apt-get install gvfs-backends
WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.
Edit smb.conf gksu xed /etc/samba/smb.conf or gksu gedit /etc/samba/smb.conf
Find the line: security = share and change it to security = user
Save the file.
Restart smbd: sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Wed Apr 11, 2018 6:24 pm

Hello altair4, thank you for helping. Did all the above.

Code: Select all

lou@lou-P35-DS3L ~ $ sudo service smbd restart
stop: Unknown instance: 
smbd start/running, process 6192

Code: Select all

lou@lou-P35-DS3L ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[Public]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	workgroup = MONGROUPE
	server string = %h server (Samba, Ubuntu)
	server role = standalone server
	security = USER
	map to guest = Bad User
	obey pam restrictions = Yes
	guest account = lou
	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
	idmap config * : backend = tdb
	guest ok = Yes


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


[Public]
	path = /home/lou/Desktop/Documents/Public
	valid users = lou
	read only = No
In network I can see both machines. But can not open laptop this message: Unable to mount location, Failed to retrieve share list from server: Connection refused.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Wed Apr 11, 2018 6:41 pm

On laptop

Code: Select all

lou@lou-ThinkPad-T440 ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

# Global parameters
[global]
	server string = %h server (Samba, Ubuntu)
	server role = standalone server
	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
	idmap config * : backend = tdb


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


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
lou@lou-ThinkPad-T440 ~ $ 

Code: Select all

lou@lou-ThinkPad-T440 ~ $ net usershare info --long
mkdir failed on directory /var/run/samba/msg.lock: Permission denied
[Public]
path=/home/lou/Public
comment=
usershare_acl=S-1-1-0:F,
guest_ok=n

info_fn: file /var/lib/samba/usershares/mdossier is not a well formed usershare file.
info_fn: Error was Path is not a directory.

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot view and copy files using 2 Linux machines

Post by altair4 » Wed Apr 11, 2018 6:56 pm

valid users = lou
You have to add lou to the samba password database:

Code: Select all

sudo smbpasswd -a lou
Unable to mount location, Failed to retrieve share list from server: Connection refused.
The connection refused part comes from the smbpasswd issue.

The "Failed to retrieve share list" part is impossible if you did this:
I have used altair4 avahi-daemon method.
Go back to both machines and make sure you have a file: /etc/avahi/services/samba.service with this content:

Code: Select all

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
   <name replace-wildcards="yes">%h SMB</name> ## Display Name
   <service>
       <type>_smb._tcp</type>
       <port>445</port>
   </service>
</service-group>
Your machines should show up as lou-P35-DS3L SMB and lou-ThinkPad-T440 SMB

EDIT: I should have shut down hours ago. I will check back again tomorrow.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Wed Apr 11, 2018 7:27 pm

When on desktop in network I see both lou-P35-DS3L SMB and lou-ThinkPad-T440 SMB. But if I try to open lou-ThinkPad-T440 SMB I get message: Unable to mount location. On desktop, I can open lou-P35-DS3L SMB and see files shared.
I made sure, on both machine, that I have a file: /etc/avahi/services/samba.service with the content

Code: Select all

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
   <name replace-wildcards="yes">%h SMB</name> ## Display Name
   <service>
       <type>_smb._tcp</type>
       <port>445</port>
   </service>
</service-group>
Laptop seems to be the problem now.
There is progress, almost there. I have wanted to take care of this for over a year. At some point I had given up on the matter.

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot view and copy files using 2 Linux machines

Post by altair4 » Thu Apr 12, 2018 7:15 am

You've got an error suggesting something is messed up with your install of samba itself on lou-ThinkPad-T440. That will happen - especially on Mint - if at some point you uninstalled it and tried to install it again.

Before it gets too complicated what I would do on lou-ThinkPad-T440 is:

[1] Go into /var/lib/samba/usershares and remove all the files you see there. Based in the output of the "net usershare..." command you should see two files: public and mdossier. Just delete them both.

[2] Then I would edit /etc/samba/smb.conf and at the bottom of the file add the share definition for your Public share:

Code: Select all

[Public]
path = /home/lou/Public
read only = no
force user = lou
guest ok = no
Save the file then restart smbd: sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Thu Apr 12, 2018 9:21 am

Done. On Thinkpad when I try to open network this is message: Coul not display "network://".Nemo cannot handle "network" locations. I have to go now, will be on line later. Your help is much appreciated.

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot view and copy files using 2 Linux machines

Post by altair4 » Thu Apr 12, 2018 9:39 am

lstam wrote:
Thu Apr 12, 2018 9:21 am
On Thinkpad when I try to open network this is message: Coul not display "network://".Nemo cannot handle "network" locations.
We are in an infinite loop.

That was in your very first post and it was resolved by doing this:
altair4 wrote:
Wed Apr 11, 2018 5:13 pm
Could not display "network:///". Nemo cannot handle "network" locations.
Sounds like you are missing a package:

Code: Select all

sudo apt-get install gvfs-backends
Maybe you only did that for lou-P35-DS3L You need to do it again for the Thinkpad.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Thu Apr 12, 2018 1:44 pm

Right. Works great now! But on desktop I have 3 folders in networking. Names: a, public and public1. Can I delete a and public1. Thanks for your patience and for sharing your knowledge.

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot view and copy files using 2 Linux machines

Post by altair4 » Thu Apr 12, 2018 1:50 pm

By "delete" do you mean going into the desktop and "un-sharing" them? I do not know how to answer that since I don't know what is in "a" and "public1"?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Thu Apr 12, 2018 2:44 pm

In network folder it seems I have an icon to many: LOU-P35-DSL3, lou-P-35-DSL3 SMB and lou-ThinkPad-T440 SMB.

altair4
Level 18
Level 18
Posts: 8994
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot view and copy files using 2 Linux machines

Post by altair4 » Thu Apr 12, 2018 3:08 pm

lstam wrote:
Thu Apr 12, 2018 2:44 pm
In network folder it seems I have an icon to many: LOU-P35-DSL3, lou-P-35-DSL3 SMB and lou-ThinkPad-T440 SMB.
Actually that's normal. The host name without the SMB attached at the end LOU-P35-DSL3 is Samba finding netbios hosts the way Windows does it.

The host name with the SMB attached at the end is Samba findings hosts the way Linux and MacOS does it.

If that sort of thing bothers you you can disable it with another smb.conf edit on LOU-P35-DSL3:

Code: Select all

disable netbios = yes
Then restart smbd and nmbd.
Then everyone needs to be rebooted.

It's not worth the effort in my opinion. I personally would leave it alone. You having a working smb.conf why mess with things. Just remember to access the one with the SMB at the end. It's faster and more reliable.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

lstam
Level 1
Level 1
Posts: 42
Joined: Tue Jun 09, 2015 10:35 am

Re: Cannot view and copy files using 2 Linux machines

Post by lstam » Thu Apr 12, 2018 3:15 pm

Thank you so much :D

Post Reply

Return to “Other networking topics”