Characters That Cannot Be Used In A CIFS Program-Type Automount

Solution In Progress - Updated -

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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content