Posted on 05-05-2022 02:34 PM
Hallo Everyone
I am struggling with the mount command for some times now. I can't mount our Distribution Point, as we have a unique username. to scape a special charactor in password, we use the command this way: mount_smbfs //user:"password"@server /mount path which work like a charm. But this doesn't work for the username.
this is how our username looks like: SA_JSS_XXXXX@sss0000.share.com
using command like:
mount -t smbfs //username:password@jss.company.com/ /Volumes/test/
mount -t smbfs //"username":password@jss.company.com/ /Volumes/test/
mount -t smbfs //'username':password@jss.company.com/ /Volumes/test/
mount -t smbfs //sss0000.share.com;SA_JSS_XXXXX:password@jss.company.com /mount path
didn't work for me
Can someone tell how I can escape this?
Thanks
05-05-2022 10:25 PM - edited 05-05-2022 10:31 PM
using password in plain text is not safe. You should use https://github.com/kc9wwh/EncryptedStrings to (en/de)crypt passwords
05-06-2022 06:26 AM - edited 05-06-2022 06:27 AM
I would try either quoting the entire string, putting it in as a variable, or both.
mount -t smbfs "//username:password@jss.company.com/" /Volumes/test/
USERNAME="username"
PASSWORD="password"
mount -t smbfs //"$USERNAME":"$PASSWORD"@jss.company.com/ /Volumes/test/
USERNAME="username"
PASSWORD="password"
mount -t smbfs "//$USERNAME:$PASSWORD@jss.company.com/" /Volumes/test/
I agree with @sgiesbrecht that you will want to be careful with the passwords.