How to share drives over network?

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
rustyp
Level 4
Level 4
Posts: 247
Joined: Sun Nov 02, 2014 1:45 pm

How to share drives over network?

Post by rustyp »

How do I share internal and external hard drives connected to a desktop computer running Linux Mint 18.3?

I am completely networking stupid the more I read the more confused I get MOST I have read does not seem to apply to sharing hard drives.

Searched for site:forums.linuxmint.com how to share drives in linux mint

Thanks in advance
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: How to share drives over network?

Post by deepakdeshp »

Please use viewtopic.php?t=224391
And let us know the progress.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
rustyp
Level 4
Level 4
Posts: 247
Joined: Sun Nov 02, 2014 1:45 pm

Re: How to share drives over network?

Post by rustyp »

deepakdeshp wrote: Mon Jan 14, 2019 12:09 pm Please use viewtopic.php?t=224391
And let us know the progress.
Thanks for the reply, samba is installed, go into Files right click on the drive I want to share, under the Share tab it says "Folder Sharing" (at this point I will ASSume it also will share the whole drive since it does not say it wont) turn it on check the other two boxes, click close, go to other PC with Linux Mint 18.3 click on Network, nothing the share does not show, go to 3rd PC with windows 10 click on network do not see the share there either.

Suggestions?
Share 1TB.png
Before posting on this site I always verify I have the latest version of Linux Mint Cinnamon installed and run Update Manager.
Thanks.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: How to share drives over network?

Post by altair4 »

Post the output of the following commands:

Code: Select all

testparm -s

Code: Select all

net usershare info --long

Code: Select all

hostname
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
rustyp
Level 4
Level 4
Posts: 247
Joined: Sun Nov 02, 2014 1:45 pm

Re: How to share drives over network?

Post by rustyp »

ooo@MidTower ~ $ 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.
Server role: ROLE_STANDALONE

# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
security = USER
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* .
username map = /etc/samba/smbusers
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
ooo@MidTower ~ $

ooo@MidTower ~ $ net usershare info --long
info_fn: file /var/lib/samba/usershares/google earth portables is not a well formed usershare file.
info_fn: Error was Path is not a directory.
[VirtuaBox Appliances]
path=/media/ooo/19381EB650CBB428/Virtual Box Appliances
comment=
usershare_acl=Everyone:F,
guest_ok=y

info_fn: file /var/lib/samba/usershares/area51 is not a well formed usershare file.
info_fn: Error was Path is not a directory.
info_fn: file /var/lib/samba/usershares/1tb amd is not a well formed usershare file.
info_fn: Error was Path is not a directory.
[1 TB ]
path=/media/ooo/19381EB650CBB428
comment=MidTower
usershare_acl=Everyone:F,
guest_ok=y

[For 8 TB]
path=/media/ooo/19381EB650CBB428/For 8 TB
comment=
usershare_acl=Everyone:F,
guest_ok=y

ooo@MidTower ~ $



ooo@MidTower ~ $ hostname
MidTower
ooo@MidTower ~ $
Before posting on this site I always verify I have the latest version of Linux Mint Cinnamon installed and run Update Manager.
Thanks.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: How to share drives over network?

Post by altair4 »

There is a disturbance in the force with all those spaces in the paths of things ......

Anyhoo ....

[1] Edit /etc/samba/smb.conf and under the workgroup = WORKGROUP line add this one:

Code: Select all

force user = ooo
Then restart smbd:

Code: Select all

sudo service smbd restart
[2] If you allowed Win10 to do it's thing smbv1 on the client side was disabled so it will never "discover" the Linux box using netbios.

You can still access the Linux box but you will need to do so explicitly in one of two ways in explorer:
\\midtower OR \\midtower.local

[3] You can do the same thing between the other Linux boxes - just reverse the direction of the \\'s.

Or you can create an avahi service announcement:
altair4 wrote: Sat Jun 02, 2018 7:52 am ** If the other Linux machine is using an earlier Mint or Ubuntu I would suggest adding to those machines an avahi/samba service announcement:

[1] Create an avahi samba service file at /etc/avahi/services/samba.service

[2] Then copy and past the following into it:

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>
[3] And just in case restart avahi:

Code: Select all

sudo service avahi-daemon restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
rustyp
Level 4
Level 4
Posts: 247
Joined: Sun Nov 02, 2014 1:45 pm

Re: How to share drives over network?

Post by rustyp »

Yeah that does not work, I can see the shared folders of Linux Mint Computer 1 only on Linux Mint Computer 1
I can see the shared folders of Linux Mint Computer 2 only on Linux Mint Computer 2

I can not see the shared folders/drives of Linux Mint Computer 1 or Linux Mint Computer 2 on the Windows 10 machine, NOT surprised I have never had windows networking working correctly starting with Windows 3.1 through Windows 10.

What I DON'T UNDERSTAND is I can take a Raspberry Pi install LibreElec on it attach 6 external hard drives and ALL Linux Mint machines on my network can see the 6 drives, read and write to them, Windows 10 can sorta see the drives, Windows 10 has access to the files but only to play the files, no File Manager access.

2019 and I cant just flip a switch and have plug and play networking I still need 10 years of Networking college?

LibreElec and OpenElec guys seems to have it all figured out... I just flipped a switch NO knowledge of networking required, no cutting and pasting into a little black box that STILL does not allow Control + V to paste text after all these years.

Other than continuing to use LibreElec (slow) as the middle man to serve the home network files any other suggestions? I hate to but another 4 external hard drives and transfer all the data from desktops to the drives then attach to a Raspberry Pi..

Thanks.
Before posting on this site I always verify I have the latest version of Linux Mint Cinnamon installed and run Update Manager.
Thanks.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: How to share drives over network?

Post by altair4 »

I don't know how to explain this any other way.

There are three ways for a given machine to be "discoverable" by other machines on the network.

[1] Multicast DNS ( Avahi in Linux ).

The version of Samba in Mint 19 enables this by default but in earlier Mint's you need to create the /etc/avahi/services/samba.service file. All other Linux systems as well as MacOS ( but not Windows ) will see that box immediately in their file managers. All it requires is the avahi-daemon service running and all machines belonging to the same subnet.

If it doesn't work for you stop using Mint.

[2] NetBIOS

The source of all frustration with Samba for at least 20 years. So bad that even Microsoft deprecated it in 2000. It will still work if you poke at it long enough but there is an issue with Win10. On the client side of Win10 SMBv1 is disabled ( you can re-enable it if you want ). Without SMBv1 there is no browsing. You can still access the Linux machine but you have to do it explicitly like I illustrated above by ip address, host name, or hostname.local.

[3] WS-Discovery ( WSD )

This is Microsoft's replacement for NetBIOS. Works great if the other boxes in the network are running Windows and some well engineered NAS devices. At present there is no implementation of WSD within Samba itself.

There is a way to make it work in Linux - at least on the sever end of this. It takes a bit and I would be delighted to show you how it's done if you are interested. At this moment there is no WSD client hack in Linux so this won't help with Linux-Linux samba or Linux-to-Win10 samba but it will work for Win10-to-Linux samba.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Networking”