Cannot connect to osmc share from windows 10, the user name or password is incorrect System error 1326

Hi all,

as per subject line cannot connect to osmc share from windows 10, the user name or password is incorrect System error 1326

I have enabled SMB 1 in Windows months ago and this has been working up until yesterday, now all I get is incorrect username and password. I can SSH into my Rapsberry PI and have reset the password, rebooted both, also ran apt-get distro-upgrade on the PI and Windows updates (18363:778)

I have looked for answers for a day now and cannot find anything that helps me.

If anyone can assist that would be great! I have plenty of free time :slight_smile:

Well would have been helpful if you sould have provided the logs from OSMC via grab-logs -A, anyhow you can try:

Either from Win10 cmd net use * /del and then net use \\<IP of OSMC>\osmc /user:osmc
Or Start > Control Panel > User Accounts > Credential Manager to clear all OSMC records.

1 Like

Hi fzinken

Thank you for your help

I have run grab-logs Logs available at https://paste.osmc.tv/canuqavezu. I never knew that was a command.
C:\Users\Stuart>net use * /del
There are no entries in the list.

C:\Users\Stuart>net use \192.168.1.7\osmc /user:osmc
System error 53 has occurred.

The network path was not found.

C:\Users\Stuart>net use \osmc-lounge
The password or user name is invalid for \osmc-lounge.

Enter the user name for ‘osmc-lounge’: osmc
Enter the password for osmc-lounge:
System error 1326 has occurred.

The user name or password is incorrect.

C:\Users\Stuart>ping -a 192.168.1.7

Pinging OSMC-LOUNGE [192.168.1.7] with 32 bytes of data:
Reply from 192.168.1.7: bytes=32 time=3ms TTL=64
Reply from 192.168.1.7: bytes=32 time=6ms TTL=64
Reply from 192.168.1.7: bytes=32 time=8ms TTL=64
Reply from 192.168.1.7: bytes=32 time=6ms TTL=64

Ping statistics for 192.168.1.7:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 8ms, Average = 5ms

C:\Users\Stuart>

the net use commands all had double slashes, already cleared all creds in credential manager

Well looks like your samba server has problems.>

Apr 30 17:11:14 osmc-lounge systemd[1]: Starting Samba SMB Daemon...
Apr 30 17:11:14 osmc-lounge smbd[672]: [2020/04/30 17:11:14.803657,  0] ../source3/param/loadparm.c:2305(lp_include)
Apr 30 17:11:14 osmc-lounge smbd[672]:   Error: Maximum include depth (100) exceeded!
Apr 30 17:11:14 osmc-lounge systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 17:11:14 osmc-lounge systemd[1]: Failed to start Samba SMB Daemon.
Apr 30 17:11:14 osmc-lounge systemd[1]: smbd.service: Unit entered failed state.
Apr 30 17:11:14 osmc-lounge systemd[1]: smbd.service: Failed with result 'exit-code'.
Apr 30 17:11:14 osmc-lounge samba.distributed[387]: Starting smbd (via systemctl): smbd.serviceJob for smbd.service failed because the control process exited with error code.
Apr 30 17:11:14 osmc-lounge samba.distributed[387]: See "systemctl status smbd.service" and "journalctl -xe" for details.
Apr 30 17:11:14 osmc-lounge samba.distributed[387]:  failed!
Apr 30 17:11:14 osmc-lounge systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 17:11:14 osmc-lounge systemd[1]: Failed to start Samba Server.
Apr 30 17:11:14 osmc-lounge systemd[1]: samba.service: Unit entered failed state.
Apr 30 17:11:14 osmc-lounge systemd[1]: samba.service: Failed with result 'exit-code'.

Suggest to login via ssh and check
sudo systemctl samba status

Unknown operation samba. No idea why it would just stop though.

Sorry typo sudo systemctl status samba

osmc@osmc-lounge:~$ sudo systemctl status samba

  • samba.service - Samba Server
    Loaded: loaded (/lib/systemd/system/samba.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Thu 2020-04-30 17:11:14 ACST; 2h 18min ago
    Process: 387 ExecStart=/etc/init.d/samba.distributed start (code=exited, status=1/FAILURE)
    Main PID: 387 (code=exited, status=1/FAILURE)

Apr 30 17:10:44 osmc-lounge systemd[1]: Starting Samba Server…
Apr 30 17:11:14 osmc-lounge samba.distributed[387]: Starting nmbd (via systemctl): nmbd.service.
Apr 30 17:11:14 osmc-lounge samba.distributed[387]: Starting smbd (via systemctl): smbd.serviceJob for smbd.service failed because the control process exited with error code.
Apr 30 17:11:14 osmc-lounge samba.distributed[387]: See “systemctl status smbd.service” and “journalctl -xe” for details.
Apr 30 17:11:14 osmc-lounge samba.distributed[387]: failed!
Apr 30 17:11:14 osmc-lounge systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 17:11:14 osmc-lounge systemd[1]: Failed to start Samba Server.
Apr 30 17:11:14 osmc-lounge systemd[1]: samba.service: Unit entered failed state.
Apr 30 17:11:14 osmc-lounge systemd[1]: samba.service: Failed with result ‘exit-code’.

That doesn’t look good! :slight_smile:

osmc@osmc-lounge:~$ journalctl -xe
Apr 30 19:11:01 osmc-lounge sshd[2803]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:11:01 osmc-lounge sshd[2803]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:11:01 osmc-lounge sshd[2803]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:11:03 osmc-lounge sshd[2803]: Connection closed by 61.245.149.187 port 52222 [preauth]
Apr 30 19:13:41 osmc-lounge sshd[2818]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:13:41 osmc-lounge sshd[2818]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:13:41 osmc-lounge sshd[2818]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:13:41 osmc-lounge sshd[2818]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:13:45 osmc-lounge sshd[2818]: Connection closed by 61.245.149.187 port 36746 [preauth]
Apr 30 19:14:40 osmc-lounge sudo[2850]: osmc : TTY=pts/0 ; PWD=/home/osmc ; USER=root ; COMMAND=/bin/journalctl
Apr 30 19:14:40 osmc-lounge sudo[2850]: pam_unix(sudo:session): session opened for user root by osmc(uid=0)
Apr 30 19:14:41 osmc-lounge sudo[2850]: pam_unix(sudo:session): session closed for user root
Apr 30 19:18:49 osmc-lounge sshd[2896]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:18:49 osmc-lounge sshd[2896]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:18:49 osmc-lounge sshd[2896]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:18:49 osmc-lounge sshd[2896]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:18:53 osmc-lounge sshd[2896]: Connection closed by 61.245.149.187 port 37553 [preauth]
Apr 30 19:18:57 osmc-lounge sshd[2898]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:18:57 osmc-lounge sshd[2898]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:18:57 osmc-lounge sshd[2898]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:18:57 osmc-lounge sshd[2898]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:19:01 osmc-lounge sshd[2898]: Connection closed by 61.245.149.187 port 52483 [preauth]
Apr 30 19:21:21 osmc-lounge sshd[2909]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:21:21 osmc-lounge sshd[2909]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:21:21 osmc-lounge sshd[2909]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:21:21 osmc-lounge sshd[2909]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:21:22 osmc-lounge sshd[2910]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:21:22 osmc-lounge sshd[2910]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:21:22 osmc-lounge sshd[2910]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:21:22 osmc-lounge sshd[2910]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:21:22 osmc-lounge sshd[2909]: Connection closed by 61.245.149.187 port 40774 [preauth]
Apr 30 19:21:23 osmc-lounge sshd[2910]: Connection closed by 61.245.149.187 port 40775 [preauth]
Apr 30 19:23:03 osmc-lounge sshd[2913]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:23:03 osmc-lounge sshd[2913]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:23:03 osmc-lounge sshd[2913]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:23:03 osmc-lounge sshd[2913]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:23:04 osmc-lounge sshd[2913]: Connection closed by 61.245.149.187 port 35759 [preauth]
Apr 30 19:25:13 osmc-lounge sshd[2916]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:25:13 osmc-lounge sshd[2916]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:25:13 osmc-lounge sshd[2916]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:25:13 osmc-lounge sshd[2916]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:25:15 osmc-lounge sshd[2916]: Connection closed by 61.245.149.187 port 45785 [preauth]
Apr 30 19:25:25 osmc-lounge sshd[2918]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:25:25 osmc-lounge sshd[2918]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:25:25 osmc-lounge sshd[2918]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:25:25 osmc-lounge sshd[2918]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:25:30 osmc-lounge sshd[2918]: Did not receive identification string from 61.245.149.187 port 33338
Apr 30 19:26:49 osmc-lounge sudo[2925]: osmc : TTY=pts/0 ; PWD=/home/osmc ; USER=root ; COMMAND=/bin/systemctl samba status
Apr 30 19:26:49 osmc-lounge sudo[2925]: pam_unix(sudo:session): session opened for user root by osmc(uid=0)
Apr 30 19:26:49 osmc-lounge sudo[2925]: pam_unix(sudo:session): session closed for user root
Apr 30 19:27:57 osmc-lounge sshd[2927]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:27:57 osmc-lounge sshd[2927]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:27:57 osmc-lounge sshd[2927]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:27:57 osmc-lounge sshd[2927]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:27:58 osmc-lounge sshd[2927]: Connection closed by 61.245.149.187 port 34912 [preauth]
Apr 30 19:29:21 osmc-lounge sudo[2930]: osmc : TTY=pts/0 ; PWD=/home/osmc ; USER=root ; COMMAND=/bin/systemctl status samba
Apr 30 19:29:21 osmc-lounge sudo[2930]: pam_unix(sudo:session): session opened for user root by osmc(uid=0)
Apr 30 19:29:21 osmc-lounge sudo[2930]: pam_unix(sudo:session): session closed for user root
Apr 30 19:29:25 osmc-lounge sshd[2933]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:29:25 osmc-lounge sshd[2933]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:29:25 osmc-lounge sshd[2933]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:29:25 osmc-lounge sshd[2933]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:29:26 osmc-lounge sshd[2934]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:29:26 osmc-lounge sshd[2934]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:29:26 osmc-lounge sshd[2934]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:29:26 osmc-lounge sshd[2934]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:29:27 osmc-lounge sshd[2933]: Connection closed by 61.245.149.187 port 38338 [preauth]
Apr 30 19:29:28 osmc-lounge sshd[2934]: Connection closed by 61.245.149.187 port 38336 [preauth]
Apr 30 19:31:31 osmc-lounge sshd[2945]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:31:31 osmc-lounge sshd[2945]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:31:31 osmc-lounge sshd[2945]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:31:31 osmc-lounge sshd[2945]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:31:33 osmc-lounge sshd[2945]: Connection closed by 61.245.149.187 port 54040 [preauth]
Apr 30 19:31:40 osmc-lounge sshd[2947]: rexec line 18: Deprecated option KeyRegenerationInterval
Apr 30 19:31:40 osmc-lounge sshd[2947]: rexec line 19: Deprecated option ServerKeyBits
Apr 30 19:31:40 osmc-lounge sshd[2947]: rexec line 30: Deprecated option RSAAuthentication
Apr 30 19:31:40 osmc-lounge sshd[2947]: rexec line 42: Deprecated option RhostsRSAAuthentication
Apr 30 19:31:43 osmc-lounge sshd[2947]: Connection closed by 61.245.149.187 port 40763 [preauth]
lines 1159-1236/1236 (END)

Maybe try to remove and reinstall Samba.
sudo apt-get remove --purge smb-app-osmc samba
sudo apt-get autoremove
sudo rm -r /etc/samba/
sudo apt-get install samba

Any configs I need to save first???

Do you have Internet forwarded for SSH access?

Normally Samba is all autoconfig and will be recreated. Unless you manually changed something.

No forwarding. I have SSH enabled on my router as a virtual server on a different port.

I will give it a go! Nothing changed from default other than smb-local.conf

Hmmmm. I tried to access via ssh on my mobile. I do recognise that external IP. I will be turning that off

Well how can then an external IP (61.245.149.187) access your OMSC…
…saw your openvpn installed maybe that is the reason.

osmc@osmc-lounge:~$ sudo apt-get install samba
Reading package lists… Done
Building dependency tree
Reading state information… Done
samba is already the newest version (2:4.5.16+dfsg-1+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up samba (2:4.5.16+dfsg-1+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 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 Thu 2020-04-30 19:47:38 ACST; 33ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 3720 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 3720 (code=exited, status=1/FAILURE)

Apr 30 19:47:38 osmc-lounge systemd[1]: Starting Samba SMB Daemon…
Apr 30 19:47:38 osmc-lounge systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 19:47:38 osmc-lounge systemd[1]: Failed to start Samba SMB Daemon.
Apr 30 19:47:38 osmc-lounge systemd[1]: smbd.service: Unit entered failed state.
Apr 30 19:47:38 osmc-lounge systemd[1]: smbd.service: Failed with result ‘exit-code’.
dpkg: error processing package samba (–configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u4) …
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

The full results

osmc@osmc-lounge:~$ sudo apt-get remove --purge smb-app-osmc samba
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libfile-copy-recursive-perl python-dnspython tdb-tools update-inetd
Use ‘sudo apt autoremove’ to remove them.
The following packages will be REMOVED:
samba* smb-app-osmc*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 10.8 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database … 28167 files and directories currently installed.)
Removing smb-app-osmc (1.2.2) …
Removing ‘diversion of /etc/samba/smb.conf to /etc/samba/smb.conf.distributed by smb-app-osmc’
Removing ‘diversion of /etc/init.d/samba to /etc/init.d/samba.distributed by smb-app-osmc’
Removing ‘diversion of /lib/systemd/system/samba.service to /lib/systemd/system/samba.service.distributed by smb-app-osmc’
Removing samba (2:4.5.16+dfsg-1+deb9u2) …
Processing triggers for libc-bin (2.24-11+deb9u4) …
(Reading database … 27970 files and directories currently installed.)
Purging configuration files for samba (2:4.5.16+dfsg-1+deb9u2) …
Purging configuration files for smb-app-osmc (1.2.2) …
Processing triggers for systemd (232-25+deb9u12) …
osmc@osmc-lounge:~$ sudo apt-get autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
libfile-copy-recursive-perl python-dnspython tdb-tools update-inetd
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 845 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database … 27959 files and directories currently installed.)
Removing update-inetd (4.44) …
Removing libfile-copy-recursive-perl (0.38-1) …
Removing python-dnspython (1.15.0-1+deb9u1) …
Removing tdb-tools (1.3.11-2) …
osmc@osmc-lounge:~$ sudo rm -r /etc/samba/
osmc@osmc-lounge:~$ sudo apt-get install samba
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
libfile-copy-recursive-perl python-dnspython tdb-tools update-inetd
Suggested packages:
bind9 bind9utils ctdb ldb-tools smbldap-tools winbind ufw
Recommended packages:
attr logrotate samba-dsdb-modules samba-vfs-modules
The following NEW packages will be installed:
libfile-copy-recursive-perl python-dnspython samba tdb-tools update-inetd
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 1051 kB of archives.
After this operation, 11.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 Index of /debian stretch/main armhf python-dnspython all 1.15.0-1+deb9u1 [102 kB]
Get:2 Index of /debian stretch/main armhf tdb-tools armhf 1.3.11-2 [25.7 kB]
Get:3 Index of /debian stretch/main armhf libfile-copy-recursive-perl all 0.38-1 [20.6 kB]
Get:4 Index of /debian stretch/main armhf update-inetd all 4.44 [20.8 kB]
Get:5 Index of /debian stretch/main armhf samba armhf 2:4.5.16+dfsg-1+deb9u2 [882 kB]
Fetched 1051 kB in 2s (392 kB/s)
Preconfiguring packages …
Selecting previously unselected package python-dnspython.
(Reading database … 27817 files and directories currently installed.)
Preparing to unpack …/python-dnspython_1.15.0-1+deb9u1_all.deb …
Unpacking python-dnspython (1.15.0-1+deb9u1) …
Selecting previously unselected package tdb-tools.
Preparing to unpack …/tdb-tools_1.3.11-2_armhf.deb …
Unpacking tdb-tools (1.3.11-2) …
Selecting previously unselected package libfile-copy-recursive-perl.
Preparing to unpack …/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 …/update-inetd_4.44_all.deb …
Unpacking update-inetd (4.44) …
Selecting previously unselected package samba.
Preparing to unpack …/samba_2%3a4.5.16+dfsg-1+deb9u2_armhf.deb …
Unpacking samba (2:4.5.16+dfsg-1+deb9u2) …
Setting up python-dnspython (1.15.0-1+deb9u1) …
Processing triggers for libc-bin (2.24-11+deb9u4) …
Processing triggers for systemd (232-25+deb9u12) …
Setting up tdb-tools (1.3.11-2) …
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Setting up libfile-copy-recursive-perl (0.38-1) …
Setting up update-inetd (4.44) …
Setting up samba (2:4.5.16+dfsg-1+deb9u2) …
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 Thu 2020-04-30 19:46:07 ACST; 32ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 3602 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 3602 (code=exited, status=1/FAILURE)

Apr 30 19:46:07 osmc-lounge systemd[1]: Starting Samba SMB Daemon…
Apr 30 19:46:07 osmc-lounge systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 19:46:07 osmc-lounge systemd[1]: Failed to start Samba SMB Daemon.
Apr 30 19:46:07 osmc-lounge systemd[1]: smbd.service: Unit entered failed state.
Apr 30 19:46:07 osmc-lounge systemd[1]: smbd.service: Failed with result ‘exit-code’.
dpkg: error processing package samba (–configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u4) …
Processing triggers for systemd (232-25+deb9u12) …
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
osmc@osmc-lounge:~$ sudo apt-get install samba
Reading package lists… Done
Building dependency tree
Reading state information… Done
samba is already the newest version (2:4.5.16+dfsg-1+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up samba (2:4.5.16+dfsg-1+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 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 Thu 2020-04-30 19:47:38 ACST; 33ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 3720 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 3720 (code=exited, status=1/FAILURE)

Apr 30 19:47:38 osmc-lounge systemd[1]: Starting Samba SMB Daemon…
Apr 30 19:47:38 osmc-lounge systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Apr 30 19:47:38 osmc-lounge systemd[1]: Failed to start Samba SMB Daemon.
Apr 30 19:47:38 osmc-lounge systemd[1]: smbd.service: Unit entered failed state.
Apr 30 19:47:38 osmc-lounge systemd[1]: smbd.service: Failed with result ‘exit-code’.
dpkg: error processing package samba (–configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u4) …
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Doesn’t look good, maybe try to remove all samba packages. Find them with dpkg -l | grep -i samba and then add them after sudo apt-get remove --purge

dpkg? How do I separate them?

Yes, always typos :wink: