# mount -t cifs permission denied by mount -t smbfs works fine

## humbletech99

I am having trouble mounting with cifs, but mounting the exact same command with smbfs works fine. The share is on another samba server and is set to full public guest access.

```
# mount -t cifs //servername/sharename /mnt/temp -o password=""

mount error 13 = Permission denied

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

 

==> /var/log/messages <==

Sep  1 16:43:25 clientname Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

Sep  1 16:43:25 clientname CIFS VFS: Send error in SessSetup = -13

Sep  1 16:43:25 clientname CIFS VFS: cifs_mount failed w/return code = -13

# mount -t smbfs //servername/sharename /mnt/temp -o password=""

Anonymous login successful

```

I can then read and write files in /mnt/temp over smbfs but I cannot even mount it using cifs, but there are other cifs filesystems from other samba servers that mounted fine on this machine. I have the same problem mounting this one share from all linux boxen... but those same linux boxen can mount cifs shares from other machines just fine.

Any ideas why?

----------

## honp

I thing that when using cifs you MUST specify -o username

----------

## humbletech99

```
# mount -t cifs //servername/sharename /mnt/temp -o username=guest,password="" 

mount error 127 = Key has expired

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

----------

## Mousee

I've yet experienced this issue myself, but here's some ideas as to what you might be doing wrong and what I would try typing in:

 *Quote:*   

> 
> 
> Guest access password: In situations where a password isn't needed you will normally still need to specify one. Just use the null password, which is to say use password= with nothing after the = sign.

 

So try not using quotes after password= and put them where they should be around the entire syntax like so:

```

# mount -t cifs //servername/sharename /mnt/temp -o "username=guest,password="

```

Try using an upper case "Guest" if that doesn't work as well.

I also advise using the IP address of the server if you haven't tried that already... I had some issues with CIFS not recognizing my media server until I had done that. Though it does appear CIFS is seeing your server to me, just a thought anyways  :Razz: 

----------

## humbletech99

I've tried both suggestions but they didn't make any difference, I am getting the same key has expired error..

----------

## Mousee

I'd suggest filing it as a possible bug then.

I just tried myself and got the following:

```

mount -t cifs //servername/Movies /mnt/tmp/movies -o "ro,username=Guest,passwd="

mount: Key has expired

```

Guest account was off that time, so I turned it on and...

```

mount -t cifs //servername/Movies /mnt/tmp/movies -o "ro,username=Guest,passwd="

mount: cannot mount block device //servername/Movies read-only

```

And I've continued to get that despite changing "Guest" to lower-case "guest", trying a space after password ("username=guest,password= "), and etc etc. Seems that CIFS doesn't play well with guest accounts, even though they claim it's supposed to work fine. Ah well, good luck with it.

----------

