Mount SMB/CIFS share at boot in CentOS 7.
- June 4th, 2015
- Posted in Documentation
- Write comment
Mounting a Windows (CIFS) file share in CentOS 7 has changed a little when using a Windows domain to authenticate.
First, you need to have the cifs-util package installed. This will allow you to mount cifs/smb filesystems.
The syntax in the /etc/fstab has not changed, but the way the credential options are stored for domains is a little different. I use a hidden file that is read only to store the Windows credentials.
/etc/fstab:
//winserver/sharename /mntpoint cifs credentials=/usr/local/etc/.myfile,iocharset=utf8,file_mode=0774,dir_mode=0774 0 0
Here is the change. In the past, I was able to specify the domain with the username in the credential file like so:
/usr/local/etc/.myfile:
username=mydomain\myusername
password=mypassword
Now, the domain needs to be specified on its own line like so:
username=myusername
password=mypassword
domain=mydomain
No comments yet.