[SOLVED] Problem with samba on openhabian

hello

i’m having problem with the samba service openhabian, can’t start the service

 smbd.service - Samba SMB Daemon
 Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2018-12-04 17:39:16 IST; 4min 14s ago
 Docs: man:smbd(8)
       man:samba(7)
       man:smb.conf(5)
 Process: 2839 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=127)
 Main PID: 2839 (code=exited, status=127)

Dec 04 17:39:16 OPENHAB systemd[1]: Starting Samba SMB Daemon...
Dec 04 17:39:16 OPENHAB smbd[2839]: /usr/sbin/smbd: error while loading shared 
libraries: libsecrets3.so.0: cannot open shared object file: No such file or directory
Dec 04 17:39:16 OPENHAB systemd[1]: smbd.service: Main process exited, code=exited, 
status=127/n/a
Dec 04 17:39:16 OPENHAB systemd[1]: Failed to start Samba SMB Daemon.
Dec 04 17:39:16 OPENHAB systemd[1]: smbd.service: Unit entered failed state.
Dec 04 17:39:16 OPENHAB systemd[1]: smbd.service: Failed with result 'exit-code'.

● nmbd.service - Samba NMB Daemon
 Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Tue 2018-12-04 17:28:29 IST; 15min ago
 Docs: man:nmbd(8)
       man:samba(7)
       man:smb.conf(5)
Process: 737 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=exited, status=127)
Main PID: 737 (code=exited, status=127)

 Dec 04 17:28:29 OPENHAB systemd[1]: Starting Samba NMB Daemon...
Dec 04 17:28:29 OPENHAB nmbd[737]: /usr/sbin/nmbd: error while loading shared libraries: 
liblibsmb.so.0: cannot open shared object file: No such file or directory
Dec 04 17:28:29 OPENHAB systemd[1]: nmbd.service: Main process exited, code=exited, 
status=127/n/a
Dec 04 17:28:29 OPENHAB systemd[1]: Failed to start Samba NMB Daemon.
Dec 04 17:28:29 OPENHAB systemd[1]: nmbd.service: Unit entered failed state.
Dec 04 17:28:29 OPENHAB systemd[1]: nmbd.service: Failed with result 'exit-code'.

please help

thanks

Was samba installed with openhabian-config?

no, it was install with openhabian img file

where is the option to install samba in openhabian-config?

sudo openhabian-config

i mean where it is in the menu of the openhabian-config? i dont see option to install samba

Just checked, I don’t see it either.:roll_eyes:

Have you check the samba config file?

ok i found it, but when trying to install i get this

Copying over custom 'smb.conf'...
Writing authentication data to openHABian default...
/usr/bin/smbpasswd: error while loading shared libraries: liblibsmb.so.0: cannot open shared 
object file: No such file or directory

$ systemctl enable smbd.service
Synchronizing state of smbd.service with SysV service script with /lib/systemd/systemd- 
sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable smbd

 $ systemctl restart 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.

Try this

sudo apt-get install samba samba-common-bin

and also use sudo systemctl restart smbd.service

1 Like

Well openHABian just uses the Raspbian package mechanism to install the (stretch) packages so it’s not really an openHABian issue.
Did you try to do an apt-get dist-upgrade ? What’s in /etc/apt/sources.list, is it still the ‘main’ release train you’re on ? You could try switching to the testing release, but that of course comes with a risk.

1 Like

Googled a bit and seems this is related to package dependecies. You can try removing everything related to samba and after that upgrade all packages and install samba.

sudo apt-get autoremove samba samba-common

This step uses the autoremove to remove the package.

sudo apt-get purge samba samba-common

This step cleans any configuration file you may have

sudo apt-get update && apt-get upgrade

This updates package lists and upgrades all your installed packages

sudo apt-get install samba samba-common-bin

This installs samba and required packages. This step would be better run from openhabian-config to get shares configured automaticly.

1 Like

Thanks! this fix my problem!

thank you :grinning:

2 Likes

You’re welcome.

1 Like