Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
I think it should work if you just write the visible name instead of $D. –  Khaled Apr 25 '12 at 14:44
    
The name of the shared folder is $D (if that's what you meant) :) –  tftd Apr 25 '12 at 14:46
    
tftd, You might want to change the name of the question to "How to mount a windows administrative share on linux via samba" for the next guy to find it. –  dc5553 Apr 25 '12 at 14:51
add comment

2 Answers

up vote 4 down vote accepted

tftd,

try escaping the $ character with a \

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

dc

share|improve this answer
    
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 Apr 25 '12 at 14:57
add comment

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
share|improve this answer
    
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... –  tftd Apr 26 '12 at 14:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.