Web lists-archives.com

Re: Setting up samba (2:4.5.12+dfsg-2+deb9u4) ... Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.




On 12/2/18 11:39 PM, john doe wrote:
On 12/2/2018 9:27 PM, David Christensen wrote:
debian-user:

I have a Debian 9 machine with Samba:

2018-12-02 12:14:24 dpchrist@dipsy ~
$ cat /etc/debian_version
9.6

2018-12-02 12:14:29 dpchrist@dipsy ~
$ uname -a
Linux dipsy 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64
GNU/Linux


I updated and upgraded it today:

2018-12-02 11:55:44 root@dipsy ~
# apt-get update
...

Setting up samba (2:4.5.12+dfsg-2+deb9u4) ...
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 director...

I don't know what the second line means, but suspect systemd is
complaining (?).  I assume the third line is a consequence of the second.
...

Then I rebooted and looked for Samba:

2018-12-02 12:04:07 root@dipsy ~
# service samba status
* samba.service
    Loaded: masked (/dev/null; bad)
    Active: inactive (dead)
...

If you don't use a DC(nmbd.service) you should check the status of
'smbd' and not 'samba'.

$ systemctl status smbd

2018-12-03 20:48:52 root@dipsy ~
# service smbd status
* smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-12-03 12:01:03 PST; 8h ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 901 (smbd)
   Status: "smbd: ready to serve connections..."
    Tasks: 8 (limit: 4915)
   CGroup: /system.slice/smbd.service
           |- 901 /usr/sbin/smbd
           |- 902 /usr/sbin/smbd
           |- 903 /usr/sbin/smbd
           |- 907 /usr/sbin/smbd
           |-2199 /usr/sbin/smbd
           |-2529 /usr/sbin/smbd
           |-2538 /usr/sbin/smbd
           `-3150 /usr/sbin/smbd

Dec 03 15:25:00 dipsy smbd[2530]: pam_unix(samba:session): session opened for user dpchrist by (uid=0) Dec 03 15:25:28 dipsy smbd[2530]: pam_unix(samba:session): session closed for user dpchrist Dec 03 15:28:53 dipsy smbd[2536]: pam_unix(samba:session): session opened for user dpchrist by (uid=0) Dec 03 15:29:03 dipsy smbd[2537]: pam_unix(samba:session): session closed for user nobody Dec 03 15:29:10 dipsy smbd[2536]: pam_unix(samba:session): session closed for user dpchrist Dec 03 15:29:10 dipsy smbd[2538]: pam_unix(samba:session): session opened for user dpchrist by (uid=0) Dec 03 15:29:10 dipsy smbd[2539]: pam_unix(samba:session): session opened for user dpchrist by (uid=0) Dec 03 15:29:34 dipsy smbd[2539]: pam_unix(samba:session): session closed for user dpchrist Dec 03 17:25:03 dipsy smbd[2860]: pam_unix(samba:session): session closed for user nobody Dec 03 18:47:24 dipsy smbd[3150]: pam_unix(samba:session): session opened for user dpchrist by (uid=0)


Yes, that looks better.


> If you still want to use samba.service you could try:
>
> $ cd /lib/systemd/system && ln -sf smbd.service samba.service
>
> I don't know if the above command has side effects though.

It would be nice if the package name and service name matched, but "service smbd status" works and I don't know systemd, so I will leave it alone.


On 12/2/18 11:49 PM, john doe wrote:
> Correction, 'ad-dc' is controled by the 'samba-ad-dc.service' and not
> by the nmbd.service.

Ok.


But what do the error messages mean?

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 director


Should I file a bug report against the samba package?


David