LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Samba Error in RPi3B

Sun Mar 24, 2019 1:49 am

Been wondering why this RPi3B cannot see networks shares whereas when I run Kodi on it it can access the network shares.

Unit Specs
Raspberry Pi 3 Model B in Pi-Top case.
WiFi connection to network
USB native boot using latest update/upgrade of Raspbian Stretch with Desktop (cloned from another image)


Am posting to this forum using the same Pi-Top RPi3B unit so network access is OK.
The source image is working properly on the RPI3B+ (can view and access network shares, either via LAN or WiFi)

When I removed/purged/clean/autoremove samba, samba-common-bin, smbclient, I was able to see the network shares
However this RPi3B is missing from the list.

Reinstalled samba, samba-common-bin, smbclient, set smbpasswd, copied the smb.conf from the source image
Again I cannot see the network shares, only the Pi-Top RPi3B unit.

Then I removed again samba, samba-common-bin, smbclient (purged, clean and autoremove)
This time I also deleted all the contents of /etc/samba as well as the /etc/samba directory
Still able to see the network shares and connect to it.

However when I try to install samba again I got the following error:

Code: Select all

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-03-24 10:14:35 JST; 37ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 1805 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 1805 (code=exited, status=1/FAILURE)

Mar 24 10:14:35 PiTopRPi3B systemd[1]: Starting Samba SMB Daemon...
Mar 24 10:14:35 PiTopRPi3B systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Mar 24 10:14:35 PiTopRPi3B systemd[1]: Failed to start Samba SMB Daemon.
Mar 24 10:14:35 PiTopRPi3B systemd[1]: smbd.service: Unit entered failed state.
Mar 24 10:14:35 PiTopRPi3B 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)
So right now I cannot re-install samba because of this error.

Any insight/pointers/tips on how to solve this is welcome

below is the full "log" of the initial re-installation:

Code: Select all

~ $ sudo apt install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  attr libaio1 python-dnspython python-ldb python-samba python-tdb
  samba-common-bin samba-dsdb-modules samba-vfs-modules tdb-tools
Suggested packages:
  python-gpgme bind9 bind9utils ctdb ldb-tools ntp | chrony smbldap-tools
  winbind ufw heimdal-clients
The following NEW packages will be installed:
  attr libaio1 python-dnspython python-ldb python-samba python-tdb samba
  samba-common-bin samba-dsdb-modules samba-vfs-modules tdb-tools
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,431 kB of archives.
After this operation, 23.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf python-dnspython all 1.15.0-1+deb9u1 [102 kB]
Get:2 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf python-ldb armhf 2:1.1.27-1+deb9u1 [29.9 kB]
Get:3 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf python-tdb armhf 1.3.11-2 [15.3 kB]
Get:4 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf python-samba armhf 2:4.5.16+dfsg-1 [1,144 kB]
Get:5 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf samba-common-bin armhf 2:4.5.16+dfsg-1 [554 kB]
Get:6 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf tdb-tools armhf 1.3.11-2 [25.7 kB]
Get:7 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf samba armhf 2:4.5.16+dfsg-1 [870 kB]
Get:8 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf attr armhf 1:2.4.47-2 [41.3 kB]
Get:9 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf libaio1 armhf 0.3.110-3 [9,366 B]
Get:10 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf samba-dsdb-modules armhf 2:4.5.16+dfsg-1 [305 kB]
Get:11 http://ftp.jaist.ac.jp/pub/Linux/raspbian-archive/raspbian stretch/main armhf samba-vfs-modules armhf 2:4.5.16+dfsg-1 [335 kB]
Fetched 3,431 kB in 7s (466 kB/s)                                              
Selecting previously unselected package python-dnspython.
(Reading database ... 133887 files and directories currently installed.)
Preparing to unpack .../00-python-dnspython_1.15.0-1+deb9u1_all.deb ...
Unpacking python-dnspython (1.15.0-1+deb9u1) ...
Selecting previously unselected package python-ldb.
Preparing to unpack .../01-python-ldb_2%3a1.1.27-1+deb9u1_armhf.deb ...
Unpacking python-ldb (2:1.1.27-1+deb9u1) ...
Selecting previously unselected package python-tdb.
Preparing to unpack .../02-python-tdb_1.3.11-2_armhf.deb ...
Unpacking python-tdb (1.3.11-2) ...
Selecting previously unselected package python-samba.
Preparing to unpack .../03-python-samba_2%3a4.5.16+dfsg-1_armhf.deb ...
Unpacking python-samba (2:4.5.16+dfsg-1) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../04-samba-common-bin_2%3a4.5.16+dfsg-1_armhf.deb ...
Unpacking samba-common-bin (2:4.5.16+dfsg-1) ...
Selecting previously unselected package tdb-tools.
Preparing to unpack .../05-tdb-tools_1.3.11-2_armhf.deb ...
Unpacking tdb-tools (1.3.11-2) ...
Selecting previously unselected package samba.
Preparing to unpack .../06-samba_2%3a4.5.16+dfsg-1_armhf.deb ...
Unpacking samba (2:4.5.16+dfsg-1) ...
Selecting previously unselected package attr.
Preparing to unpack .../07-attr_1%3a2.4.47-2_armhf.deb ...
Unpacking attr (1:2.4.47-2) ...
Selecting previously unselected package libaio1:armhf.
Preparing to unpack .../08-libaio1_0.3.110-3_armhf.deb ...
Unpacking libaio1:armhf (0.3.110-3) ...
Selecting previously unselected package samba-dsdb-modules.
Preparing to unpack .../09-samba-dsdb-modules_2%3a4.5.16+dfsg-1_armhf.deb ...
Unpacking samba-dsdb-modules (2:4.5.16+dfsg-1) ...
Selecting previously unselected package samba-vfs-modules.
Preparing to unpack .../10-samba-vfs-modules_2%3a4.5.16+dfsg-1_armhf.deb ...
Unpacking samba-vfs-modules (2:4.5.16+dfsg-1) ...
Setting up python-dnspython (1.15.0-1+deb9u1) ...
Setting up python-tdb (1.3.11-2) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up libaio1:armhf (0.3.110-3) ...
Processing triggers for systemd (232-25+deb9u9) ...
Setting up tdb-tools (1.3.11-2) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Processing triggers for man-db (2.7.6.1-2) ...
Setting up samba-dsdb-modules (2:4.5.16+dfsg-1) ...
Setting up attr (1:2.4.47-2) ...
Setting up python-ldb (2:1.1.27-1+deb9u1) ...
Setting up samba-vfs-modules (2:4.5.16+dfsg-1) ...
Setting up python-samba (2:4.5.16+dfsg-1) ...
Setting up samba-common-bin (2:4.5.16+dfsg-1) ...
Setting up samba (2:4.5.16+dfsg-1) ...
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-03-24 10:10:02 JST; 67ms ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 1374 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 1374 (code=exited, status=1/FAILURE)

Mar 24 10:10:02 PiTopRPi3B systemd[1]: Starting Samba SMB Daemon...
Mar 24 10:10:02 PiTopRPi3B systemd[1]: smbd.service: Main process exited, …URE
Mar 24 10:10:02 PiTopRPi3B systemd[1]: Failed to start Samba SMB Daemon.
Mar 24 10:10:02 PiTopRPi3B systemd[1]: smbd.service: Unit entered failed s…te.
Mar 24 10:10:02 PiTopRPi3B systemd[1]: smbd.service: Failed with result 'e…e'.
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+deb9u4) ...
Processing triggers for systemd (232-25+deb9u9) ...
Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Samba Error in RPi3B

Sun Mar 24, 2019 3:44 am

Just an update:

Well.....I was able to re-install samba, samba-common-bin and smbclient after copying some default files that need to exist in /etc/samba (samba installation restored the directory but it contained a file tls only)

Having done that, set smb password, copied my working smb.conf file from the image source....aaaannd.......

am back to square one..... that is....

cannot see network shares from other RPi, WinPC, NAS

and only on this Pi-Top RPi3B unit....

gonna try setting smb version...... (which is not/never set on the other working RPi, other SOC NAS)
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Samba Error in RPi3B

Sun Mar 24, 2019 4:05 am

Another update:

Setting the

Code: Select all

max protocol = SMB1 
in the smb.conf's global section I was able to browse and gain access to my other RPI's network share/ other network shares
however the PiTopRPi3B's share is not yet visible from the list. Maybe a bit more wait it will "appear"

setting max protocol to SMB2 brings be back to square one, so it's no good.

why only this unit "suffered" from this "anomaly" is quite intriguing and would like to know why it happened....(so as to prevent future occurrences)
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Samba Error in RPi3B

Sun Mar 24, 2019 7:58 am

Update again

Well it seems that adding max protocol = SMB1 is causing smbd service not to start so I deleted it again

and back to square one.

I've checked the status of the smbd and nmbd services but there are no errors

Code: Select all

~ $ systemctl status smbd.service
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: ena
   Active: active (running) since Sun 2019-03-24 16:51:26 JST; 4s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 1877 (smbd)
   Status: "smbd: ready to serve connections..."
   CGroup: /system.slice/smbd.service
           ├─1877 /usr/sbin/smbd
           ├─1878 /usr/sbin/smbd
           ├─1879 /usr/sbin/smbd
           └─1881 /usr/sbin/smbd

Mar 24 16:51:25 PiTopRPi3B systemd[1]: Starting Samba SMB Daemon...
Mar 24 16:51:26 PiTopRPi3B systemd[1]: smbd.service: Supervising process 1877 
Mar 24 16:51:26 PiTopRPi3B systemd[1]: Started Samba SMB Daemon.
[email protected]:~ $ systemctl status nmbd.service
● nmbd.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: ena
   Active: active (running) since Sun 2019-03-24 16:27:30 JST; 24min ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 470 (nmbd)
   Status: "nmbd: ready to serve connections..."
   CGroup: /system.slice/nmbd.service
           └─470 /usr/sbin/nmbd

Mar 24 16:27:22 PiTopRPi3B systemd[1]: Starting Samba NMB Daemon...
Mar 24 16:27:25 PiTopRPi3B systemd[1]: nmbd.service: Supervising process 470 w
Mar 24 16:27:30 PiTopRPi3B systemd[1]: Started Samba NMB Daemon.
...skipping...
● nmbd.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: ena
   Active: active (running) since Sun 2019-03-24 16:27:30 JST; 24min ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
 Main PID: 470 (nmbd)
   Status: "nmbd: ready to serve connections..."
   CGroup: /system.slice/nmbd.service
           └─470 /usr/sbin/nmbd

Mar 24 16:27:22 PiTopRPi3B systemd[1]: Starting Samba NMB Daemon...
Mar 24 16:27:25 PiTopRPi3B systemd[1]: nmbd.service: Supervising process 470 w
Mar 24 16:27:30 PiTopRPi3B systemd[1]: Started Samba NMB Daemon.
Other RPi's and WinPC can still browse and access this PiTopRPi3B but this PiTopRPi3B cant see other's network share

For clarification:
The term "cant see" or "can't browse" other network shares was done using pcmanfm (desktop file manager) using Go --> Network

if I use command line smbtree
it shows me a list of servers and their corresponding network shares

is pcmanfm borked?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

hortimech
Posts: 266
Joined: Wed Apr 08, 2015 5:52 pm

Re: Samba Error in RPi3B

Sun Mar 24, 2019 9:55 am

There is a good reason why 'max protocol = SMB1' doesn't work, the 'SMB1' part doesn't exist!
Try this instead 'server max protocol = NT1'

You also better get used to no network browsing, it is going away.

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Samba Error in RPi3B

Sun Mar 24, 2019 10:17 am

hortimech wrote:
You also better get used to no network browsing, it is going away.
Thanks for replying....

Hmmm..... may I ask why? [ ...no network browsing....]
What is / are its replacement?

also tried max server protocol = NT1
no effect
also tried max client protocol = NT1 prior to your reply (as I've read from other troubleshooting sites)

so am I already seeing "the future" in my PiTopRPi3B?
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

hortimech
Posts: 266
Joined: Wed Apr 08, 2015 5:52 pm

Re: Samba Error in RPi3B

Sun Mar 24, 2019 12:19 pm

Hmm, 'max server protocol = NT1' should work, is SMBv1 turned off on the client as well ?

You need SMBv1 for network browsing and, as it is very insecure, it is now usually turned off by default. It is being replaced by mapping drives, connecting to a UNC or by 'Network Discovery' on Windows.

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Samba Error in RPi3B

Sun Mar 24, 2019 12:33 pm

the others (windows, raspbian, linux based NAS solution, other linux flavors, android) are in default settings, no edits.

Only on this PiTopRPi3B I tried setting the protocol to NT1

tried other file managers as well (after confirming those existed in raspbian repository)

nautilus behaved same as pcmanfm
dolphin did not even show any workgroups to browse in to.

uninstalled both "failed" file managers after testing....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Samba Error in RPi3B

Mon Mar 25, 2019 9:06 pm

Well.... after a "day off", my PiTopRPi3B was able to recover from its "samba slumber" and now able browse network shares...

...the last edit as suggested by hortimech could be the one that "woke" it up...

...wont be marking this as solved yet.... :)
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “Troubleshooting”