RHEL 7: mount windows cifs share failed

35,412

If your company policy allows you to use CIFS then please make sure cifs utility is installed.

# lsmod |grep cifs
cifs                  293313  3

if not then install it

# yum install samba-client samba-common cifs-utils 

or

# yum install cifs-utils

After installing CIFS utility you should be able to find mount.cifs command.

To mount while booting you will required to add its entry under fstab file

example:

`//10.10.*.*/folder/to-share /mountpoint cifs username=harry,password=XXXXXX,rw,user 0 0`

or

`//10.10.*.*/folder/to-share /mountpoint cifs credentials=/root/.smbfile,rw,user 0 0`

.smbfile > add Windows machine credentials

username=harry
password=XXXXXX

with the help of above entries you can change your scripts accordingly.

You may also use autofs

Find the 'CIFS' alternatives links:

Mount Linux NFS Share on Windows 7​ http://www.hackourlife.com/mount-linux-nfs-share-on-windows-7/

How to install Client for NFS on Windows for a UNIX-to-Windows migration http://support.microsoft.com/kb/324055

NFS client for Windows 7 (Microsoft Community) http://answers.microsoft.com/en-us/...indows-7/42aae25d-d077-4ff9-abdf-7314a589c46d

Utilities and SDK for Subsystem for UNIX-based Applications in Microsoft Windows 7 and Windows Server 2008 R2 http://www.microsoft.com/en-us/download/details.aspx?id=2391

Share:
35,412

Related videos on Youtube

PathFinder
Author by

PathFinder

Computer Science Student

Updated on September 18, 2022

Comments

  • PathFinder
    PathFinder over 1 year

    It may look like it is duplicate question but in context of RHEL 7, it is not.

    As RHEL 7 does not have mount.cifs binary present in /sbin, I want to know what else can be done to mount windows cifs share on Linux machine.

    cifs mounts the windows share for sometime and as required I can unmount it. I do not want cifs share to be mounted at boot time. My script shouls do mount and unmounts operations for me.

    Suggestions are welcome.

    Thanks

  • PathFinder
    PathFinder over 9 years
    About company policy: I downloaded iso from Red hat network. I have installed it on my virtual machine.