[RESOLVED] cifs mount issue on CO7, fine on CO6?

Issues related to configuring your network
Post Reply
mevans336
Posts: 47
Joined: 2007/09/06 15:19:57
Contact:

[RESOLVED] cifs mount issue on CO7, fine on CO6?

Post by mevans336 » 2015/04/01 18:01:41

We mount a cifs share that resides on a Windows 2012 R2 server from both a CentOS 6.5 box and a CentOS 7 box. The CentOS 7 mount is what I am trying to work on, the v6 mount has worked fine for months.

I am using the following command in /etc/fstab, taken directly from my v6 installation:

Code: Select all

\\my.windows.server\myshare$ /mnt/myshare cifs credentials=/root/.mysharecreds,_netdev,uid=root 0 0
On v7, a mount -a results in the share being mounted (or rather, no errors are output), but no access is available. A simple ls results in ls: reading directory .: Permission denied.

I have disabled selinux via setenforce 0 but not rebooted (it is enabled on the v6 box without issue). I am not sure where else to look, as I don't see any errors in the audit.log or messages, all the folder structures are permissions seem to be the same.

Has something changed with the way I should mount a cifs share in CentOS v7?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: cifs mount issue on CO7, fine on CO6?

Post by gerald_clark » 2015/04/01 18:12:29

Did you also copy /root/.mysharecreds from your C6 machine?

mevans336
Posts: 47
Joined: 2007/09/06 15:19:57
Contact:

Re: [RESOLVED] cifs mount issue on CO7, fine on CO6?

Post by mevans336 » 2015/04/01 18:20:12

gerald_clark wrote:Did you also copy /root/.mysharecreds from your C6 machine?
I did. I initially mistyped the file name and mount complained, but once I fixed that everything seems to mount fine ... just no permissions.

I have verified the creds are exactly the same between both

The file has the following contents:

Code: Select all

username=mydomain/myshareusername
password=mysharepassword
Asking me that helped me locate part of the problem. It's not logging in using those creds. When I look at the event viewer I see the CentOS v7 machine trying to log in as "guest" to the share.

Why would v7 log in as guest when v6 logs in correctly?

EDIT:

Trying to manually mount the cifs share via the following command produces the exact same result.

Code: Select all

mount -t cifs -o username=mydomain/myshareusername,password=mypassword //my.windows.server/myshare$ /mnt/myshare
EDIT2:

This works:

Code: Select all

mount -t cifs -o username=myshareusername,password=mypassword,domain=mydomain //my.windows.server/myshare$ /mnt/myshare
How can I translate the mount command that work to an fstab entry?

EDIT3:

Resolved.

I removed the mydomain/myusername form the credentials file and just added the ,domain=mydomain to the fstab entry.

Post Reply