Can't access Vero 4K/OSMC from Windows

sudo apt-get remove --purge samba
sudo rm -r /etc/samba

ought to do it.

Then reinstall from the AppStore.

Purge worked fine. Reinstall from the Appstore has thrown up an error: Error installing samba :frowning:

try sudo apt-get install samba and post any error messages here.

osmc@Vero4K:/$ 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.12+dfsg-2+deb9u1).
samba set to manually installed.
The following packages were automatically installed and are no longer required:
  armv7-libcrossguid-osmc bluez libapt-inst1.5 libasn1-8-heimdal libbind9-90
  libdbus-1-dev libdns100 libdpkg-perl libgif4 libgnutls-deb0-28
  libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libhogweed2
  libhx509-5-heimdal libicu52 libiperf0 libisc95 libisccc90 libisccfg90
  libkrb5-26-heimdal liblwres90 libmicrohttpd10 libmysqlclient18 libnettle4
  libntdb1 libplist2 libpng12-0 libpsl0 libroken18-heimdal libssl1.0.0
  libwebp5 libwebpdemux1 libwebpmux1 libwind0-heimdal libxtables10 pkg-config
  python-dbus-dev python-ntdb
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 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
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for systemd (232-25+deb9u1) ...
Setting up samba (2:4.5.12+dfsg-2+deb9u1) ...
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 Wed 2018-01-17 22:47:07 +04; 30ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 5089 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 5089 (code=exited, status=1/FAILURE)

Jan 17 22:47:07 Vero4K systemd[1]: Starting Samba SMB Daemon...
Jan 17 22:47:07 Vero4K systemd[1]: smbd.service: Main process exited, code=…LURE
Jan 17 22:47:07 Vero4K systemd[1]: Failed to start Samba SMB Daemon.
Jan 17 22:47:07 Vero4K systemd[1]: smbd.service: Unit entered failed state.
Jan 17 22:47:07 Vero4K systemd[1]: smbd.service: Failed with result 'exit-code'.
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-11+deb9u1) ...
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Oh dear, I hope @sam_nazarko is watching.

CC @DBMandrake

Looks like our init hacks for Samba may want to be removed now.

@grahamh Thanks for your help thus far

@sam_nazarko What does that mean? Is there anything I can do, or should I just wait?

There were workarounds for Samba in Jessie which may need to be removed. It now looks like your system is in a stuck state.
This shouldn’t be the reason for you being unable to access the shares however.

BTW, are you running Jessie or Stretch? If Jessie an upgrade to stretch/17.6 might get things sorted out.

You can check your OSMC version in left corner of My OSMC. 2017.12-1 is Stretch. Earlier is Jessie.

Yep, it’s Stretch

Then it looks like we need an expert.

Forgive my ignorance … Kodi is currently still working fine, and I can play media from my NAS. Does the ‘stuck state’ only apply to the samba server?

Should I avoid rebooting the Vero 4K?

:worried:

It applies to the samba installation. I doubt a re-boot will make any difference.

1 Like

Got a couple of chaps on the case.
samba_debug

And updates for now. But there aren’t any currently pending.
You can reboot the device without any problems.

We’ll fix the postinst issue and update the thread when this is resolved.
Fortunately APT is pretty clever, and will use new scripts from the updating package when the issue is resolved.

Sam

1 Like

@sam_nazarko @grahamh thanks guys, really appreciate the level of support from you, and all who’ve chipped in over the last couple of days!

Have you still got the output of the apt-get remove --purge samba on your screen? Can you post it here?

osmc@Vero4K:/$ sudo apt-get remove --purge samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  armv7-libcrossguid-osmc bluez libapt-inst1.5 libasn1-8-heimdal libbind9-90
  libdbus-1-dev libdns100 libdpkg-perl libfile-copy-recursive-perl libgif4
  libgnutls-deb0-28 libgpgme11 libhcrypto4-heimdal libhdb9-heimdal
  libheimbase1-heimdal libhogweed2 libhx509-5-heimdal libicu52 libiperf0
  libisc95 libisccc90 libisccfg90 libkrb5-26-heimdal liblwres90
  libmicrohttpd10 libmysqlclient18 libnettle4 libntdb1 libplist2 libpng12-0
  libpsl0 libroken18-heimdal libssl1.0.0 libwebp5 libwebpdemux1 libwebpmux1
  libwind0-heimdal libxtables10 pkg-config python-dbus-dev python-dnspython
  python-ntdb samba-dsdb-modules 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 8 not upgraded.
After this operation, 10.8 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 25877 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.12+dfsg-2+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
(Reading database ... 25680 files and directories currently installed.)
Purging configuration files for samba (2:4.5.12+dfsg-2+deb9u1) ...
Purging configuration files for smb-app-osmc (1.2.2) ...
Processing triggers for systemd (232-25+deb9u1) ...
osmc@Vero4K:/$ sudo rm -r /etc/samba
1 Like

Sorry guys, I’ll have to catch any further posts in the morning. Need to get some rest. Thanks again for your help tonight.

Line 2: Unit file /etc/systemd/system/samba-ad-dc.service is masked.

So what happens if you run:

sudo systemctl unmask samba-ad-dc.service