# samba share on asus-wrt is not mounting [SOLVED]

## don quixada

I'm trying to connect to a guest share on my network and it's not working. I'm getting the error:

```
mount error(22): Invalid argument

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
```

when I use the '-o guest' option.

I think it may have something to do with the SUID but I'm not sure how to check this. The logfile reveals nothing. Any suggestions? Thanks.

dqLast edited by don quixada on Fri Jan 04, 2019 4:01 pm; edited 1 time in total

----------

## guitou

Hello.

I suppose the option you want to set is NOT just guest, but user=guest

++

Gi)

----------

## don quixada

But then it asks for a password and there isn't (and shouldn't be) a password for 'guest'.

dq

----------

## guitou

And you have a password option as well for mount command  :Wink: 

++

Gi)

----------

## don quixada

I'm aware of that fact, but Samba's guest access has no password by design. The server is set up correctly and I can access it using other devices just not this Gentoo box after upgrading it. 

Incidentally, if I set up the server to not allow guest access and try to connect to it using an actual username and password it still doesn't work (I get the same error). Something is wrong with my setup on the Gentoo box. Does it have to do with the SMB version levels that are enabled?

dq

----------

## bbgermany

Hi,

can you check, whether your samba password db is having an entry for user "guest"?

check with 

```
pdbedit -L
```

greets, Stefan

----------

## don quixada

On the server side (asus-wrt) or the client side (gentoo)? I tried that command on both sides but it didn't yield much. Asus-wrt doesn't have it installed and gentoo give a blank result..

dq

----------

## Tony0945

On my system, user=nobody, doesn't require a password.

----------

## don quixada

Well for the asus-wrt the user nobody is asking for a password. But asus-wrt is working fine. Other devices are connecting using the guest network no problem. Even my gentoo machine did until I updated. Also, it is important to note that even an existing user/password combination doesn't work using gentoo to connect to the samba share so the problem lies with my config on samba on gentoo...

dq

----------

## bbgermany

Hi,

you should try the mount option for the max smb version. maybe the asus-wrt allows smb2 only. check out the following example:

```
mount -t cifs -o vers=3.0,username=MyUsername,password=*,rw,soft //MyServerIP/MyShare /tmp/veeam/MyServerIPMyShare
```

here is the "mapping":

 *https://superuser.com/questions/1297724/linux-force-default-mount-cifs-version-to-3-0 wrote:*   

> 
> 
> vers=3.0 is SMB3 i.e. Windows 8, Windows Server 2012
> 
> vers=2.1 is SMB2_10 i.e. Windows 7, Windows Server 2008 R2
> ...

 

greets, Stefan

----------

## don quixada

This was the answer! I put 'vers=2.0' is my fstab and then I could mount both guest and existing users. Thanks for your help!

dq

PS: I've changed the topic heading to reflect the wider issue.

----------

