ClipClopHorseyStomp
Posts: 1
Joined: Sun Jun 13, 2021 9:34 pm

Newbie Having Trouble Mounting an SMB

Sun Jun 13, 2021 9:43 pm

New to the pi. I'm setting up a Plex server setup and I think I've got everything setup except I can't seem to get my SMB to mount.

my /etc/fstab rerads

Code: Select all

proc            /proc           proc    defaults          0       0
PARTUUID=63900b8b-01  /boot           vfat    defaults          0       2
PARTUUID=63900b8b-02  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that
//192.168.0.1/NETWORK_DRIVE /home/pi/DRIVE/share cifs username=USERNAME,password=PASSWORD
but when I run sudo mount -a I get

Code: Select all

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

RonR
Posts: 2271
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Newbie Having Trouble Mounting an SMB

Mon Jun 14, 2021 5:15 am

Try this:

Code: Select all

//192.168.0.1/NETWORK_DRIVE /home/pi/DRIVE/share cifs username=USERNAME,password=PASSWORD,nofail,vers=1.0,rw,x-systemd.automount  0  0

LTolledo
Posts: 5556
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Newbie Having Trouble Mounting an SMB

Mon Jun 14, 2021 10:10 am

also don't forget to enable "wait for network" on the raspi-config...
"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!"

User avatar
thagrol
Posts: 5254
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Newbie Having Trouble Mounting an SMB

Mon Jun 14, 2021 11:52 am

It's user= not username=.

See the output from

Code: Select all

man mount.cifs
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

RonR
Posts: 2271
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Newbie Having Trouble Mounting an SMB

Mon Jun 14, 2021 5:30 pm

thagrol wrote:
Mon Jun 14, 2021 11:52 am
It's user= not username=.

See the output from

Code: Select all

man mount.cifs

username= and password= are legit.

From man mount.cifs (Raspberry Pi OS 32-bit/64-bit Buster/Bullseye):

username=arg|user=arg
password=arg|pass=arg

More specifically:

While some versions of the cifs kernel module accept user= as an abbreviation for this option, its use can confuse the standard
mount program into thinking that this is a non-superuser mount. It is therefore recommended to use the full username= option name.

RonR
Posts: 2271
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: Newbie Having Trouble Mounting an SMB

Mon Jun 14, 2021 5:46 pm

LTolledo wrote:
Mon Jun 14, 2021 10:10 am
also don't forget to enable "wait for network" on the raspi-config...

Which is already enabled by default.

User avatar
thagrol
Posts: 5254
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Newbie Having Trouble Mounting an SMB

Mon Jun 14, 2021 6:08 pm

RonR wrote:
Mon Jun 14, 2021 5:30 pm
thagrol wrote:
Mon Jun 14, 2021 11:52 am
It's user= not username=.

See the output from

Code: Select all

man mount.cifs

username= and password= are legit.

From man mount.cifs (Raspberry Pi OS 32-bit/64-bit Buster/Bullseye):

username=arg|user=arg
password=arg|pass=arg

More specifically:

While some versions of the cifs kernel module accept user= as an abbreviation for this option, its use can confuse the standard
mount program into thinking that this is a non-superuser mount. It is therefore recommended to use the full username= option name.
So it is. My bad. Sorry.
I'm a volunteer. Take me for granted or abuse my support and I will walk away

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

Return to “Troubleshooting”