0

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?

sugapablo
  • 310
  • 2
  • 11
  • What error are you getting? It's not the typo in 'credientials', is it? – Kenney Dec 16 '15 at 14:47
  • mountall: mount /mnt/dir [6300] Terminated with status 32 The credentials, spelling, everything is identical to the non-hidden shares (shares that don't include a $ in the name) that worked fine. Only the two hidden ones failed. – sugapablo Dec 16 '15 at 14:58

2 Answers2

3

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

sugapablo
  • 310
  • 2
  • 11
0

Try octal escaping: "\044"

//domain/dir\044 /mnt/dir ...