sudo apt install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libv8-3.14.5
Use 'sudo apt autoremove' to remove it.
Suggested packages:
bind9 bind9utils ctdb ldb-tools ntp smbldap-tools winbind ufw
The following NEW packages will be installed
samba
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/840 kB of archives.
After this operation, 11.3 MB of additional disk space will be used.
Selecting previously unselected package samba.
(Reading database ... 367248 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.4.5+dfsg-2ubuntu5_amd64.deb ...
Unpacking samba (2:4.4.5+dfsg-2ubuntu5) ...
Processing triggers for libc-bin (2.24-3ubuntu1) ...
Processing triggers for systemd (231-9git1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up samba (2:4.4.5+dfsg-2ubuntu5) ...
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 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 Wed 2016-10-26 14:41:33 CET; 3ms ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 7791
Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."
Tasks: 1 (limit: 4915)
CGroup: /system.slice/nmbd.service
Oct 26 14:40:03 ameurux-pc systemd[1]: Starting Samba NMB Daemon...
Oct 26 14:40:03 ameurux-pc systemd[1]: nmbd.service: Supervising process 7791 which is not our ...its.
Oct 26 14:41:33 ameurux-pc systemd[1]: nmbd.service: Start operation timed out. Terminating.
Oct 26 14:41:33 ameurux-pc systemd[1]: nmbd.service: Killing process 7791 (nmbd) with signal SIGKILL.
Oct 26 14:41:33 ameurux-pc systemd[1]: Failed to start Samba NMB Daemon.
Oct 26 14:41:33 ameurux-pc systemd[1]: nmbd.service: Unit entered failed state.
Oct 26 14:41:33 ameurux-pc 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
Processing triggers for libc-bin (2.24-3ubuntu1) ...
Processing triggers for systemd (231-9git1) ...
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)