Tuesday, 16 February 2021

SAMBA:- How to fix CIFS Error Mount: wrong fs type, bad option, bad superblock

Test Case:- We have tried to mount the samba share from the Linux samba-client box.


 [root@san-client ~]# findsmb

                                *=DMB

                                +=LMB

IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION

---------------------------------------------------------------------

192.168.1.113   ANSIBLE-CONTROL [       SAMBA         ]

[root@san-client ~]#


[root@san-client ~]# smbclient -L //192.168.1.113

Enter SAMBA\root's password:

Anonymous login successful

        Sharename       Type      Comment

        ---------       ----      -------

        print$          Disk      Printer Drivers

        noc             Disk      Printer Drivers

        IPC$            IPC       IPC Service (Samba 4.10.16)

Reconnecting with SMB1 for workgroup listing.

Anonymous login successful

        Server               Comment

        ---------            -------

        Workgroup            Master

        ---------            -------

        SAMBA


[root@san-client ~]# mount -t cifs //192.168.1.113/noc /mnt -o user=sai1

mount: wrong fs type, bad option, bad superblock on //192.168.1.113/noc,

       missing codepage or helper program, or other error

       (for several filesystems (e.g. nfs, cifs) you might

       need a /sbin/mount.<type> helper program)

       In some cases useful info is found in syslog - try

       dmesg | tail or so.

[root@san-client ~]#


Solution:-

[root@san-client ~]# rpm -qa |grep cifs

[root@san-client ~]#


[root@san-client ~]# yum install cifs-utils

.....

.....

  Installing : cifs-utils-6.2-10.el7.x86_64                                                                                          1/1

  Verifying  : cifs-utils-6.2-10.el7.x86_64                                                                                          1/1


Installed:

  cifs-utils.x86_64 0:6.2-10.el7


Complete!

[root@san-client ~]#mount -t cifs //192.168.1.113/noc /mnt -o user=sai1

Password for sai1@//192.168.1.113/noc:


[root@san-client ~]# cd /mnt

[root@san-client mnt]#ls -l

total 0

-rwxr-xr-x 1 root root 0 Feb 15 22:06 abc1

-rwxr-xr-x 1 root root 0 Feb 15 22:06 abc2

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam1

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam2

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam3

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam4

drwxr-xr-x 2 root root 0 Feb 15 22:07 sam5

[root@san-client ~]#




No comments:

Post a Comment