Ubuntu Service samba is masked and can’t start

i’m trying to run samba service on Ubuntu server and it gives me erros and says its masked and dead, how do i fix that ? what does cause it to be like this?

Here is the error i get:-

Failed to start samba.service: Unit samba.service is masked.
If I’m running the Ubuntu server on Virtual box, would that be the issue? thanks.

enter image description here

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

This is not a bug.

What you describe is intentional on the parts of the Debian people.

You are not supposed to control samba services this way on a Debian/Ubuntu systemd operating system. You are supposed to manipulate the smbd, nmbd, and samba-ad-dc services as needed.

There is no umbrella samba.target to do the original job of the old Debian/Ubuntu samba van Smoorenburg rc script; which was starting/stopping these three en bloc. Other people created them, for other systemd operating systems. The Debian people did not.

So where you read Debian/Ubuntu doco saying things like

service samba action

remember that that is not an available thing any more, now that Debian Linux and Ubuntu Linux are systemd operating systems.

Just to add to the confusion …

What the rest of the world outwith Debian knows as samba.service is called samba-ad-dc.service in the Debian world. Similarly, nmbd.service and smbd.service are originally nmb.service and smb.service outwith Debian.

So where you read generic systemd operating system doco about samba talking about nmb, smb, and samba services, you must mentally perform the translation for Debian/Ubuntu, particularly for the latter name.

Further reading


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x