I would like (using Ubuntu 18.04) to save my Wifi password and a static IP on an OSMC disc image before "burning" this image to an SD card to be used in my raspberry pi 3.

The reason is that I have a fairly long and not particularly human legible Wifi password and a rather terrible keyboard on the pi.

I have done this before on a raspberry 2 and XBMC, but I do not remember how...


Network passwords are stored in /etc/NetworkManager/system-connections and you can create a static IP for your device by changing your /etc/network/interfaces file to something like below:

# The wifi network interface
auto wlan0
iface wlan0 inet static
    wpa-ssid <Your wifi network SSID>
    wpa-psk <Your hex encoded wifi WPA password>

Then you can create your image of the system.

  • That's not correct for wifi. You haven't specified the SSID and, if needed, WPA2 password. It is unlikely that the wifi interface is eth0. – chili555 Mar 16 '18 at 19:43
  • Oh, yeah, sorry, I misread that. I updated it to show what a wifi interface might look like. – Rob Mar 17 '18 at 0:13
  • 1
    The interfaces file expects to see the WPA2 password in clear text, not hex encoded. Also, network and broadcast are not needed. – chili555 Mar 17 '18 at 1:06
  • I need to do this on the image before burning it to the sd card. So how do I modify the image? – Bruni Mar 19 '18 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.