Score:0

Strange Samba Install Error

wf flag
Jin

I'm getting this out of the command line when installing Samba on Ubuntu Server:

Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service
Please ignore the following error about deb-systemd-helper not finding those services.
(samba-ad-dc.service masked)
Created symlink /etc/systemd/system/multi-user.target.wants/nmbd.service → /lib/systemd/system/nmbd.service.
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service.
samba-ad-dc.service is a disabled or a static unit, not starting it.

I'm looking to setup a fileserver for my home network that has windows and Macs. What does it mean? What is causing it? Most importantly, how can I fix it?

guiverc avatar
cn flag
Ubuntu 21.10 (along with all flavors) is *End-of-Life* and thus unsupported on this site (https://askubuntu.com/help/on-topic), and many other Ubuntu sites, unless your question is specific to moving to a supported release of Ubuntu. https://fridge.ubuntu.com/2022/07/19/ubuntu-21-10-impish-indri-end-of-life-reached-on-july-14-2022/
ru flag
@guiverc this Samba output applies to 22.04 and later as well, and is only *tagged* as 21.10. In this case it can simply be considered "generic" and the tag removed (because the question itself is *not* 21.10 specific, this output happens in 22.04 as well and is confusing)
ru flag
I do agree with guiverc though, upgrade to 22.04 or a supported release. Be aware that the answer I wrote still applies, because it's a direct quote of the error message and interpretation therein.
guiverc avatar
cn flag
Sorry I just realized I misread the `rmadison` output; I now concur it's likely *jammy* @ThomasWard To Jin, Ubuntu releases are *year.month* in format, 21.10 means it was the 2021-October release (a non-LTS; 2000 is added to year in the *year.month* format) which is now EOL. I'd check your actual system, it maybe using Ubuntu 22.04 LTS. If using an EOL system, you don't want it sharing data, don't want it online etc... esp. if you value security.
ru flag
@guiverc no worries, this error pops up in Samba 22.04 and later so it's not a new error by any means. There's extra output in their command line that throws the confusion in and is not relevant so I removed it. One of the *rare* cases a question that was tagged 21.10 is in fact a very generic one and the tags are misleading.
Score:1
ru flag

In this case, simply reading the output, these two lines specifically, will explain everything:

Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service
Please ignore the following error about deb-systemd-helper not finding those services.
(samba-ad-dc.service masked)

What it's saying is that Samba can take the place of a Windows Active Directory Domain Controller if properly configured that way. However, it is not being run in that mode. Therefore, it indicates that you see "error" because the service is masked is as designed - you aren't running samba-ad-dc service (Active Directory Domain Controller). Therefore, the errors you are seeing from deb-systemd-helper about being unable to set things on a masked service is normal and not actually an error.

You've installed Samba, now configure it for filesharing. No other action required because these "errors" you see are false positives if you read the first two lines of your output saying "ignore the following errors".

Jin avatar
wf flag
Jin
Thank you very much. I'm new to this so I was unsure of what part of the error I should ignore. When would you need to run samba-ad-dc.service? Is it at all applicable in my use case?
ru flag
@Jin It is *not* necessary to run `samba-ad-dc` for your use case of a simple Samba file share system. A domain controller would be set up if you want to have integrated LDAP, filesharing, login services, etc. in a Windows-like environment where it uses Samba, LDAP, etc. integrated to manage an entire domain (you may want to look up "What is an Active Directory Domain Controller" on the internet if you are interested in learning what a domain controller does.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.