Was having this issue initially on fresh install of 16.04LTS and reported that version. Last night I upgraded to 17.04 without Samba installed. After reboot I tried installing Samba and got the same stop error again. udo apt-get install samba Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: linux-image-4.4.0-83-generic linux-image-extra-4.4.0-83-generic Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: attr libaio1 libboost-random1.62.0 libcephfs1 python-dnspython samba-dsdb-modules samba-vfs-modules tdb-tools Suggested packages: bind9 bind9utils ctdb ldb-tools ntp | chrony smbldap-tools winbind The following NEW packages will be installed: attr libaio1 libboost-random1.62.0 libcephfs1 python-dnspython samba samba-dsdb-modules samba-vfs-modules tdb-tools 0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. Need to get 3,325 kB/3,351 kB of archives. After this operation, 21.0 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 python-dnspython all 1.15.0-1 [84.9 kB] Get:2 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 tdb-tools amd64 1.3.11-2 [21.4 kB] Get:3 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 samba amd64 2:4.5.8+dfsg-0ubuntu0.17.04.3 [836 kB] Get:4 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libaio1 amd64 0.3.110-3 [6,382 B] Get:5 http://us.archive.ubuntu.com/ubuntu zesty/main amd64 libboost-random1.62.0 amd64 1.62.0+dfsg-4 [11.1 kB] Get:6 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 libcephfs1 amd64 10.2.7-0ubuntu0.17.04.1 [1,862 kB] Get:7 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 samba-dsdb-modules amd64 2:4.5.8+dfsg-0ubuntu0.17.04.3 [232 kB] Get:8 http://us.archive.ubuntu.com/ubuntu zesty-updates/main amd64 samba-vfs-modules amd64 2:4.5.8+dfsg-0ubuntu0.17.04.3 [272 kB] Fetched 3,325 kB in 1s (2,707 kB/s) Selecting previously unselected package python-dnspython. (Reading database ... 258898 files and directories currently installed.) Preparing to unpack .../0-python-dnspython_1.15.0-1_all.deb ... Unpacking python-dnspython (1.15.0-1) ... Selecting previously unselected package tdb-tools. Preparing to unpack .../1-tdb-tools_1.3.11-2_amd64.deb ... Unpacking tdb-tools (1.3.11-2) ... Selecting previously unselected package samba. Preparing to unpack .../2-samba_2%3a4.5.8+dfsg-0ubuntu0.17.04.3_amd64.deb ... Unpacking samba (2:4.5.8+dfsg-0ubuntu0.17.04.3) ... Selecting previously unselected package attr. Preparing to unpack .../3-attr_1%3a2.4.47-2_amd64.deb ... Unpacking attr (1:2.4.47-2) ... Selecting previously unselected package libaio1:amd64. Preparing to unpack .../4-libaio1_0.3.110-3_amd64.deb ... Unpacking libaio1:amd64 (0.3.110-3) ... Selecting previously unselected package libboost-random1.62.0:amd64. Preparing to unpack .../5-libboost-random1.62.0_1.62.0+dfsg-4_amd64.deb ... Unpacking libboost-random1.62.0:amd64 (1.62.0+dfsg-4) ... Selecting previously unselected package libcephfs1. Preparing to unpack .../6-libcephfs1_10.2.7-0ubuntu0.17.04.1_amd64.deb ... Unpacking libcephfs1 (10.2.7-0ubuntu0.17.04.1) ... Selecting previously unselected package samba-dsdb-modules. Preparing to unpack .../7-samba-dsdb-modules_2%3a4.5.8+dfsg-0ubuntu0.17.04.3_amd64.deb ... Unpacking samba-dsdb-modules (2:4.5.8+dfsg-0ubuntu0.17.04.3) ... Selecting previously unselected package samba-vfs-modules. Preparing to unpack .../8-samba-vfs-modules_2%3a4.5.8+dfsg-0ubuntu0.17.04.3_amd64.deb ... Unpacking samba-vfs-modules (2:4.5.8+dfsg-0ubuntu0.17.04.3) ... Setting up python-dnspython (1.15.0-1) ... Processing triggers for ufw (0.35-4) ... Processing triggers for ureadahead (0.100.0-19) ... ureadahead will be reprofiled on next reboot Setting up libboost-random1.62.0:amd64 (1.62.0+dfsg-4) ... Processing triggers for libc-bin (2.24-9ubuntu2.2) ... Setting up libaio1:amd64 (0.3.110-3) ... Processing triggers for systemd (232-21ubuntu5) ... 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 (2:4.5.8+dfsg-0ubuntu0.17.04.3) ... 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. Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details. invoke-rc.d: initscript smbd, action "start" failed. ● smbd.service - Samba SMB Daemon Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2017-07-12 08:27:46 PDT; 10ms ago Docs: man:smbd(8) man:samba(7) man:smb.conf(5) Process: 6897 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE) Main PID: 6897 (code=exited, status=1/FAILURE) Jul 12 08:27:46 dave-P5K-Deluxe systemd[1]: Starting Samba SMB Daemon... Jul 12 08:27:46 dave-P5K-Deluxe systemd[1]: smbd.service: Main process exite…URE Jul 12 08:27:46 dave-P5K-Deluxe systemd[1]: Failed to start Samba SMB Daemon. Jul 12 08:27:46 dave-P5K-Deluxe systemd[1]: smbd.service: Unit entered faile…te. Jul 12 08:27:46 dave-P5K-Deluxe systemd[1]: smbd.service: Failed with result…e'. 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 Setting up libcephfs1 (10.2.7-0ubuntu0.17.04.1) ... Setting up samba-dsdb-modules (2:4.5.8+dfsg-0ubuntu0.17.04.3) ... Setting up attr (1:2.4.47-2) ... Setting up samba-vfs-modules (2:4.5.8+dfsg-0ubuntu0.17.04.3) ... Processing triggers for libc-bin (2.24-9ubuntu2.2) ... Processing triggers for systemd (232-21ubuntu5) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for ufw (0.35-4) ... Errors were encountered while processing: samba E: Sub-process /usr/bin/dpkg returned an error code (1)