[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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/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
> Ign:1 http://approx:9999/debian stretch InRelease
> Get:2 http://approx:9999/security stretch/updates InRelease [94.3 kB]
> Get:3 http://approx:9999/debian stretch-updates InRelease [91.0 kB]
> Hit:4 http://approx:9999/debian stretch Release
> Get:6 http://approx:9999/security stretch/updates/main Sources [186 kB]
> Get:7 http://approx:9999/security stretch/updates/main amd64 Packages
> [460 kB]
> Fetched 831 kB in 3s (237 kB/s)
> Reading package lists... Done
> 
> 2018-12-02 11:55:52 root@dipsy ~
> # apt-get upgrade
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Calculating upgrade... Done
> The following packages will be upgraded:
>   ghostscript libgs9 libgs9-common libperl5.24 libsmbclient libssl1.1
> libtiff5
>   libwbclient0 openssl perl perl-base perl-doc perl-modules-5.24
> python-samba
>   samba samba-common samba-common-bin samba-dsdb-modules samba-libs
>   samba-vfs-modules
> 20 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Need to get 34.0 MB of archives.
> After this operation, 144 kB of additional disk space will be used.
> Do you want to continue? [Y/n]
> Get:1 http://approx:9999/security stretch/updates/main amd64 libperl5.24
> amd64 5.24.1-3+deb9u5 [3501 kB]
> Get:2 http://approx:9999/security stretch/updates/main amd64 perl amd64
> 5.24.1-3+deb9u5 [219 kB]
> Get:3 http://approx:9999/security stretch/updates/main amd64 perl-base
> amd64 5.24.1-3+deb9u5 [1345 kB]
> Get:4 http://approx:9999/security stretch/updates/main amd64
> perl-modules-5.24 all 5.24.1-3+deb9u5 [2722 kB]
> Get:5 http://approx:9999/security stretch/updates/main amd64
> samba-vfs-modules amd64 2:4.5.12+dfsg-2+deb9u4 [359 kB]
> Get:6 http://approx:9999/security stretch/updates/main amd64
> samba-dsdb-modules amd64 2:4.5.12+dfsg-2+deb9u4 [329 kB]
> Get:7 http://approx:9999/security stretch/updates/main amd64
> python-samba amd64 2:4.5.12+dfsg-2+deb9u4 [1360 kB]
> Get:8 http://approx:9999/security stretch/updates/main amd64
> libsmbclient amd64 2:4.5.12+dfsg-2+deb9u4 [151 kB]
> Get:9 http://approx:9999/security stretch/updates/main amd64 samba-libs
> amd64 2:4.5.12+dfsg-2+deb9u4 [5208 kB]
> Get:10 http://approx:9999/security stretch/updates/main amd64
> libwbclient0 amd64 2:4.5.12+dfsg-2+deb9u4 [124 kB]
> Get:11 http://approx:9999/security stretch/updates/main amd64 samba
> amd64 2:4.5.12+dfsg-2+deb9u4 [933 kB]
> Get:12 http://approx:9999/security stretch/updates/main amd64
> samba-common-bin amd64 2:4.5.12+dfsg-2+deb9u4 [604 kB]
> Get:13 http://approx:9999/security stretch/updates/main amd64
> samba-common all 2:4.5.12+dfsg-2+deb9u4 [172 kB]
> Get:14 http://approx:9999/security stretch/updates/main amd64 libssl1.1
> amd64 1.1.0j-1~deb9u1 [1354 kB]
> Get:15 http://approx:9999/security stretch/updates/main amd64 libtiff5
> amd64 4.0.8-2+deb9u4 [238 kB]
> Get:16 http://approx:9999/security stretch/updates/main amd64
> ghostscript amd64 9.26~dfsg-0+deb9u1 [98.6 kB]
> Get:17 http://approx:9999/security stretch/updates/main amd64 libgs9
> amd64 9.26~dfsg-0+deb9u1 [2207 kB]
> Get:18 http://approx:9999/security stretch/updates/main amd64
> libgs9-common all 9.26~dfsg-0+deb9u1 [5140 kB]
> Get:19 http://approx:9999/security stretch/updates/main amd64 openssl
> amd64 1.1.0j-1~deb9u1 [746 kB]
> Get:20 http://approx:9999/security stretch/updates/main amd64 perl-doc
> all 5.24.1-3+deb9u5 [7146 kB]
> Fetched 34.0 MB in 28s (1180 kB/s)
> Reading changelogs... Done
> Preconfiguring packages ...
> (Reading database ... 103653 files and directories currently installed.)
> Preparing to unpack .../libperl5.24_5.24.1-3+deb9u5_amd64.deb ...
> Unpacking libperl5.24:amd64 (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ...
> Preparing to unpack .../perl_5.24.1-3+deb9u5_amd64.deb ...
> Unpacking perl (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ...
> Preparing to unpack .../perl-base_5.24.1-3+deb9u5_amd64.deb ...
> Unpacking perl-base (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ...
> Setting up perl-base (5.24.1-3+deb9u5) ...
> (Reading database ... 103653 files and directories currently installed.)
> Preparing to unpack .../00-perl-modules-5.24_5.24.1-3+deb9u5_all.deb ...
> Unpacking perl-modules-5.24 (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ...
> Preparing to unpack
> .../01-samba-vfs-modules_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking samba-vfs-modules (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack
> .../02-samba-dsdb-modules_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack
> .../03-python-samba_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking python-samba (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack
> .../04-libsmbclient_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking libsmbclient:amd64 (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack .../05-samba-libs_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb
> ...
> Unpacking samba-libs:amd64 (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack
> .../06-libwbclient0_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking libwbclient0:amd64 (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack .../07-samba_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking samba (2:4.5.12+dfsg-2+deb9u4) over (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack
> .../08-samba-common-bin_2%3a4.5.12+dfsg-2+deb9u4_amd64.deb ...
> Unpacking samba-common-bin (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack .../09-samba-common_2%3a4.5.12+dfsg-2+deb9u4_all.deb
> ...
> Unpacking samba-common (2:4.5.12+dfsg-2+deb9u4) over
> (2:4.5.12+dfsg-2+deb9u3) ...
> Preparing to unpack .../10-libssl1.1_1.1.0j-1~deb9u1_amd64.deb ...
> Unpacking libssl1.1:amd64 (1.1.0j-1~deb9u1) over (1.1.0f-3+deb9u2) ...
> Preparing to unpack .../11-libtiff5_4.0.8-2+deb9u4_amd64.deb ...
> Unpacking libtiff5:amd64 (4.0.8-2+deb9u4) over (4.0.8-2+deb9u2) ...
> Preparing to unpack .../12-ghostscript_9.26~dfsg-0+deb9u1_amd64.deb ...
> Unpacking ghostscript (9.26~dfsg-0+deb9u1) over (9.25~dfsg-0+deb9u1) ...
> Preparing to unpack .../13-libgs9_9.26~dfsg-0+deb9u1_amd64.deb ...
> Unpacking libgs9:amd64 (9.26~dfsg-0+deb9u1) over (9.25~dfsg-0+deb9u1) ...
> Preparing to unpack .../14-libgs9-common_9.26~dfsg-0+deb9u1_all.deb ...
> Unpacking libgs9-common (9.26~dfsg-0+deb9u1) over (9.25~dfsg-0+deb9u1) ...
> Preparing to unpack .../15-openssl_1.1.0j-1~deb9u1_amd64.deb ...
> Unpacking openssl (1.1.0j-1~deb9u1) over (1.1.0f-3+deb9u2) ...
> Preparing to unpack .../16-perl-doc_5.24.1-3+deb9u5_all.deb ...
> Leaving 'diversion of /usr/bin/perldoc to /usr/bin/perldoc.stub by
> perl-doc'
> Unpacking perl-doc (5.24.1-3+deb9u5) over (5.24.1-3+deb9u4) ...
> Setting up libgs9-common (9.26~dfsg-0+deb9u1) ...
> Setting up perl-modules-5.24 (5.24.1-3+deb9u5) ...
> Setting up libperl5.24:amd64 (5.24.1-3+deb9u5) ...
> Setting up libwbclient0:amd64 (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up samba-libs:amd64 (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up samba-vfs-modules (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up python-samba (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up samba-common (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up libtiff5:amd64 (4.0.8-2+deb9u4) ...
> Setting up libsmbclient:amd64 (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up perl (5.24.1-3+deb9u5) ...
> Processing triggers for libc-bin (2.24-11+deb9u3) ...
> Setting up libssl1.1:amd64 (1.1.0j-1~deb9u1) ...
> Processing triggers for systemd (232-25+deb9u6) ...
> Setting up openssl (1.1.0j-1~deb9u1) ...
> Processing triggers for man-db (2.7.6.1-2) ...
> Setting up samba-common-bin (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up libgs9:amd64 (9.26~dfsg-0+deb9u1) ...
> Setting up samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u4) ...
> Setting up perl-doc (5.24.1-3+deb9u5) ...
> Setting up ghostscript (9.26~dfsg-0+deb9u1) ...
> 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 directory
> Processing triggers for libc-bin (2.24-11+deb9u3) ...
> 
> 
> Note the Samba messages near the end:
> 
> 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 directory
> 
> 
> 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.
> 
> 
> I tried another upgrade to see what happens:
> 
> 2018-12-02 11:57:25 root@dipsy ~
> # apt-get upgrade
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Calculating upgrade... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 
> 
> Looks okay...
> 
> 
> 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)
> 
> 
> Not encouraging...
> 
> 
> Then I tried connecting to Samba from a client machine, and the
> connection worked.  So, Samba is running even though systemd thinks it
> is not (?).
> 
> 
> I update and upgrade weekly (or more often, if a critical security
> update is announced), and do not recall seeing any problems a week ago.
> So, this issue was introduced sometime during the past week.
> 
> 
> STFW I don't see a recent, relevant hit.
> 
> 
> Does anyone know what is going on?
> 

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

$ systemctl status smbd


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.

-- 
John Doe


Reply to: