Lakka 4.2 - Escaping special characters password when mounting a NAS

Greetings! I’ve been trying to setup Lakka to mount my CIFS/SMB NAS as described in the docs https://www.lakka.tv/doc/Serving-ROMs-from-a-NAS/

$ cat /storage/.config/system.d/storage-roms-nas.mount
    [Unit]
    Description=cifs mount script
    Requires=network-online.service
    After=network-online.service
    Before=retroarch.service

    [Mount]
    What=//192.168.0.31/roms
    Where=/storage/roms/nas
    Options=username=myusername,password=mypass,word,rw
    Type=cifs

    [Install]
    WantedBy=multi-user.target

The problem is that my password contains special characters, so systemd reads “password=mypass,word” as “password=mypass”, and “word” as a separate option. I tried to use a separate credentials file like this one but systemd doesn’t recognize the credentials option:

$ cat /storage/.config/system.d/storage-roms-nas.mount

    ..
    Options=credentials=/storage/.config/system.d/credentials.ini,rw
    ..

$ cat /storage/.config/system.d/credentials.ini
    username=myusername
    password=mypass,word
    domain=MYDOMAIN

Have you tried this: mypass,word ? The \ should followed special characters to avoid the system from reading it as command. I hope that helps

1 Like

Shouldn’t the \ precede the special character like mypass\,word?

As an alternative… why exactly can’t you just change your password?