From Notes Wiki
(Created page with "<yambe:breadcrumb self="Mount samba share">CentOS_7.x_Samba|Samba</yambe:breadcrumb> To mount samba (CIFS or Windows file sharing) file share in Linux use # yum -y install ci...")
Revision as of 09:33, 6 June 2019
To mount samba (CIFS or Windows file sharing) file share in Linux use
- yum -y install cifs-utils
- Create desired mountpoint such as:
- mkdir /mnt/fileserver
- List mountpoints using:
- smbclient -L <IP> -U username
- and enter password for listing mount points
- To access files without mouting use:
- smbclient //<ip>/share -U username
- and enter password to get smb client based file access.
- Mounting using command similar to:
- mount -t cifs --verbose '//<IP>/<share-name>' /mnt/fileserver -o 'username=administrator,password=secret'
- In case of older Windows Server 2003 above command fails with output:
- mount.cifs kernel mount options: ip=<ip>,unc=\\<server>\<share-name>,user=administrator,pass=********
- mount error(95): Operation not supported
- Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
- with /var/log/messages having suggestion:
- Apr 8 22:05:04 localhost kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
- Apr 8 22:05:04 localhost kernel: CIFS VFS: Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 on mount for accessing older servers
- Apr 8 22:05:04 localhost kernel: CIFS VFS: cifs_mount failed w/return code = -95
- After this mounting worked using:
- mount -t cifs --verbose '//<IP>/<share-name>' /mnt/fileserver -o 'username=administrator,password=secret,vers=1.0'