Unable to Mount Windows Server 2016 Shared Folders from RHEL 7.7

Asked 1 years ago, Updated 1 years ago, 308 views

Subject: Windows Server 2016 shared folder cannot be mounted due to the following error:

environment
Windows Server 2016
RHEL 7.7

execution command

mount-t cifs//XXX.XXX.XXX.XXX/XXX_test/root/work/cifs\
    -o username=XXXX_testuser, password=XXXXX, sec="ntlmv2", vers="2.1"

error message

 mount error(13): Permission denied
Refer to the mount.cifs(8) manual page(e.g.man mount.cifs)

We have checked the settings below for possible causes.

·Set individual Windows accounts for setting access rights to shared folders
·Set access rights to shared folders to the target Windows account
·Grant sharing setting authority (full control)
·Open port 445 used by samba
·Install CIFS and SMB
·Specify sec options

I was investigating this incident on the Internet, but I couldn't solve the problem, so I asked you a question.

linux rhel windows-server

2022-09-30 21:51

2 Answers

In my environment, I tried to go to Ubuntu 20.04 LTS for a shared folder in Windows 10, and I thought about the same command for half a day and solved it now, but when I looked closely at the site below, it clearly said, "Samba-client and cifs-utils are not installed."

Access the shared folder in windows from Ubuntu

I deleted them because I put them in.

$sudo apt remove samba-client
$ sudo apt remove cifs-utils

The mount command was then executed without errors.
I also had a good view of Windows shared folders.


2022-09-30 21:51

mount error(13):permission denied
Refer to the mount.cifs(8) manual page(e.g.man mount.cifs)

I don't know why, but try changing the options below to see if you can connect:

  • username=USERNAME, password=PASSWORD, domain=DOMAIN
  • username=DOMAIN/USERNAME, password=PASSWORD
  • username=DOMAIN/USERNAME%PASSWORD
  • vers=1.0
  • vers=2.0
  • vers=3.0
  • sec=none
  • sec=krb5
  • sec=krb5i
  • sec=ntlm
  • sec=ntlmi
  • sec=ntlmv2
  • sec=ntlmv2i
  • sec=ntlmssp
  • sec=ntlmsspi

As a rule of thumb, it seems that the options required for Windows version, domain or workgroup, Windows Update, etc. will change.Also, there were times when I was in the "waiting reboot" state after Windows Update and I was unable to connect.If possible, you might want to restart Windows Server just in case.


2022-09-30 21:51

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.