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.
Ubuntu Service samba is masked and can't start
linux;ubuntu
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 readingLiang Guo (2014-03-06).  /etc/init.d/samba forbit systemd shutdown system.  740942.  Debian bugs.Mask /etc/init.d/samba init script for systemd.  Ivo De Decker.  2014-10-24.  Ivo De Decker (2014-10-24).  samba init script should not be started after upgrade.  766690.  Debian bugs.Ivo De Decker (2014-11-15). samba: unit samba.service is masked.  769714.  Debian bugs.Wulf C. Krueger (2010).  samba.target