天天看點

NT_STATUS_ACCESS_DENIED and mount error(13): Permission deniedSummaryProblemSolutionReference

  • Summary
  • Problem
    • smbclient display
    • Error access by smbclient
    • Error to mount by cifs
  • Solution
    • change the Windows 10 regedit table
    • result
  • Reference

Summary

I was trying to use smbclient to display and access Windows 10 hidden shared folder from RHEL6.3, smbclient command encountered

tree connect failed: NT_STATUS_ACCESS_DENIED

error, when mount through cifs, encountered

mount error(13): Permission denied

error. Finally resolved this issue through changing the Windows 10 regedit table.

Problem

smbclient display

When smbclient display, no issue,

[[email protected] ~]# smbclient -L //192.168.232.1 -U xionghuilin
Enter xionghuilin's password:
session request to  failed (Called name not present)
Domain=[LENOVO-XHL-PC] OS=[Windows  Pro ] Server=[Windows  Pro ]

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Remote Admin
    C$              Disk      Default share
    D$              Disk      Default share
    IPC$            IPC       Remote IPC
    print$          Disk      Printer Drivers
    Users           Disk
session request to  failed (Called name not present)
session request to  failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
NetBIOS over TCP disabled -- no workgroup available
[[email protected] ~]#
           

Error access by smbclient

[[email protected] ~]# smbclient //192.168.232.1/C$ -U xionghuilin
Enter xionghuilin's password:
Domain=[LENOVO-XHL-PC] OS=[Windows  Pro ] Server=[Windows  Pro ]
tree connect failed: NT_STATUS_ACCESS_DENIED
[[email protected] ~]#
           

Error to mount by cifs

change password to 123456

C:\WINDOWS\system32>net user xionghuilin 123456
The command completed successfully.
           

mount error(13): Permission denied

[[email protected] ~]# mount -t cifs -o user=xionghuilin%123456 //192.168.232.1/ADMIN$ /smb
mount error(): Permission denied
Refer to the mount.cifs() manual page (e.g. man mount.cifs)
           

Solution

change the Windows 10 regedit table

Through google, resolved this issue by change the regedit table, refer to Link1 and Link2.

Create new regedit table entry,

Key goes in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Policies\System

Key DWORD (32-bit): LocalAccountTokenFilterPolicy

Key Value : 1

As below screenshot shows,

NT_STATUS_ACCESS_DENIED and mount error(13): Permission deniedSummaryProblemSolutionReference

result

smbclient

[[email protected] ~]# smbclient //192.168.232.1/ADMIN$ -U xionghuilin%123456
Domain=[LENOVO-XHL-PC] OS=[Windows  Pro ] Server=[Windows  Pro ]
smb: \> dir
cli_list_new: Error: unable to parse name from info level 
  .                                  DA          Wed Jan  :: 
  ..                                 DA          Wed Jan  :: 
  addins                              D          Sat Jul  :: 
cli_list_new: unable to parse name from info level 

         blocks of size   blocks available
           
[[email protected] ~]# mount -t cifs -o user=WORKGROUP/xionghuilin%123456,sec=ntlmv1 //192.168.232.1/ADMIN$ /smb --verbose
mount.cifs kernel mount options: ip=,unc=\\\ADMIN$,sec=ntlmv1,ver=,user=xionghuilin,domain=WORKGROUP,pass=********
[[email protected] ~]# ls /smb
addins                            Globalization          PolicyDefinitions       SSW0E58417.SSW0F96302
appcompat                         Help                   Prefetch                symbols
AppPatch                          HelpPane.exe           PrintDialog             Synaptics.log
AppReadiness                      hh.exe                 Professional.xml        Synaptics.PD.log
assembly                          IME                    Provisioning            SYSINFO.TXT
bcastdvr                          ImmersiveControlPanel  regedit.exe             System
bfsvc.exe                         INF                    Registration            System32
BitLockerDiscoveryVolumeContents  InfusedApps            RemotePackages          SystemApps
Boot                              InputMethod            rescache                system.ini
bootstat.dat                      Installer              Resources               SystemResources
Branding                          L2Schemas              RtCamU64.exe            SysWOW64
CbsTemp                           LiveKernelReports      RtlExUpd.dll            TAPI
comsetup.log                      Logs                   RtsCM64.exe             Tasks
CoreSingleLanguage.xml            Media                  RtsCM64.xml             Temp
CSC                               MediaViewer            SchCache                ToastData
CSUP.TXT                          MEMORY.DMP             schemas                 tracing
Cursors                           MFGSTAT.zip            S.dirmngr               twain_32
debug                             mib.bin                security                twain_32.dll
diagerr.xml                       Microsoft.NET          ServiceProfiles         vpnplugins
diagnostics                       Migration              servicing               Vss
diagwrn.xml                       MiracastView           Setup                   Web
DigitalLocker                     ModemLogs              setupact.log            WIN8_1_64
Downloaded Installations          notepad.exe            setuperr.log            WindowsShell.Manifest
Downloaded Program Files          OCR                    ShellExperiences        WindowsUpdate.log
DPINST.LOG                        ODBC.INI               ShellNew                winhlp32.exe
DtcInstall.log                    Offline Web Pages      SKB                     win.ini
ELAMBKUP                          Panther                SoftwareDistribution    WinSxS
en-GB                             PCHEALTH               Speech                  WMSysPr9.prx
en-US                             pear.ini               Speech_OneCore          write.exe
explorer.exe                      Performance            splwow64.exe            zh-CN
Fonts                             PFRO.log               SQL9_KB960089_ENU
GameBarPresenceWriter             PLA                    SQLTools9_KB960089_ENU
[[email protected] ~]#
           

Reference

1,Unable to mount windows share in ubuntu

2, Issue Mounting CIFS Share

繼續閱讀