Another broken SAMBA ... Failed to start Samba SMB Daemon [SOLVED]

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Another broken SAMBA ... Failed to start Samba SMB Daemon [SOLVED]

Post by binarymonk » Sat Oct 13, 2018 4:36 am

Hi there folks.

As you can tell by the subject line it is all about SAMBA. I am really pulling what little hair I have left out with this. So here is the background:

Very green Linux user. I have had Linux Mint 17,1 & 17.3 on a laptop for a while. They just work and I use them occasionally. (although I've never had them sharing files over my LAN with Windows machines etc). I decided to dual boot the shiny new TARA on to my main PC. That went fairly ok, and with some guidance from past posts and a Grub fix it now boots and runs lovely.

I really need this machine to talk to the other machines on the network though and so I went to ... https://www.techrepublic.com/blog/five- ... ing-samba/ .. looking for a gui to help me. I decided on ... "WEBMEIN"
After following the instructions located at ..... http://www.webmin.com/samba-howto.html
My Samba is screwed, and no matter where I look I can't figure out what to do.

So I figured. I'll hold my hands up, say that I screws it up, and hope that someone is looking down on the forum kindly and might be willing to help, or at least point my tired eyes in the right direction.

Thanks in advance
Last edited by binarymonk on Sun Oct 14, 2018 7:20 pm, edited 2 times in total.
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 6:46 am

Took a quick look at the Webmin Samba Howto and one issue is this:
10.) Change your security to share level then save the changes.
Share level security ( security = share in smb.conf ) is no longer a legitimate option in Samba. Hasn't been for years. If you force it to that setting today smbd ( the samba daemon ) will refuse to start.

Side note: I would suggest that you get aquatinted with a samba diagnostic tool called testparm. You invoke it in a terminal this way:

Code: Select all

testparm -s
If you were to run it with security set to share it would have told you what I just said above:
WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.
The "service" it has an error loading is ... well ... itself ( smbd ).

Side note2: I also looked at your first link and you should know that system-config-samba has been abandoned, will not run, and designed for version3 of samba. Samba no longer supports SWAT. Gadmin-samba is far far worse - it was written for version2 of samba and will absolutely destroy your smb.conf file to such an extent that it will be inoperable.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 11:42 am

First things first, thank you for replying to my post altair4, and thank you for your advice so far.
altair4 wrote:
Sat Oct 13, 2018 6:46 am
Took a quick look at the Webmin Samba Howto and one issue is this:
10.) Change your security to share level then save the changes.
Share level security ( security = share in smb.conf ) is no longer a legitimate option in Samba. Hasn't been for years. If you force it to that setting today smbd ( the samba daemon ) will refuse to start.
Thanks for that little bit. I have set the "Security" back to default and low and behold the SMB Service has started.
altair4 wrote:
Sat Oct 13, 2018 6:46 am
Side note: I would suggest that you get aquatinted with a samba diagnostic tool called testparm. You invoke it in a terminal this way:

Code: Select all

testparm -s
If you were to run it with security set to share it would have told you what I just said above:
WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.
The "service" it has an error loading is ... well ... itself ( smbd ).
Yep you were right :roll:
altair4 wrote:
Sat Oct 13, 2018 6:46 am
Side note2: I also looked at your first link and you should know that system-config-samba has been abandoned, will not run, and designed for version3 of samba. Samba no longer supports SWAT. Gadmin-samba is far far worse - it was written for version2 of samba and will absolutely destroy your smb.conf file to such an extent that it will be inoperable.
Ok, so having followed your brief advice so far I have firstly concluded that I am as green as grass, and that I really like the way Linux Mint just does what you tell it. (When you know what you are doing :oops: )

So now that the service is up and running again. Do you fancy, helping me out with getting it to talk to the windows PC's on my network?
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 12:06 pm

So now that the service is up and running again. Do you fancy, helping me out with getting it to talk to the windows PC's on my network?
Well, that's another issue. Linux-to-Linux samba is easy. Linux-to-Windows not so much.

The version of samba that comes with Ubuntu 18.04 ( Mint 19 ) made some changes primarily so that it could converse with Win10. In doing this some things got messed up. So I guess the question is what is the problem?

If you can no longer open your file manager and browse for Windows machines you might want to look at this: Mint 19 and Samba File Sharing Changes
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 12:44 pm

altair4 wrote:
Sat Oct 13, 2018 12:06 pm
Well, that's another issue. Linux-to-Linux samba is easy. Linux-to-Windows not so much.

.... So I guess the question is what is the problem?
The problem is... Everything...

If I start from the beginning... I followed the doomed instructions as I mentioned before. But that didn't work. Thanks to you I have now got Samba running.
If I click on "/Files/Network/" then I can see the machine I'm on plus a "windows network folder" if I click on that I can see "Home" (Which takes me to my router) or "Workgroup" if I click on that I get the error message..
Unable to mount location... Failed to retrieve share list from server: Success
There is NO folder with MY actual workgroup. (which I have changed in the smb.conf.
If you can no longer open your file manager and browse for Windows machines you might want to look at this: Mint 19 and Samba File Sharing Changes
I did that but it hasn't made any difference. :(

At this point I'm wondering if it may just be best to start from scratch and get a someone to hold my hand :lol:
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 1:32 pm

Please post the output of this command to that we can see how far off from the default you actually are before we start over:

Code: Select all

testparm -s
In the mean time if you did this:
There is NO folder with MY actual workgroup. (which I have changed in the smb.conf.
Did you restart samba? You do that in this order:

Code: Select all

sudo service smbd restart

Code: Select all

sudo service nmbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 2:02 pm

altair4 wrote:
Sat Oct 13, 2018 1:32 pm
Please post the output of this command to that we can see how far off from the default you actually are before we start over:

Code: Select all

testparm -s
No problem output as follows...

Code: Select all

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]
	dns proxy = No
	log file = /var/log/samba/log.%m
	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)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	workgroup = USLOT65
	idmap config * : backend = tdb


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


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
	read only = Yes
Hope that makes sense to you :lol:
In the mean time if you did this:
There is NO folder with MY actual workgroup. (which I have changed in the smb.conf.
Did you restart samba? You do that in this order:

Code: Select all

sudo service smbd restart

Code: Select all

sudo service nmbd restart
Yep done that. Nothing.... So I did a Full PC Restart. Now I can see a folder with my workgroup name but it gives me the "Unable to mount location... Failed to retrieve share list from server: Success" error when I click on it. :roll:

So how are we looking?
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 2:25 pm

I don't know how you are getting to the point where you get "failed to retrieve .." error. When you go to Network > Windows network you should get a blank screen because netbios browsing is disabled in Mint 19 without the NT1 reference.

Anyhoo what I would do is edit /etc/samba/smb.conf and right below the workgroup = USLOT65 line add these:

Code: Select all

client max protocol = NT1
name resolve order = bcast host lmhosts wins
Then restart smbd then nmbd again.

You really should see if Samba itself is working on this box. You do that by trying to access each of your Windows machines by ip address not by name. Open a terminal and run - with the correct ip address of the Windows machine:

Code: Select all

nemo smb://192.168.0.100
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 2:43 pm

altair4 wrote:
Sat Oct 13, 2018 2:25 pm
I don't know how you are getting to the point where you get "failed to retrieve .." error. When you go to Network > Windows network you should get a blank screen because netbios browsing is disabled in Mint 19 without the NT1 reference.
As per your other post and suggestion I added the NT1 reference as well as the name resolve order stuff. ( I did that after your second post. You pointed me to one of your other post/tutorials, so I added them in then)
You really should see if Samba itself is working on this box. You do that by trying to access each of your Windows machines by ip address not by name. Open a terminal and run - with the correct ip address of the Windows machine:

Code: Select all

nemo smb://192.168.0.100
Done that and I get the error..
Could not display "smb://192.168/.../..."
error:Failed to retrieve share list from server: Invalid argument. Please select another viewer and try again.
So... I have included here a copy of the "GLOBAL" section from my smb.conf.
[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = USLOT65

netbios name = Charles
client max protocol = NT1
security = user
client use spnego = no
name resolve order = bcast host lmhosts wins

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
# wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
Hope that helps too :)
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 3:00 pm

I don't think I can help you. The output of testparm doesn't match what you have in smb.conf and I don't know how that can happen.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 3:09 pm

altair4 wrote:
Sat Oct 13, 2018 3:00 pm
I don't think I can help you. The output of testparm doesn't match what you have in smb.conf and I don't know how that can happen.
That really is a shame, you have been amazing so far.
Would it be best to just delete the smb.conf I have and start from fresh?

Thanks for everything :D
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 3:17 pm

If you have things in your smb.conf that testparm cannot pick up I don't know how restarting with a new smb.conf will fix things but there is a recovery default smb.conf located at /usr/share/samba/smb.conf if you want to try.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 4:02 pm

altair4 wrote:
Sat Oct 13, 2018 3:17 pm
If you have things in your smb.conf that testparm cannot pick up I don't know how restarting with a new smb.conf will fix things but there is a recovery default smb.conf located at /usr/share/samba/smb.conf if you want to try.
Perhaps that might have led to my having problems... :roll: :oops: .. It seems that after following an earlier post it is the /usr/share/samba/smb.conf that i have been altering. I have since put everything as it was. changed everything in the /etc/samba/smb.conf instead, and here follow the testparm -s output
grandad@Charles:~$ 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]
client use spnego = No
dns proxy = No
log file = /var/log/samba/log.%m
map to guest = Bad User
max log size = 1000
name resolve order = bcast host lmhosts wins
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
security = USER
server role = standalone server
server string = %h server (Samba, Ubuntu)
syslog = 0
unix password sync = Yes
usershare allow guests = Yes
workgroup = USLOT65
idmap config * : backend = tdb


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


[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
read only = Yes
Does it look any better now? :wink:
When all is said and done... at the end of the day... it gets dark ;)

altair4
Level 19
Level 19
Posts: 9279
Joined: Tue Feb 03, 2009 10:27 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by altair4 » Sat Oct 13, 2018 4:28 pm

It does ... outside of the client use spnego = No entry. Is there a reason for that?

EDIT: And client max protocol = NT1 is still missing.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sat Oct 13, 2018 6:31 pm

altair4 wrote:
Sat Oct 13, 2018 4:28 pm
It does ... outside of the client use spnego = No entry. Is there a reason for that?
Actually, the reason for that is after following one of your previous threads...
someone else had a similar problem that apparently needed that line. I figured mine was the same. But that was before I had held my hand up and realised how far down the rabbit hole I was.
EDIT: And client max protocol = NT1 is still missing.
I could have sworn I added it. :?: I am not on that PC now, as it is now 23:29 UK time, and I will be signing off for tonight, but I will double check it in the morning and post back to you then. :)

Once again altair4 Thank you for everything so far. :D
When all is said and done... at the end of the day... it gets dark ;)

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon

Post by binarymonk » Sun Oct 14, 2018 7:13 pm

ALTAIR4 You are a life saver. :D

I have been on and commented out the line client use spnego = No so it now reads # client use spnego = No.
Also I have added in the line client max protocol = NT1.

I then did the

Code: Select all

sudo service smbd restart

Code: Select all

sudo service nmbd restart
But NOTHING... So again I did a PC restart and YES IT WORKS! :D

I had run testparm -s and was going to post it here but I saved it to the wrong folder... :lol: and that one isn't on my share list... (I'm not on that PC again :roll: )
OK so the moral of the story folks is DON'T try and follow some dodgy looking DIY web GUI... Just hold you hand up and say I F.U.B.A.R. and then come here where you should have been all along :D
So I'm going to mark this as solved, as sharing my Linux files to windows has never been a problem before, but I know who I'm looking up if TARA has any other ideas this time :wink:

And for anyone else who has been following this.... here it is in plain English...
using your file manager navigate to the folder /etc/samba (right click on the samba folder and open as root). Then open the file smb.conf (now with elevated privileges), and in the "GLOBAL SETTINGS" section, at the top of the file, under the line workgroup = WORKGROUP add the following lines.

Code: Select all

client max protocol = NT1
name resolve order = bcast host lmhosts wins
Also if you want to you can change the name of the workgroup but it's not needed.
SAVE THE FILE...

In a terminal, you could then do

Code: Select all

sudo service smbd restart
sudo service nmbd restart
But I found it better to just restart the whole PC.
A Massive thank you to ALTAIR4 for his outstanding help throughout this whole thing. (P.S. I'll post the testparm -s output in the morning just so you can see it)
When all is said and done... at the end of the day... it gets dark ;)

binarymonk
Level 1
Level 1
Posts: 17
Joined: Tue Jun 02, 2015 3:39 am

Re: Another broken SAMBA ... Failed to start Samba SMB Daemon [SOLVED]

Post by binarymonk » Mon Oct 15, 2018 5:52 am

And here it is the output of testparm -s

Code: Select all

grandad@Charles:~$ 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]
	client max protocol = NT1
	dns proxy = No
	log file = /var/log/samba/log.%m
	map to guest = Bad User
	max log size = 1000
	name resolve order = bcast host lmhosts wins
	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
	security = USER
	server role = standalone server
	server string = %h server (Samba, Ubuntu)
	syslog = 0
	unix password sync = Yes
	usershare allow guests = Yes
	workgroup = USLOT65
	idmap config * : backend = tdb


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


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers
	read only = Yes
Once again a MASSIVE thank you to Altair4

Now to get on with enjoying TARA and all she has to offer :wink: :lol:
When all is said and done... at the end of the day... it gets dark ;)

Post Reply

Return to “Other networking topics”