LAN File Sharing on AVLinux MX Edition

Help on all MX Re-spins
Message
Author
siabost9deas
Posts: 10
Joined: Thu Mar 09, 2023 10:27 am

Re: LAN File Sharing on AVLinux MX Edition

#11 Post by siabost9deas »

Hi @Huckleberry Finn
I'll check out that lanshare app.

My network looks a bit strange - shortcuts are duplicated (see attached screenshots). I am in the sambashare group.

Meantime

Code: Select all

testparm
:

Code: Select all

 AV Linux MX Edition
kenny@HP-Music-PC:~/Desktop
$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
	log file = /var/log/samba/log.%m
	logging = file
	map to guest = Bad User
	max log size = 1000
	obey pam restrictions = Yes
	pam password change = Yes
	panic action = /usr/share/samba/panic-action %d
	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
	usershare allow guests = Yes
	idmap config * : backend = tdb


[homes]
	browseable = No
	comment = Home Directories
	create mask = 0700
	directory mask = 0700
	valid users = %S


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


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
You do not have the required permissions to view the files attached to this post.

siabost9deas
Posts: 10
Joined: Thu Mar 09, 2023 10:27 am

Re: LAN File Sharing on AVLinux MX Edition

#12 Post by siabost9deas »

By contrast, I've discovered I can access both AVL MX computer shared folders from my Kubuntu laptop, though the reverse isn't possible. And I can send files from the Kubuntu laptop to the shared folders on the AVL MX PCs.
The Kubuntu samba.conf set-up (I had to add the 'client protocol = NT1' line to get access to my old dlink storage device):

Code: Select all

kenny@Kenny-Main-Laptop:~$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        client min protocol = NT1
        log file = /var/log/samba/log.%m
        logging = file
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        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
        server string = %h server (Samba, Ubuntu)
        unix password sync = Yes
        usershare allow guests = Yes
        idmap config * : backend = tdb


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


[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers

User avatar
CharlesV
Global Moderator
Posts: 7059
Joined: Sun Jul 07, 2019 5:11 pm

Re: LAN File Sharing on AVLinux MX Edition

#13 Post by CharlesV »

I dont see any shared areas in your testparam ? did you chop off that part, or is nothing shared ?

also might be interesting to see what smbtree shows

Code: Select all

smbtree
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

Huckleberry Finn

Re: LAN File Sharing on AVLinux MX Edition

#14 Post by Huckleberry Finn »

In the meantime there's also such a tiny, simple utility, ready in repos, if you like: https://www.tecmint.com/share-files-ove ... -in-linux/

Code: Select all

$ apt show woof
Package: woof
Version: 20091227-2.1
Priority: optional
Section: net
Maintainer: Andrea Gasparini <gaspa@yattaweb.it>

Installed-Size: 34.8 kB

Depends: python
Homepage: http://www.home.unix-ag.org/simon/woof.html
Tag: implemented-in::python, network::service, role::program, scope::utility,
 works-with::file

Download-Size: 9,324 B

APT-Sources: http://deb.debian.org/debian buster/main i386 Packages

Description: share files through HTTP protocol
 Woof (Web Offer One File) is a tool to copy files among hosts. It can serve a
 specified file on HTTP, just for a given number of times, and then exits.
 .
 It can be easily used to share files across the computers on a net, enough the
 other ends have just a browser (that means you can share things between
 different operating systems or different devices, even phones).
 .
 Features include:
  * it can share stuff "one shot" and exit just after he served that file.
  * it can share things among different operating system or different devices
    (e.g.: a smartphone), and allows one to upload files easily.
  * it can also show a simple html form in order to upload file (useful if the
    client hasn't a way to serve the file).
Edit: Oh, no, it seems to be available for Buster for the last time.

Huckleberry Finn

Re: LAN File Sharing on AVLinux MX Edition

#15 Post by Huckleberry Finn »

siabost9deas wrote: Sat Mar 11, 2023 6:15 pm... I can access both AVL MX computer shared folders from my Kubuntu laptop, though the reverse isn't possible. And I can send files from the Kubuntu laptop to the shared folders on the AVL MX PCs...
Then it may be something systemd-related.

You can try adding users to systemd-network group.

User avatar
FullScale4Me
Posts: 1007
Joined: Fri Jan 08, 2021 11:30 pm

Re: LAN File Sharing on AVLinux MX Edition

#16 Post by FullScale4Me »

Let me break this down into a few easily digestible steps. On all hosts that you have shares setup do the following:

1) open a console window and enter: 'smbclient -L localhost' without ' ' s. Example of a session is below.

Code: Select all

mike@HP-P2-1394:~
$ smbclient -L localhost
Enter WORKGROUP\mike's password: 

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        IPC$            IPC       IPC Service (Samba 4.13.13-Debian)
        HL2380DW        Printer   B&W Laser Printer
        LinuxISO        Disk      
SMB1 disabled -- no workgroup available
mike@HP-P2-1394:~
In this output, the user-defined share is 'LinuxISO'

2) Verify the share is permissioned correctly and it's owner has a SMB password set in the MX Samba Config Applet. Do this on all Linux hosts sharing files. See HELP: MX SAMBA CONFIG

Why check this way? This sidesteps all current File Manager and UFW firewall known behaviors.
Last edited by FullScale4Me on Sun Mar 12, 2023 4:50 pm, edited 1 time in total.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

User avatar
FullScale4Me
Posts: 1007
Joined: Fri Jan 08, 2021 11:30 pm

Re: LAN File Sharing on AVLinux MX Edition

#17 Post by FullScale4Me »

Next, get the IP address of all PCs by typing hostname -i in a command window. Write them down for the next step. Example below.

Code: Select all

mike@HP-P2-1394:~
$ hostname -i
fe80::99b4:ac30:b529:b9bb%eth0 192.168.1.119
mike@HP-P2-1394:~
In the example above this PCs IP address is 192.168.1.119

As before using a command window, this time to provide further visibility to connection errors.

The 192.168.1.114 following the -L is the IP address of the remote PC. The Workgroup password is the smb user ID/Account Password for, in this example the 'mike' user ID/Account.

Enumerating a remote share on Linux with the smbclient utility; in this case, the share is called 'Downloads'. From a command prompt:

Code: Select all

$ mike@HP-P2-1394:~smbclient -U mike -L 192.168.1.114
Enter WORKGROUP\mike's password: 

        Sharename       Type      Comment
        ---------       ----      -------
        Downloads       Disk      
        IPC$            IPC       Remote IPC
        Users           Disk      
        
 mike@HP-P2-1394:~
The share 'IPC$' is configured by SaMba (by default) to be network visible but is NOT (accessible) shared by default. The share users should be visible network-wide.

Change the IP address in the command to see each individual remote PC. All of this giving no errors should be reproducible in Linux File Managers.

Windows remote PCs will have two additional shares (ADMIN$ Disk Remote Admin) and (C$ Disk Default share) neither can be connected to by Linux hosts without extra effort.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

User avatar
FullScale4Me
Posts: 1007
Joined: Fri Jan 08, 2021 11:30 pm

Re: LAN File Sharing on AVLinux MX Edition

#18 Post by FullScale4Me »

Errors found in the 'localhost' test are primarily associated with share creation (form or designed but not saved) by the user.

The IP address test failing (but localhost test passing) points to:

1) The owner of the share not having an SMB password.

2) permissions of the share not set correctly (all denied access, owned by a user not specified in the above test, etc) Revisit the instructions HELP: MX SAMBA CONFIG

3) a firewall on either the share PC or the one doing the IP Address test blocking the connection.

In my experience 1 will fail silently with 2 & 3 resulting in errors on the screen in the terminal. Connection timeout/refused error: run the UFW applet, click rules, type samba in the search, and apply/OK your way out.

Below can be read or ignored...
Samba will auto-negotiate protocol without a need to force anything in its config; Left on its own it will connect with SMB3_02 to Windows 10/Windows 11 and SMB2_02 to most Linux-enabled hosts/devices.

Forcing SMB protocol lower adds a tremendous reduction of file transfer speed (as much as 90%) and opens exposure to Malware such as WannaCry and similar SMB-based evilness.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

siabost9deas
Posts: 10
Joined: Thu Mar 09, 2023 10:27 am

Re: LAN File Sharing on AVLinux MX Edition

#19 Post by siabost9deas »

@CharlesV

Code: Select all

smbtree
on one of the AVLinux seems to reveal an error, if I read it correctly ('No compatible protocol selected by server')?

Code: Select all

 AV Linux MX Edition
kenny@HP-Music-PC:~
$ smbtree
Enter WORKGROUP\kenny's password: 
WORKGROUP
	\\               		Kenny-Main-Laptop server (Samba, Ubuntu)
		\\\               	Kenny-Main-Laptop server (Samba, Ubuntu)
		\\\DLINK-SHARE    	DNS-320L
		\\\HP-MUSIC-PC    	Samba 4.13.13-Debian
	\\DLINK-SHARE    		DNS-320L
		\\DLINK-SHARE\Volume_1       	
		\\DLINK-SHARE\IPC$           	IPC Service (DNS-320L)
		\\DLINK-SHARE\lp             	USB Printer
	\\HP-MUSIC-PC    		Samba 4.13.13-Debian
smbXcli_negprot_smb1_done: No compatible protocol selected by server.
smbc_opendir: Invalid argument

siabost9deas
Posts: 10
Joined: Thu Mar 09, 2023 10:27 am

Re: LAN File Sharing on AVLinux MX Edition

#20 Post by siabost9deas »

Hi @FullScale4Me,

Thanks for all that. I will need to try it all later as I have run out of time tonight.

I have set an smb password on all relevant machines.

I will report back. Thanks.
You do not have the required permissions to view the files attached to this post.

Post Reply

Return to “MX Respins”