8

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.

ᄂ ᄀ
  • 208
tftd
  • 1,560

5 Answers5

9

try escaping the $ character with a \

mount -t smbfs -o username=MyUsername //10.0.0.2/D\$ /mnt/machine_1_d
ᄂ ᄀ
  • 208
dc5553
  • 342
5

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
ThatGraemeGuy
  • 15,788
5

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

dePablo
  • 111
0

To enable access to administrative shares you may also need to "disable UAC remote restrictions". This can be done with the LocalAccountTokenFilterPolicy registry key:

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\ /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1
mivk
  • 4,924
0

I would add a line for that purpose to /etc/fstab file:

//10.0.0.2/d$/ /mnt/documents cifs noserverino,rw,iocharset=utf8,password=xxxxxxxxxx,username=user_with_administrative_rights,domain=my_windows_domain 0 0

After saving changes to this file, mount the file system by means of the command mount -a.

In this case the option rw allows the directory to be read-write, otherwise it should have the option ro.

Thomas
  • 4,415