Problem with command mount

Hi,

I have a problem with the command mount with a password with special character

mount -t smbfs '//itransfert_cs:password@IP/itransfert/1-Arrivees/Vers_K2' /share

the password contain a * and a @

I try to quote but don't work, replace the @ with %40 and try to escape with \ but don't work...
I don't understand...
I'm working with apple bash

I once had issues with my apple and it came from its internal firewall... have you checked?
Then using @ in a passwd is far from being a good idea... on HP it means erase the buffer ( the typed line ...) until you are logged and have stty set...

vbe, i can mount this folder in a applescript but not in a script shell, the @ and the * in the password is impose.
It is impose by my company.
thx

try:

mount -t smbfs //itransfert_cs:pa\*sswor\@d@IP/itransfert/1-Arrivees/Vers_K2 /share
or
mount -t smbfs //itransfert_cs:"pa\*sswor\@d"@IP/itransfert/1-Arrivees/Vers_K2 /share

or using a variable PASSW=password and use $PASSW

i already test your 2 suggests and the variable but don't work

thx

that means without single quotes... what error message do you get then?

You could try using the -N option, and storing the password in a file (which from a security perspective alone, has to be preferable?)

Scott I really think we should wait to see what error message is produced... coming back to the essential, to mount you should be root no? What difference is there between a smbfs and a NFS fs from a unix point of vue when it comes to mount? To me I see no real difference so I am wondering if the user/passwd that you usually never give when you mount -t is the real issue... but I may be wrong had too much wine and fighting with a strange date bug (with cal extract in a script between AIX and HP (same script result are different and one runs the 31 and the other the 1rst Jan, days off here...)

OK :slight_smile:

BTW, you don't need to be root to use mount.

$ who am i
scott    ttys001  Dec 18 20:51 

$ uname -a
Darwin Scotts-iMac.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

$ mount -t smbfs //scott:scott@vma/scott /Users/scott/remote

$ ll /Users/scott/remote
total 34
dr-xr-xr-x   2 scott  staff  16384 Dec 20 13:50 .
drwxr-xr-x+ 56 scott  staff   1904 Dec 20 13:55 ..
-r--r--r--   1 scott  staff     10 Dec 20 13:50 hello_from_vma.txt
1 Like