1

RPi4-No access to Raspberry Pi from Windows 10

Where is the problem?

Runnibg on: Raspberry Pi 4 (buster), USB3 disk attached with volume label USB2TB a 2 terabyte NTFS disk

Windows 10 Home, Version 1909, OS build 18363720

I followed the steps in this How To: https://raspberrytips.com/raspberry-pi-file-server/

These are the steps I took:

1-
sudo service ssh start

2-
sudo mkdir /media/pi/USB2TB

3-
sudo apt-get update sudo apt-get upgrade

4-
sudo apt-get install samba

5- Windows 10: See if it's there, it is. \ \192.168.0.20

6-
sudo chmod 777 /media/pi/USB2TB

7-
sudo nano /etc/samba/smb.conf

To the end of the file I added;

[HenrikPi]

comment = RaspberryPi

public = yes

writeable = yes

browsable = yes

path = /media/pi/USB2TB

create mask = 0777

directory mask = 0777

8-
sudo service smbd restart

9-
Windows 10: Opened the file explorer and typed this address
\ \192.168.0.20\HenrikPi

Windows 10 replied "canot access \ \192.168.0.20\HenrikPi ... Check spelling etc."

Where is the problem?

3
  • 1
    \192.168.0.20\HenrikPi You need double backslash (\\) in front of the servername / IP address. I would also suggest you start using systemctl commands, although that should not affect the result.
    – Dirk
    Commented Mar 30, 2020 at 14:55
  • The omision on this post of the (\ ) double-back-slash is all the fault of this sites translating my posted double-back-slash to a single-back-slash. I put the correct number of slashes in the commands. Thanks anyway :-)
    – Henrik
    Commented Mar 30, 2020 at 18:14
  • This is mainly to configure samba and has nothing to do with Raspberry Pi. You should better ask at superuser.com.
    – Ingo
    Commented Mar 30, 2020 at 18:32

2 Answers 2

1

You will need to mount the USB drive using an entry in FSTAB or via the command line.

Depending on the format of the drive you may also need to install fuse drive format support libraries.

Have a look at the man mount instructions from the command line.

2
  • I did the "sudo man" command and the last line of the reply showed that the "USB2TB" disk was mounted at boot time: /dev/sda1 on /media/pi/USB2TB type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
    – Henrik
    Commented Mar 31, 2020 at 9:59
  • @Henrik - the mount maybe being handled by the desktop part of the OS for you and the user/group shows root not pi (user/group 1000 normally). Did you create the samba user 'pi' using the command smbpasswd -a pi ? The force command OVERRIDES any file / directory security on that disk. Normally not an issue for single home users but a bit of a nightmare for companies :) Better to add the user to SAMBA, mount the disk and use VALID USERS = in the file.
    – user115418
    Commented Mar 31, 2020 at 17:18
0

I found the answer on: https://forums.linuxmint.com/viewtopic.php?t=40070

All that was needed was a line in /etc/samba/smb.conf under the

[global] heading:

force user = pi

... so now everybody here knows :-)

Thanks Henrik

2
  • can or will someone label this post as ANSWERED? I thinl it is.
    – Henrik
    Commented Apr 1, 2020 at 8:57
  • Please wait some hours. After two days you are able to accept your own answer. Please do it then.
    – Ingo
    Commented Apr 1, 2020 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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