Why cannot I map a CIFS resource from PAM, if the password to map it contains punctuation symbols?

Document ID : KB000105218
Last Modified Date : 06/07/2018
Show Technical Document Details
Introduction:
It may happen that when we try to mount a CIFS resource as external storage from PAM, the mount operation do not succeed after a longer timer than expected and showing it as 'unmounted' even though no error is shown in the top of the pane. 
This occurs when the password used to access the CIFS resource contains one or more punctuation symbols.
 
Question:
Why cannot I map a CIFS resource from PAM, if the password to map it contains punctuation symbols?
Environment:
Any hardware or virtual appliance running any version of PAM Server.
Answer:
  • The PAM code uses the linux mount command to map the CIFS resources.
  • There is a limitation in the mount command in the linux platforms, for which some punctuation characters in the password parameter are not supported as they cause errors during the command parsing phase.
  • Description of password option in man mount.cifs explicitely says, that you cannot use comma-contained password in the command line.
  • So, it is highly recommendable not using punctuation symbols in the passwords which will be used to map CIFS resources from a linux computer.
Additional Information:
  • There are lots of documents related to this problem in the internet. Some of them are: