Cannot connect to smb server on vero - password and username not correct?

Hi All

So, usb drive connected to the vero. I want to be able to copy stuff to it from my win 10 Pro pc.
SSH works fine as usual. vero original username and password is the original and untouched.

I installed the smb server from the appstore. Reboot. Now from the PC I can see the “computer” OSMC in the network section. When trying to connect to it the password seems to be wrong. osmc/osmc will not work. PC user/pass will not work.

net view \ipaddress shows the share is there.

Username and/or password seems to be wrong?? I have never changed it.

Recently it seems to help to have an entry to the windows credentials manager for OSMC.

Also can reset osmc password via smbpasswd

but it should be osmc/osmc right ? It just wont accept it. SSH works just fine.

I tried to stop samba, then:
sudo apt-get remove --purge samba
sudo rm -r /etc/samba

Then reboot.
Then sudo apt-get install samba

With error:
Reading package lists… Done
Building dependency tree
Reading state information… Done
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:
samba
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/882 kB of archives.
After this operation, 10.7 MB of additional disk space will be used.
Selecting previously unselected package samba.
(Reading database … 32826 files and directories currently installed.)
Preparing to unpack …/samba_2%3a4.5.16+dfsg-1+deb9u2_armhf.deb …
Unpacking samba (2:4.5.16+dfsg-1+deb9u2) …
Processing triggers for libc-bin (2.24-11+deb9u4) …
Processing triggers for systemd (232-25+deb9u11) …
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 Sun 2019-05-26 22:40:58 NZST; 27ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 2448 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 2448 (code=exited, status=1/FAILURE)

May 26 22:40:58 osmc systemd[1]: Starting Samba SMB Daemon…
May 26 22:40:58 osmc systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
May 26 22:40:58 osmc systemd[1]: Failed to start Samba SMB Daemon.
May 26 22:40:58 osmc systemd[1]: smbd.service: Unit entered failed state.
May 26 22:40:58 osmc 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+deb9u11) …
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

The OSMC package that installs samba is called smb-app-osmc.
You might have now created a bit of a mixed setup.
try to remove/purge all packages and then install smb-app-osmc once more

Hmm the curse of reading a bit here and there! thanks I’ll try that and get back to you all.

can you tell me the syntax for resetting the password? I already have osmc/osmc credentials in win 10.

Nope, installing smb-app-osmc is not working. I’ve got my self in the deep doodoo now:
Error:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
samba
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:
samba smb-app-osmc
0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/885 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package samba.
(Reading database … 32826 files and directories currently installed.)
Preparing to unpack …/samba_2%3a4.5.16+dfsg-1+deb9u2_armhf.deb …
Unpacking samba (2:4.5.16+dfsg-1+deb9u2) …
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 Mon 2019-05-27 10:33:22 NZST; 27ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 2428 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 2428 (code=exited, status=1/FAILURE)

May 27 10:33:22 osmc systemd[1]: Starting Samba SMB Daemon…
May 27 10:33:22 osmc systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
May 27 10:33:22 osmc systemd[1]: Failed to start Samba SMB Daemon.
May 27 10:33:22 osmc systemd[1]: smbd.service: Unit entered failed state.
May 27 10:33:22 osmc 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
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can you guys post me the script to completely remove all samba related stuff and I’ll try to install it only from the appstore again?

Ta

Just,

smbpasswd

This will change the password of the currently logged in user (osmc)

Try:

sudo apt-get remove --purge smb-app-osmc samba

After removing the samba above, I cannot reinstall it from the app store. I think I broke something…

try from command line sudo apt-get install smb-app-osmc and report the output

Will not install:

"Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
smb-app-osmc
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/3398 B of archives.
After this operation, 60.4 kB of additional disk space will be used.
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 Wed 2019-05-29 08:39:59 NZST; 400ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 25998 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 25998 (code=exited, status=1/FAILURE)

May 29 08:39:56 osmc systemd[1]: Starting Samba SMB Daemon…
May 29 08:39:59 osmc systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
May 29 08:39:59 osmc systemd[1]: Failed to start Samba SMB Daemon.
May 29 08:39:59 osmc systemd[1]: smbd.service: Unit entered failed state.
May 29 08:39:59 osmc 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
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)"

Hi,

Does this file exist?

If so I would try unmasking it:

sudo systemctl unmask samba-ad-dc.service

Then try installing again.

Thanks Tom.

I think your problem is simple: you don’t have a samba password for your user.
Samba passwords are stored separate from “traditional” linux passwords. The same user can even have different passwords for ssh and samba.
To define a samba password, you should use the command “smbpasswd”

I tried unmasking it but the installation attempts to mask it again but can’t find the file or directory:

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
smb-app-osmc
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 0 B/3398 B of archives.
After this operation, 60.4 kB of additional disk space will be used.
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.
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 2019-05-29 09:15:05 NZST; 403ms ago
    Docs: man:smbd(8)
    man:samba(7)
    man:smb.conf(5)
    Process: 29354 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
    Main PID: 29354 (code=exited, status=1/FAILURE)

May 29 09:15:02 osmc systemd[1]: Starting Samba SMB Daemon…
May 29 09:15:05 osmc systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
May 29 09:15:05 osmc systemd[1]: Failed to start Samba SMB Daemon.
May 29 09:15:05 osmc systemd[1]: smbd.service: Unit entered failed state.
May 29 09:15:05 osmc 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
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

I can’t install samba at the moment, when I do I’ll try this.

Hi,

From some googling it looks like parts of the purged installs still remain, causing the new install to fail please try the following:

sudo apt-get remove --purge smb-app-osmc samba samba-*
sudo apt-get autoremove
sudo mv  /etc/samba /etc/samba.old
sudo apt-get install smb-app-osmc

Thanks Tom.

Lots of errors:

sudo apt-get remove --purge smb-app-osmc samba samba-*
Reading package lists… Done
Building dependency tree
Reading state information… Done
Note, selecting ‘samba-client’ for glob ‘samba-
Note, selecting ‘samba-dev’ for glob 'samba-

Note, selecting ‘samba-doc’ for glob ‘samba-
Note, selecting ‘samba-dsdb-modules’ for glob 'samba-

Note, selecting ‘samba-ad-dc’ for glob ‘samba-
Note, selecting ‘samba-libs’ for glob 'samba-

Note, selecting ‘samba-common’ for glob ‘samba-
Note, selecting ‘samba-vfs-modules’ for glob 'samba-

Note, selecting ‘samba-common-bin’ for glob ‘samba-
Note, selecting ‘samba-tools’ for glob 'samba-

Note, selecting ‘samba-testsuite’ for glob 'samba-
Package ‘samba-doc’ is not installed, so not removed
Package ‘samba-tools’ is not installed, so not removed
Package ‘samba-ad-dc’ is not installed, so not removed
Note, selecting ‘smbclient’ instead of ‘samba-client’
Package ‘samba-dev’ is not installed, so not removed
Package ‘samba-dsdb-modules’ is not installed, so not removed
Package ‘samba-testsuite’ is not installed, so not removed
Package ‘samba-vfs-modules’ is not installed, so not removed
Package ‘smb-app-osmc’ is not installed, so not removed
The following packages were automatically installed and are no longer required:
armv7-bluez-osmc armv7-connman-osmc armv7-libass-osmc armv7-libbluray-osmc armv7-libnfs-osmc armv7-librtmp-osmc
armv7-libshairplay-osmc armv7-libsqlite-osmc curl fontconfig-config fonts-dejavu-core gir1.2-glib-2.0 iproute2
iptables libaacs0 libasound2 libasound2-data libavahi-compat-libdnssd1 libcap2-bin libcdio13 libcrossguid0 libcups2
libelf1 libenca0 libevdev2 libfile-copy-recursive-perl libfontconfig1 libfreetype6 libfribidi0 libfstrcmp0 libgif7
libgirepository-1.0-1 libgraphite2-3 libharfbuzz0b libinput-bin libinput10 libip6tc0 libiptc0 libiso9660-8 libjbig0
libjpeg62-turbo liblcms2-2 libldb1 liblzo2-2 libmad0 libmariadbclient18 libmicrohttpd12 libmnl0 libmtdev1
libnetfilter-conntrack3 libnfnetlink0 libnl-3-200 libnl-genl-3-200 libnss-myhostname libogg0 libpcrecpp0v5
libpcsclite1 libpkcs11-helper1 libplist3 libpopt0 libpython2.7 libsamplerate0 libssh-4 libtag1v5-vanilla libtalloc2
libtdb1 libtevent0 libtiff5 libtinyxml2.6.2v5 libvorbis0a libvorbisenc2 libwacom-common libwacom2 libwbclient0
libwebp6 libwebpdemux2 libwebpmux2 libxkbcommon0 libxslt1.1 libxtables12 libyajl2 mediacenter-addon-osmc
mediacenter-eventclients-common-osmc mediacenter-send-osmc mediacenter-skin-osmc mysql-common net-tools openvpn
python-chardet python-dbus python-dnspython python-gi python-gobject python-gobject-2 python-imaging python-ldb
python-pexpect python-pil python-pkg-resources python-ptyprocess python-requests python-six python-talloc python-tdb
python-unidecode python-urllib3 tdb-tools update-inetd vero3-libcec-osmc wget wireless-firmware-osmc wpasupplicant
xkb-data
Use ‘sudo apt autoremove’ to remove them.
The following packages will be REMOVED:
armv7-network-osmc
cifs-utils* libsmbclient* python-samba* samba* samba-common* samba-common-bin* samba-libs*
vero3-device-osmc* vero3-mediacenter-osmc*
0 upgraded, 0 newly installed, 10 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 307 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 33027 files and directories currently installed.)
Removing samba (2:4.5.16+dfsg-1+deb9u2) …
Removing vero3-device-osmc (1.4.2) …
WARNING: You have tried to remove a package that is essential to OSMC’s operation.
To undo these changes, run ‘sudo apt-get -f install’.
dpkg: error processing package vero3-device-osmc (–remove):
subprocess installed pre-removal script returned error exit status 1
Removing samba-common-bin (2:4.5.16+dfsg-1+deb9u2) …
Removing python-samba (2:4.5.16+dfsg-1+deb9u2) …
dpkg: vero3-mediacenter-osmc: dependency problems, but removing anyway as you requested:
vero3-device-osmc depends on vero3-mediacenter-osmc.

Removing vero3-mediacenter-osmc (18.2.0-12) …
Removing libsmbclient:armhf (2:4.5.16+dfsg-1+deb9u2) …
dpkg: samba-common: dependency problems, but removing anyway as you requested:
cifs-utils depends on samba-common.

Removing samba-common (2:4.5.16+dfsg-1+deb9u2) …
Removing samba-libs:armhf (2:4.5.16+dfsg-1+deb9u2) …
dpkg: armv7-network-osmc: dependency problems, but removing anyway as you requested:
vero3-device-osmc depends on armv7-network-osmc.

Removing armv7-network-osmc (1.7.6) …
WARNING: You have tried to remove a package that is essential to OSMC’s operation.
To undo these changes, run ‘sudo apt-get -f install’.
dpkg: error processing package armv7-network-osmc (–remove):
subprocess installed pre-removal script returned error exit status 1
dpkg: cifs-utils: dependency problems, but removing anyway as you requested:
armv7-network-osmc depends on cifs-utils.

Removing cifs-utils (2:6.7-1) …
Errors were encountered while processing:
vero3-device-osmc
armv7-network-osmc
E: Sub-process /usr/bin/dpkg returned an error code (1)
osmc@osmc:~$ sudo apt-get autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
armv7-network-osmc : Depends: cifs-utils but it is not installed
vero3-device-osmc : Depends: vero3-mediacenter-osmc but it is not installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
osmc@osmc:~$ sudo mv /etc/samba /etc/samba.old
mv: cannot stat ‘/etc/samba’: No such file or directory
osmc@osmc:~$ sudo apt-get install smb-app-osmc
Reading package lists… Done
Building dependency tree
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
armv7-network-osmc : Depends: cifs-utils but it is not going to be installed
smb-app-osmc : PreDepends: samba but it is not going to be installed
vero3-device-osmc : Depends: vero3-mediacenter-osmc but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).

Hi,

I think picking through all these errors, would fix these problems. But I think it may be quicker to backup & reinstall:

Thanks Tom.