Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSamba will not install in Debian-9 template, installs fine in AppVM #3714
Comments
andrewdavidwong
added
bug
C: Debian
labels
Mar 19, 2018
andrewdavidwong
added this to the Release 4.0 milestone
Mar 19, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
awokd
Mar 19, 2018
Temporarily add a NetVM to your template (with firewall set to deny all if you prefer) then try to install Samba again?
awokd
commented
Mar 19, 2018
|
Temporarily add a NetVM to your template (with firewall set to deny all if you prefer) then try to install Samba again? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 19, 2018
Member
Maybe adding a dummy interface will be enough:
ip link add d0 type dummy
ip addr add 192.168.0.1/24 dev d0
ip link set d0 up
Slightly more typing than just adding netvm, but this way you keep your template network disconnected.
|
Maybe adding a dummy interface will be enough:
Slightly more typing than just adding netvm, but this way you keep your template network disconnected. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Mar 19, 2018
Member
This isn't an issue, in that samba installs perfectly well and qubes based on the template will automatically start smbd as expected. (Unless you've followed the advice on installing services in Debian based Templates.)
The error relating to samba-ad-dc.service is expected, (and actually appeared in 3.2 as well). The log tells you to ignore this error.
The error re nmbd is also expected because the template doesn't have network interfaces. but it doesn't need them, because the template wont be running samba.
Samba installs correctly and is usable in template based qubes. What more is needed?
|
This isn't an issue, in that samba installs perfectly well and qubes based on the template will automatically start smbd as expected. (Unless you've followed the advice on installing services in Debian based Templates.) The error relating to samba-ad-dc.service is expected, (and actually appeared in 3.2 as well). The log tells you to ignore this error. Samba installs correctly and is usable in template based qubes. What more is needed? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 19, 2018
Member
Samba installs correctly and is usable in template based qubes. What more is needed?
Not really: dpkg: error processing package samba (--configure)
If that script would ignore service start error, then everything would be ok.
Not really: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Mar 19, 2018
Member
Let me rephrase - Samba installs correctly given that there is no network interface and works properly in template based qubes.
It really is a non issue. The post-install script error doesn't matter.
|
Let me rephrase - Samba installs correctly given that there is no network interface and works properly in template based qubes. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
h01ger
Mar 19, 2018
h01ger
commented
Mar 19, 2018
|
On Mon, Mar 19, 2018 at 06:55:11AM -0700, unman wrote:
Samba installs correctly and is usable in template based qubes. What more is needed?
dpkg is unhappy and will try to finish the installation of samba on
every apt/dpkg invocation:
quoting from the initial post to this issue:
`Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
[...]
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
…--
cheers,
Holger
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Mar 19, 2018
Member
But that's true for every package that tries to bind to a local interface: it isn't samba specific.
My point is that samba installs and is usable in a qube, where it matters.
If there's a perceived need to address the more general point then Debian templates will have to have some network interface provided. Or users accept the dpkg error as a consequence of the Qubes infrastructure.
|
But that's true for every package that tries to bind to a local interface: it isn't samba specific. If there's a perceived need to address the more general point then Debian templates will have to have some network interface provided. Or users accept the dpkg error as a consequence of the Qubes infrastructure. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
h01ger
Mar 19, 2018
h01ger
commented
Mar 19, 2018
|
On Mon, Mar 19, 2018 at 07:40:51AM -0700, unman wrote:
If there's a perceived need to address the more general point then Debian templates will have to have some network interface provided. Or users accept the dpkg error as a consequence of the Qubes infrastructure.
you are missing my point: the Debian samba package - according to Debian
standards - *must* install cleanly with or without network interface.
I'm involved in running https://piuparts.debian.org where some kinds of
such bugs (usually "fails to install in a chroot"...) are detected and
reported. Also see https://piuparts.debian.org/templates/mail/fails_to_install.mail
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859526 btw is very
similar to the problem in Qubes. I disagree that this is a "normal"
severity bug.
…--
cheers,
Holger
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Mar 19, 2018
Member
It's not a Qubes bug, and I don't believe it's samba specific, although I dont recall seeing this on apache install.
If you follow the advice in the docs then the pain is minimised on future apt use.
I'd pass it upstream and put something in the docs, as we did for service installation generally.
|
It's not a Qubes bug, and I don't believe it's samba specific, although I dont recall seeing this on apache install. I'd pass it upstream and put something in the docs, as we did for service installation generally. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
h01ger
Mar 19, 2018
h01ger
commented
Mar 19, 2018
|
Hi Devin,
I tried to reproduce your problem in a Debian-9 template but I can't:
user@debian-bla:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:... brd ff:ff:ff:ff:ff:ff
inet 10.137.../32 brd 10.255.255.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::.../64 scope link
valid_lft forever preferred_lft forever
user@debian-bla:~$ sudo apt install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
attr libaio1 libfile-copy-recursive-perl python-crypto python-dnspython python-ldb python-samba python-tdb samba-common samba-common-bin samba-dsdb-modules samba-vfs-modules tdb-tools
update-inetd
Suggested packages:
python-crypto-dbg python-crypto-doc python-gpgme bind9 bind9utils ctdb ldb-tools ntp | chrony smbldap-tools winbind ufw heimdal-clients
The following NEW packages will be installed:
attr libaio1 libfile-copy-recursive-perl python-crypto python-dnspython python-ldb python-samba python-tdb samba samba-common samba-common-bin samba-dsdb-modules samba-vfs-modules
tdb-tools update-inetd
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,291 kB of archives.
After this operation, 27.4 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security.debian.org stretch/updates/main amd64 python-samba amd64 2:4.5.12+dfsg-2+deb9u2 [1,362 kB]
Get:2 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 python-dnspython all 1.15.0-1 [102 kB]
Get:4 http://security.debian.org stretch/updates/main amd64 samba-common all 2:4.5.12+dfsg-2+deb9u2 [172 kB]
Get:3 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 python-crypto amd64 2.6.1-7 [259 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 python-ldb amd64 2:1.1.27-1+b1 [35.0 kB]
Get:6 http://security.debian.org stretch/updates/main amd64 samba-common-bin amd64 2:4.5.12+dfsg-2+deb9u2 [604 kB]
Get:7 http://security.debian.org stretch/updates/main amd64 samba amd64 2:4.5.12+dfsg-2+deb9u2 [933 kB]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 python-tdb amd64 1.3.11-2 [16.2 kB]
Get:10 http://security.debian.org stretch/updates/main amd64 samba-dsdb-modules amd64 2:4.5.12+dfsg-2+deb9u2 [328 kB]
Get:9 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 tdb-tools amd64 1.3.11-2 [26.5 kB]
Get:12 http://security.debian.org stretch/updates/main amd64 samba-vfs-modules amd64 2:4.5.12+dfsg-2+deb9u2 [359 kB]
Get:11 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libfile-copy-recursive-perl all 0.38-1 [20.6 kB]
Get:13 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 update-inetd all 4.44 [20.8 kB]
Get:14 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 attr amd64 1:2.4.47-2+b2 [43.6 kB]
Get:15 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libaio1 amd64 0.3.110-3 [9,412 B]
Fetched 4,291 kB in 3s (1,377 kB/s)
Preconfiguring packages ...
Selecting previously unselected package python-dnspython.
(Reading database ... 118171 files and directories currently installed.)
Preparing to unpack .../00-python-dnspython_1.15.0-1_all.deb ...
Unpacking python-dnspython (1.15.0-1) ...
Selecting previously unselected package python-crypto.
Preparing to unpack .../01-python-crypto_2.6.1-7_amd64.deb ...
Unpacking python-crypto (2.6.1-7) ...
Selecting previously unselected package python-ldb.
Preparing to unpack .../02-python-ldb_2%3a1.1.27-1+b1_amd64.deb ...
Unpacking python-ldb (2:1.1.27-1+b1) ...
Selecting previously unselected package python-tdb.
Preparing to unpack .../03-python-tdb_1.3.11-2_amd64.deb ...
Unpacking python-tdb (1.3.11-2) ...
Selecting previously unselected package python-samba.
Preparing to unpack .../04-python-samba_2%3a4.5.12+dfsg-2+deb9u2_amd64.deb ...
Unpacking python-samba (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package samba-common.
Preparing to unpack .../05-samba-common_2%3a4.5.12+dfsg-2+deb9u2_all.deb ...
Unpacking samba-common (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../06-samba-common-bin_2%3a4.5.12+dfsg-2+deb9u2_amd64.deb ...
Unpacking samba-common-bin (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package tdb-tools.
Preparing to unpack .../07-tdb-tools_1.3.11-2_amd64.deb ...
Unpacking tdb-tools (1.3.11-2) ...
Selecting previously unselected package libfile-copy-recursive-perl.
Preparing to unpack .../08-libfile-copy-recursive-perl_0.38-1_all.deb ...
Unpacking libfile-copy-recursive-perl (0.38-1) ...
Selecting previously unselected package update-inetd.
Preparing to unpack .../09-update-inetd_4.44_all.deb ...
Unpacking update-inetd (4.44) ...
Selecting previously unselected package samba.
Preparing to unpack .../10-samba_2%3a4.5.12+dfsg-2+deb9u2_amd64.deb ...
Unpacking samba (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package attr.
Preparing to unpack .../11-attr_1%3a2.4.47-2+b2_amd64.deb ...
Unpacking attr (1:2.4.47-2+b2) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../12-libaio1_0.3.110-3_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-3) ...
Selecting previously unselected package samba-dsdb-modules.
Preparing to unpack .../13-samba-dsdb-modules_2%3a4.5.12+dfsg-2+deb9u2_amd64.deb ...
Unpacking samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u2) ...
Selecting previously unselected package samba-vfs-modules.
Preparing to unpack .../14-samba-vfs-modules_2%3a4.5.12+dfsg-2+deb9u2_amd64.deb ...
Unpacking samba-vfs-modules (2:4.5.12+dfsg-2+deb9u2) ...
Setting up python-dnspython (1.15.0-1) ...
Setting up python-crypto (2.6.1-7) ...
Setting up python-tdb (1.3.11-2) ...
Setting up samba-common (2:4.5.12+dfsg-2+deb9u2) ...
Creating config file /etc/samba/smb.conf with new version
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libaio1:amd64 (0.3.110-3) ...
Processing triggers for systemd (232-25+deb9u2) ...
Setting up tdb-tools (1.3.11-2) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Processing triggers for man-db (2.7.6.1-2) ...
Setting up samba-dsdb-modules (2:4.5.12+dfsg-2+deb9u2) ...
Setting up attr (1:2.4.47-2+b2) ...
Setting up libfile-copy-recursive-perl (0.38-1) ...
Setting up python-ldb (2:1.1.27-1+b1) ...
Setting up update-inetd (4.44) ...
Setting up samba-vfs-modules (2:4.5.12+dfsg-2+deb9u2) ...
Setting up python-samba (2:4.5.12+dfsg-2+deb9u2) ...
Setting up samba-common-bin (2:4.5.12+dfsg-2+deb9u2) ...
Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
Adding group `sambashare' (GID 125) ...
Done.
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 samba-ad-dc-service.
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.
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u2) ...
user@debian-bla:~$
…--
cheers,
Holger
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
marmarek
Mar 19, 2018
Member
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:... brd ff:ff:ff:ff:ff:ff inet 10.137.../32 brd 10.255.255.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::.../64 scope link valid_lft forever preferred_lft forever
You do have IPv4-enabled interface here. On Qubes 4.0, templates have netvm=none by default.
You do have IPv4-enabled interface here. On Qubes 4.0, templates have netvm=none by default. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Mar 19, 2018
Member
Yes, it's in Qubes 4.0 as OP said, and perhaps it is samba specific.
I've just installed a host of services (telnet,ftp,ssh, postfix, pop3, apache, etc), and it's only samba that throws an error.
I continue to think it' s an upstream bug, and we should close this with a note in the docs.
|
Yes, it's in Qubes 4.0 as OP said, and perhaps it is samba specific. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
h01ger
Mar 19, 2018
h01ger
commented
Mar 19, 2018
|
On Mon, Mar 19, 2018 at 03:54:15PM +0000, Marek Marczykowski-Górecki wrote:
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:... brd ff:ff:ff:ff:ff:ff inet 10.137.../32 brd 10.255.255.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::.../64 scope link valid_lft forever preferred_lft forever
You do have IPv4-enabled interface here. On Qubes 4.0, templates have netvm=none by default.
ah. i should have saved the mail i had already written for the debian
bug and then deleted because I coudlnt reproduce it… :/
…--
cheers,
Holger
|
andrewdavidwong
added
C: doc
task
and removed
bug
labels
Mar 20, 2018
andrewdavidwong
modified the milestones:
Release 4.0,
Documentation/website
Mar 20, 2018
andrewdavidwong
added
the
help wanted
label
Mar 20, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
dtto
commented
Mar 20, 2018
|
Yes, that's an easy fix which works. Thanks! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
dtto
Mar 20, 2018
Sorry, I responded to the first response here but didn't refresh so I missed all the comments.
I don't know why it doesn't reproduce for you, @h01ger. All I can say is that it was a clean install and the error message popped up. The fix suggested by @marmarek worked (temporarily enabling the network interface). I guess maybe it was just a weird one-off thing on my machine though I don't know what would cause it.
It was annoying though because every time I ran apt it would try to configure samba and fail, with a significant delay while it was trying to configure. But if no one else is having this issue, then no need to work on it further.
dtto
commented
Mar 20, 2018
|
Sorry, I responded to the first response here but didn't refresh so I missed all the comments. I don't know why it doesn't reproduce for you, @h01ger. All I can say is that it was a clean install and the error message popped up. The fix suggested by @marmarek worked (temporarily enabling the network interface). I guess maybe it was just a weird one-off thing on my machine though I don't know what would cause it. It was annoying though because every time I ran apt it would try to configure samba and fail, with a significant delay while it was trying to configure. But if no one else is having this issue, then no need to work on it further. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
unman
Mar 22, 2018
Member
I've raised a bug against the Debian package - couldn't see that @h01ger had done so.
Also referenced this issue on the Debian templates page, with note to workaround.
Can we close?
|
I've raised a bug against the Debian package - couldn't see that @h01ger had done so. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
dtto
commented
Mar 22, 2018
|
Fine by me. |
dtto commentedMar 19, 2018
Qubes OS version:
R4.0
Affected component(s):
Samba
Steps to reproduce the behavior:
On a new Q4.0 install, attempt to install samba on the debian-9 template-vm.
Note that installing will work on an AppVM using the Debian-9 template.
Expected behavior:
Samba installs
Actual behavior:
`Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
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
Job for nmbd.service failed because a timeout was exceeded.
See "systemctl status nmbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nmbd, action "start" failed.
● nmbd.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Sun 2018-03-18 11:58:08 PDT; 9ms ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Process: 8503 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=killed, signal=TERM)
Main PID: 8503 (code=killed, signal=TERM)
Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."
Mar 18 11:56:38 debian-9 systemd[1]: Starting Samba NMB Daemon...
Mar 18 11:58:08 debian-9 systemd[1]: nmbd.service: Start operation timed ou…ing.
Mar 18 11:58:08 debian-9 systemd[1]: Failed to start Samba NMB Daemon.
Mar 18 11:58:08 debian-9 systemd[1]: nmbd.service: Unit entered failed state.
Mar 18 11:58:08 debian-9 systemd[1]: nmbd.service: Failed with result 'timeout'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
`
General notes:
I tried manually unmasking Samba. This results in the installer masking it and then the same error.
I believe this has to do with the lack of networking on the template vms.
Also, I did not have this issue on R3.2.
Related issues: