mmcli --simple-connect script issue when username/password contains special characters
Amol Lad
Amol.Lad at 4rf.com
Thu Jul 14 07:07:22 UTC 2022
Hi,
Well, this sounds trivial but I'm having problem in using mmcli -simple-connect in a shell script when username or password contains "space" or double-quote
---
#!/bin/sh
apn="internet"
username="abc 123"
password="abc\" 456"
cliauth="pap"
iptype=IPv4
mmcli -m 0 --simple-connect="apn=$apn,ip-type=$iptype,allowed-auth=$cliauth,user=\"$username\",password=\"$password\""
---
I get below error when running the script:
Error parsing connect string: 'Unexpected content (456") after value'
I've tried many combinations but no success. Any suggestion will be helpful.
(I've using MM 1.18.8)
Thanks
Amol
-------------- next part --------------
Hi,
Well, this sounds trivial but I'm having problem in using mmcli -simple-connect in a shell script when username or password contains "space" or double-quote
---
#!/bin/sh
apn="internet"
username="abc 123"
password="abc\" 456"
cliauth="pap"
iptype=IPv4
mmcli -m 0 --simple-connect="apn=$apn,ip-type=$iptype,allowed-auth=$cliauth,user=\"$username\",password=\"$password\""
---
I get below error when running the script:
Error parsing connect string: 'Unexpected content (456") after value'
I've tried many combinations but no success. Any suggestion will be helpful.
(I've using MM 1.18.8)
Thanks
Amol
More information about the ModemManager-devel
mailing list