0

I have been given access to a network share on a Windows 2000 server, which I need to access from a CentOs 7 machine.

I have created the credentials file:

username=MYUSER
password=MYPASS
domain=DOMAIN

and I can list the share correctly:

[root@localhost ~]# smbclient -L //share.domain.com -E -A /root/.credentials
Domain=[DOMAIN_NT_DOM1] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
...

Even though sometimes I get an intermittent error saying:

Connection to share.domain.com failed (Error NT_STATUS_IO_DEVICE_ERROR)
NetBIOS over TCP disabled -- no workgroup available

I can even copy the files locally with the -Tc switch.

However, when trying to mount the share, I get a "permission denied" error:

[root@localhost ~]# mount.cifs //share.domain.com/folder/folder2 /root/shared -o 'credentials=/root/.credentials,sec=ntlmv2' -v
domain=domain.com
mount.cifs kernel mount options: ip=172.16.70.4,unc=\\share.domain.com\folder,sec=ntlmv2,user=MYSUER,,domain=domain.com,prefixpath=folder2,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Why can I list and tar files with smbclient but cannot mount the share?

11
  • Are you sure that your server uses "ntlmv2" as the authentication protocol?
    – testeaxeax
    Commented Jul 25, 2017 at 13:58
  • Actually, no, but I have tried them all, the result is always the same. Commented Jul 25, 2017 at 14:05
  • Just to be sure you tried all possible parameters of "sec" as listed in your local manual accessible through man mount.cifs?You could also try to set the option "vers" to "1.0", "2.0", "2.1", "3.0", maybe you're using the wrong protocol version.
    – testeaxeax
    Commented Jul 25, 2017 at 14:27
  • Yes, tried all possible combinations of sec and vers, error message went from Permission denied to Operation not supported or Unknown error 524, still no good. Commented Jul 25, 2017 at 15:22
  • Why do your errors show that domain=domain.com?Shouldn't it be domain=BERCO_NT_DOM1 as shown by smbclient(Domain=[BERCO_NT_DOM1] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager])?
    – testeaxeax
    Commented Jul 25, 2017 at 15:45

1 Answer 1

2

The problem was fixed by removing the domain option from the mount.cifs command or rather by removing it from the credentials file.

Example:

In the credentials file before modification:

username=MYUSER  
password=MYPASS  
domain=DOMAIN

In the credentials file after modification:

username=MYUSER  
password=MYPASS  

Before command modification:

mount.cifs //share.domain.com/folder/folder2 /root/shared -o username=yourusername,sec=yourauthprotocol,domain=yourdomain

After command modification:

mount.cifs //share.domain.com/folder/folder2 /root/shared -o username=yourusername,sec=yourauthprotocol

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .