Characters That Cannot Be Used In A CIFS Program-Type Automount
Issue
A customer wants to setup an automount CIFS mount point of type program. See "map-type" in the auto.master(5) man page. To this end, /etc/auto.master contains:
/mnt/executable /etc/testmap.sh
and /etc/testmap.sh contains:
#!/bin/bash
echo '-fstype=cifs,nocase,rw,file_mode=0660,dir_mode=0775,vers=3.02,user=cifsuser,password=pass\\\&word \'
echo ' /cifsmnt ://cifsserver.example.com/test'
The customer can escape most special characters (like the ampersand in the above example), but there are three that will not escape correctly: the comma (,), the single-quote (') and the double-quote (").
Environment
- Red Hat Enterprise Linux 7
- autofs
- CIFS
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
