How to mount a windows administrative share on linux via SMB

33,742

Solution 1

tftd,

try escaping the $ character with a \

mount -t smbfs -o username=MyUsername //10.0.0.2/D\$ /mnt/machine_1_d

dc

Solution 2

Administrative shares in Windows are named with the volume letter first, then the '$' symbol, not the other way around.

C: --> C$

D: --> D$

sudo mount -t smbfs -o username=graeme,domain=example //server.example.com/C$ /mnt/bla

Solution 3

My issue was related to: "mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)" For me the solution was adding key to regedit in Window. Below is my answer in other topic: https://serverfault.com/a/619963/237340

Share:
33,742

Related videos on Youtube

tftd
Author by

tftd

Updated on September 18, 2022

Comments

  • tftd
    tftd over 1 year

    I'm currently trying to mount a windows shared drive under linux. The machine is using windows 7 and by default it shares all windows drives if you login as an administrator. I've been able to login and list/copy/delete files via my android phone but I'm having a problem with mounting it on a server.

    The command I'm trying:
    mount -t smbfs -o username=MyUsername //10.0.0.2/$D /mnt/machine_1_d

    I think the problem comes from the $ sign in $D. I just can't remember what was the fix for this. I'm sure it was something really simple but I can't find it on the net also.

    • Khaled
      Khaled about 12 years
      I think it should work if you just write the visible name instead of $D.
    • Smock
      Smock over 4 years
      Don't admin shares (for drive letters) have the dollar after the letter? e.g. D$ ... Just seen your comment on another answer - perhaps you should state yours are a different way around ?
  • tftd
    tftd about 12 years
    Also it appears you can do it like this mount -t smbfs -o username=MyUsername "//10.0.0.2/$D" /mnt/machine_1_d. This also appears to be working properly. Thanks!
  • tftd
    tftd about 12 years
    Yes that's correct. In my case, though, it's the other way around. I don't know why. I guess the admin has done some custom settings or something...
  • Avindra Goolcharan
    Avindra Goolcharan over 9 years
    This was also my issue. I was so close to getting to my laptop Windows share from servers at work. Another day....
  • Greg Bray
    Greg Bray over 6 years
    Can set via PowerShell: Set-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Sys‌​tem\ -Name LocalAccountTokenFilterPolicy -Value 1
  • Hafizur Rahman
    Hafizur Rahman almost 6 years
    @tftd I assume you meant '//10.0.0.2/$D' (with single quotes). Otherwise bash would resolve $D to an empty string. In other words, "//10.0.0.2/$D" would resolve to "//10.0.0.2/", unless you happened to have an environment variable called D.