If you are trying to establish static CIFS (aka SMB) mounts on your Mac, here are a couple hints that might save some time and effort.
If you need to specify the domain (say, if you are using Active Directory credentials), you need to escape the semicolon that divides the domain and the username. So if your map file is /etc/auto_smb, then you could use something like this example.
You also need to escape the dollar sign if have such a character on your remote server's sharepoint (plus any funky characters in your password). Thanks Adam! If you do not, you'll get errors like
and the icon in the Mac's Finder will be a broken alias. Note that you may need to enable verbose logging (which isn't terribly verbose) in /etc/autofs.conf file to get these messages in your system.log file.
If you're using mount_smbfs (or mount -t smbfs) via command line, on the other hand, it's unnecessary to escape the trailing $, but acceptable.
It would seem that your autofs map file could have the username, domain and password configured on a different file, as measure of security. This is normally done like this:
But that will result in an error message, like
...so it's important to safeguard the map file if you're going to expose the credentials in plain text (chown root:wheel and chmod to 600).
In the man page for mount_smbfs, the wording suggests we could use the -N flag to bypass a password prompt and instead have mount_smbfs consult /etc/nsmb.conf. It says, "
However, the man page for nsmb.conf gives no indication that the password could be a valid key.

I can't thank you enough for this post. I was having this issue for while & couldn't figure out a solution. I usually use this for Microsoft Windows where known as Microsoft Windows Network. I was almost ready to give up when I read this post. Thanks again for this invaluable resource.
Cheers,
Ahmad Merdang