0

I updated raspbian to the latest stretch release recently. However, now I find that I cannot access the Samba share on the USB connected to the Pi from my Windows 10 laptops. I no more see the Pi hostname in the network or searching for '\mypihostname\' fails.

It was working fine till the update.

Can someone help?

EDIT:

I updated samba from 4.2.X to 4.5.8 and it works. However, it seems the issue is also elsewhere. The Pi stops responding to SSH and also the samba share goes away after some time. I can still ping, or my OwnCloud on the Pi, Apache, minidlna etc keep working fine. But I cannot see the samba share and cannot SSH.

Update: And here is the outcome from journalctl -u ssh when run as root

root@Trojan-Pi:/home/pi# journalctl -u ssh
-- Logs begin at Mon 2017-08-21 06:17:01 UTC, end at Mon 2017-08-21 13:03:47 UTC. --
Aug 21 06:17:25 Trojan-Pi systemd[1]: Started OpenBSD Secure Shell server.
Aug 21 06:17:26 Trojan-Pi sshd[404]: Server listening on 0.0.0.0 port 22.
Aug 21 06:17:26 Trojan-Pi sshd[404]: Server listening on :: port 22.
Aug 21 06:18:07 Trojan-Pi systemd[1]: Reloading OpenBSD Secure Shell server.
Aug 21 06:18:07 Trojan-Pi sshd[404]: Received SIGHUP; restarting.
Aug 21 06:18:07 Trojan-Pi systemd[1]: Reloaded OpenBSD Secure Shell server.
Aug 21 06:18:07 Trojan-Pi sshd[404]: Server listening on 0.0.0.0 port 22.
Aug 21 06:18:07 Trojan-Pi sshd[404]: Server listening on :: port 22.
Aug 21 12:56:35 Trojan-Pi sshd[1413]: Accepted password for pi from 10.8.19.75 port 32877 ssh2
Aug 21 12:56:35 Trojan-Pi sshd[1413]: pam_unix(sshd:session): session opened for user pi by (uid=0)
Aug 21 13:03:42 Trojan-Pi sshd[1500]: Accepted password for pi from 10.8.19.74 port 1952 ssh2
Aug 21 13:03:42 Trojan-Pi sshd[1500]: pam_unix(sshd:session): session opened for user pi by (uid=0)

And outcome from journalctl -u smbd when run as root is like this:

root@Trojan-Pi:/home/pi# journalctl -u smbd
-- Logs begin at Mon 2017-08-21 06:17:01 UTC, end at Mon 2017-08-21 13:03:47 UTC. --
Aug 21 06:17:31 Trojan-Pi systemd[1]: Starting Samba SMB Daemon...
Aug 21 06:17:43 Trojan-Pi systemd[1]: smbd.service: Supervising process 638 which is not our child. We'll most likely not notice when it exits.
Aug 21 06:17:44 Trojan-Pi systemd[1]: Started Samba SMB Daemon.
Aug 21 06:17:47 Trojan-Pi systemd[1]: Reloading Samba SMB Daemon.
Aug 21 06:17:47 Trojan-Pi systemd[1]: Reloaded Samba SMB Daemon.
Aug 21 06:18:07 Trojan-Pi smbd[835]: pam_unix(samba:session): session opened for user pi by (uid=0)
Aug 21 06:18:08 Trojan-Pi smbd[737]: pam_unix(samba:session): session closed for user nobody
Aug 21 12:46:27 Trojan-Pi smbd[1218]: pam_unix(samba:session): session opened for user pi by (uid=0)
Aug 21 12:46:58 Trojan-Pi smbd[1218]: pam_unix(samba:session): session closed for user pi
Aug 21 12:47:14 Trojan-Pi smbd[1265]: pam_unix(samba:session): session opened for user pi by (uid=0)
Aug 21 12:47:39 Trojan-Pi smbd[1271]: pam_unix(samba:session): session closed for user nobody
Aug 21 12:58:31 Trojan-Pi smbd[1454]: pam_unix(samba:session): session opened for user pi by (uid=0)
Aug 21 12:58:31 Trojan-Pi smbd[835]: pam_unix(samba:session): session closed for user pi

When I see that Samba is no more available, I also see that I cannot connect to it over ssh. Ping runs, but I cannot access the http sites as well that are running on apache - like Wordpress and OwnCloud

Does this help anyone to help me? As I said, this is after I updated my raspbian from jessie to stretch.

  • @MadMike the SSH file is needed to enable SSH for the first time. If I reboot the Pi and SSH right then, it works and eventually the samba share also remain available. But what I have seen is that if I keep it running for some time, later I fail to connect to the samba as well as ssh stops connecting – Kangkan Aug 20 '17 at 17:39
  • I get No journal files were found. when I try to access the entries without root rights. Try sudo su root and then journalctl -u ssh just to be certain please. – MadMike Aug 21 '17 at 9:48
  • @MadMike I updated the post with the details. – Kangkan Aug 21 '17 at 13:26
  • 1
    Seems both services are running just fine. I hope someone with network driver know-how comes along and sheds some insight on how to go from here :-/ – MadMike Aug 21 '17 at 14:42
1

I had the same problem when I went to Stretch from Jessie. Since I am newbie to linux I was browsing all site I could find that touched on the problem. Not sure how I fixed the problem but what I ending up doing was using systemctl to unmask samba-ad-dc not sure if i needed to do this then I created my own smb.conf file by moving/renaming the smb.conf that came with the install of samba. The file i created based on several different web site (not sure if I need to change it but it works) is:

##################################
##
## this is a special conf file i created on Feb 14, 18 following 
## example giving in Www.howtoforge.com tutorial debian-samba-server plus
## example from PiMyLifeUP
##
####################################

[global]
workgroup = WORKGROUP
wins support = yes
server string = Samba Server %v
netbios name = rasberrypi
security = user
map to guest = bad user
dns proxy = no
printing = cups
printcup name = cups

[allusers]
comment = All Users
path = /home/shares
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes

[homes]
comment = Home Directories
browseable = no
valid users = %S
writable = yes 
create mask = 0700
directory mask = 0700

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var//lib/samba/printers
browseable = yes
read only = yes
guest ok = yes

write list = root,@lpadmin, pi
  • Please check your postings formatting before posting! – MatsK Feb 15 '18 at 6:51
  • I had a SD Card failure and had to start afresh. – Kangkan Feb 15 '18 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.