This is an old revision of the document!
CIFS Windows Shares
General Information
Creating Samba server file shares (CIFS) and mounting CIFS shares on Linux.
Checklist
- Enterprise Linux 6/7
CIFS Server Setup
TODO
CIFS Client Setup
- Install Packages
yum install -y cifs-utils samba-client
- List remote shares
smbclient -L <remote-cifs-server>
- Create local directory structure to mount the shares in
mkdir -p /data/shared/<win-share-name>
- Create root ssh directory if it does not exist
mkdir /root/.ssh chmod 700 /root/.ssh
- Create the CIFS credentials file
touch /root/.ssh/.<win-share-name> chmod 600 /root/.ssh/.<win-share-name>
- Edit the credentials file, add share's user/pass/domain
vim /root/.ssh/.<win-share-name> username=<user> password=<password_here> domain=<domain>
- Create persistent CIFS mount in /etc/fstab
vim /etc/fstab //<remote-cifs-server>/<sharename> /data/shared/<win-share-name> cifs auto,credentials=/root/.ssh/.<win-share-name>,_netdev,uid=<user>,gid=<users>,rw 0 0
- Mount the share
mount -a