How to restart Samba on Linux Mint 20.1

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
jsprenkle
Level 1
Level 1
Posts: 12
Joined: Tue Nov 06, 2012 12:40 am

How to restart Samba on Linux Mint 20.1

Post by jsprenkle »

Good evening,

I've tried every service restart variation I'm aware of, but none work ( service, systemctl, and init.d )
How do I restart smb ?

Thanks

Any chance the forum could be organized by operating system version?
Wading through solutions for software I'm not running makes it much more difficult.
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.
User avatar
kato181
Level 9
Level 9
Posts: 2564
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: How to restart Samba on Linux Mint 20.1

Post by kato181 »

To restart smb do the following..
sudo service smbd start
sudo service nmbd start
jsprenkle
Level 1
Level 1
Posts: 12
Joined: Tue Nov 06, 2012 12:40 am

Re: How to restart Samba on Linux Mint 20.1

Post by jsprenkle »

Thanks, but no joy.

Code: Select all

ay@jay-linux:/etc$ sudo service smbd start
[sudo] password for jay:            
Failed to start smbd.service: Unit smbd.service not found.
jay@jay-linux:/etc$ 
User avatar
kato181
Level 9
Level 9
Posts: 2564
Joined: Fri Mar 24, 2017 12:33 am
Location: Frederickton NSW

Re: How to restart Samba on Linux Mint 20.1

Post by kato181 »

looks like samba isn't installed..
sudo apt-get install samba
jsprenkle
Level 1
Level 1
Posts: 12
Joined: Tue Nov 06, 2012 12:40 am

Re: How to restart Samba on Linux Mint 20.1

Post by jsprenkle »

Code: Select all

jay@jay-linux:/etc$ ps -aux|grep smb
jay         5131  0.5  0.0 563348 15688 ?        SLl  Apr15 147:29 /usr/libexec/gvfsd-smb --spawner :1.7 /org/gtk/gvfs/exec_spaw/1
jay        11545  0.0  0.0 629048 19100 ?        SLl  Apr15   0:00 /usr/libexec/gvfsd-smb-browse --spawner :1.7 /org/gtk/gvfs/exec_spaw/4
root      507401  0.0  0.0      0     0 ?        I<   Apr28   0:00 [smb3decryptd]
jay       579380  0.0  0.0 489516 17744 ?        SLl  Apr30   0:00 /usr/libexec/gvfsd-smb --spawner :1.7 /org/gtk/gvfs/exec_spaw/42
jay       765170  0.0  0.0   9040   664 pts/0    S+   06:48   0:00 grep --color=auto smb
jay@jay-linux:/etc$ systemctl restart samba
It appears the nemo file browser uses Gnome's gvfs to access to windows shares.
jsprenkle
Level 1
Level 1
Posts: 12
Joined: Tue Nov 06, 2012 12:40 am

Re: How to restart Samba on Linux Mint 20.1

Post by jsprenkle »

kato181 wrote: Wed May 05, 2021 3:30 am looks like samba isn't installed..
sudo apt-get install samba
/etc/samba/smb.conf is present on my system.
It seems like it should not be if samba is not installed.
altair4
Level 20
Level 20
Posts: 11427
Joined: Tue Feb 03, 2009 10:27 am

Re: How to restart Samba on Linux Mint 20.1

Post by altair4 »

You will have an smb.conf if smbclient is installed but not have an smbd service if you don't have the samba package installed.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
williebthe3rd
Level 2
Level 2
Posts: 59
Joined: Sun Oct 21, 2018 11:07 am

Thanks! I got SAMBA working on Mint 20.3

Post by williebthe3rd »

Following the advice in this thread and others, I was able to regain access to my Windows XP machine's network share. That machine doesn't surf the web, it's behind a firewall. It plays music over a tiny FM transmitter, so I have my own radio station. :) It needs to run on XP, so that's the WHY. :)

I was searching, repeatedly, and getting bits and pieces... but not a good "step-by-step". What I had to do to make my new Mint 20.3 talk to it was install the older SAMBA... and then configure it. Here is what I did that worked. :) I hope this saves someone some time!

First, in Terminal:

Code: Select all

sudo apt-get install samba 
Once installed, I had to edit: etc\samba\smb.conf file

That file has to be opened by launching the text editor with:

Code: Select all

sudo xed
I then used the file manager to drag/drop the file into the "Elevated privilege" text editor, where I pasted the following:

Code: Select all

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = WORKGROUP
client min protocol = NT1
client lanman auth = yes
client ntlmv2 auth = no
server min protocol = NT1
ntlm auth = Yes
security = user
client use spnego = no
name resolve order = bcast host lmhosts wins
Then SAVE the file and close the editor & terminal.

Then, in the Control Center in the main Mint menu, "Startup Applications" I added two new ones as follows:

Name: "Start Samba 1"
Command: echo (my PW) | service smbd start

Name: "Start Samba 2"
Command: echo (my PW) | service nmbd start

(use your password without the parenthesis to run these commands followed by the pipe symbol)

Now, every time my machine boots up, my older machines on my Windows network are accessible again. :)
Willie...
Locked

Return to “Beginner Questions”