Search code examples
bashubuntucifs

Mounting a Windows hidden share in /etc/fstab. How do I escape the $


If I want to mount a Windows hidden share to my Ubuntu filesystem, I do this and it works just fine:

mount –t cifs –o username=root,password=rootpassword,uid=www-data,gid=www-data //domain/dir\$ /mnt/dir

But when I try to make an entry into /etc/fstab, escaping the "$" doesn't work:

//domain/dir\$ /mnt/dir cifs credientials=/path/to/credentials,uid=www-data,gid=www-data   

My syntax should be otherwise correct as I'm able to mount using fstab other non-hidden Windows directories from the same server.

How do I escape that "$" in fstab?


Solution

  • Actually, it turns out you simply don't have to escape the $ in /etc/fstab.