I want to automount a samba network share on my Rasberry Pi 3b+.

If I enter:

sudo mount.cifs //  /home/pi/windowshare -o user=root

Next to that I need to fill in the password on the prompt. This part works.

However when I want to automount I need to put some syntax under FSTAB. I have tried and tried but every time when I reboot the system I don't see anything on the desktop appearing.

Can somebody tell me the exact line end instructions to make it work? I have very little knowledge from this OS.


It's likely the password part that is complicating things. Try adding something like this to your fstab:

/// /home/pi/windowshare cifs credentials=/home/pi/.credentials,uid=1000,iocharset=utf8 0 0

where /home/pi/.credentials is a file that should look something like this:



Of course, in all the code above, make sure you replace any file/share names with the names on your system, and replace PASSWORD with the password to the network drive (not the password on the raspberry pi).

You can check if this works without rebooting your system by running sudo mount -a and then checking you /home/pi/windowshare folder.

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.