Samba share for home networking[Solved]

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
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Samba share for home networking[Solved]

Post by shom_ronnie »

I am trying to setup a home network between my laptop and pc, both has linux mint installed. I have installed samba in both the computers, and created a share folder in home, set up password for share. But unfortunately my laptop shows up in the network tab which cannot be opened, and my pc wont show up at all. Am i missing a trick here. Would really appreciate your help. Thank you
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba share for home networking

Post by altair4 »

What version and what desktop of Mint are you using?

If you are using Mint19 on all your machines the ability to see each other is automatic. If you are using an earlier version of mint you need to add an avahi/samba registration file on all your Mint machines:

[1] Add a file:

Code: Select all

gksu xed /etc/avahi/services/samba.service
[2] Add this to 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] Just in case restart avahi:

Code: Select all

sudo service avahi-daemon restart
As for the share itself I need more information. Please post the output of the following commands:

Code: Select all

testparm -s

Code: Select all

net usershare info --long
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking

Post by shom_ronnie »

On my pc i have mint 18.3 and on laptop mint 19. Here are the resuts

$ 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
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
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking

Post by shom_ronnie »

[Untitled Folder]
path=/home/shom/Untitled Folder
comment=
usershare_acl=Everyone:F,
guest_ok=n
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking

Post by shom_ronnie »

after instaing avahi and making the change i can see the desktop computer on the network but cant open it
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba share for home networking

Post by altair4 »

If you have to install avahi on your Mint system something is seriously wrong since it's there by default.

There is nothing wrong with the output of testparm or usershare so it's not a configuration problem - unless you encrypted your home folder of course.

I would make sure the firewall is disabled on both systems:

Code: Select all

sudo ufw disable
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking

Post by shom_ronnie »

Ok firewall was the problem. Turned it off manually, can see the shared file now. Thank you so much.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking

Post by shom_ronnie »

Do i have to allow all the smbds in gufw. There seems to be many, also an avahi. Do i need to allow them all
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba share for home networking

Post by altair4 »

Samba is a predefined application in ufw so you should be able to allow Samba this way:

Code: Select all

sudo ufw allow Samba
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking

Post by shom_ronnie »

Ok, will give that a try. Thank you
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking[Solved]

Post by shom_ronnie »

One last thing, if i want to share the mnt folder instead of home, because thats where my data partition is mounted, how can i do that. Thank you
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba share for home networking[Solved]

Post by altair4 »

Hopefully you don't mean /mnt itself. You don't share /mnt without violating a whole bunch of conventions concerning Linux filesystem hierarchy. Did you mean something like /mnt/Data?

It's no different to how you did it in your home folder but usershare ( Nemo ) only allows you to share what you own. Are you the owner of /mnt/Data?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking[Solved]

Post by shom_ronnie »

Yes i am the user, i will explain what i mean. I have a separate partition where i keep my files. I can use the home folder to share files, but would be a lot easier if i had access to that partition from my laptop. Now that partition im talking about, is mounted at boot, and i have all the permissions there to make changes. I also have it mounted in mnt so that it mounts up on boot. If only i can have access to that partition over samba, it would really be very useful.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking[Solved]

Post by shom_ronnie »

It loads up like /mnt/partition. That partition is what im looking to share.
altair4
Level 20
Level 20
Posts: 11458
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba share for home networking[Solved]

Post by altair4 »

If you are the owner of /mnt/partition then you create the share in nemo the same way you created the one for "Untitled Folder" in your home directory.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
shom_ronnie
Level 3
Level 3
Posts: 126
Joined: Tue Jun 12, 2018 1:33 pm
Location: India

Re: Samba share for home networking[Solved]

Post by shom_ronnie »

Ok, im able to share the files from that partition now. Thanx for your quick suggestions altair4. Really appreciate your time and help. Thank you
Locked

Return to “Networking”