Basic Pi install problem

Hello and thanks for suffering a newbie,

I’m trying to install OpenHab 1.3 from the image at

Install eventually completes and UI available on port 8080.
Can’t ssh in as openhabian, only as pi/raspberry.

Have tried the obvious, power supply, quality SD cards, both Pi0W and Pi2. Same results.

After a look at the boot log, it seems that pretty much the first thing of changing the user and password has failed.
Here’s the first bit of first-boot.log and my .conf file with just my test SSID added.

/boot/first-boot.log… (start of)

2017-04-10_09:59:08_UTC [openHABian] Starting the openHABian initial setup. This might take a few minutes.
2017-04-10_09:59:08_UTC [openHABian] If you see this message more than once, something went wrong!
2017-04-10_09:59:08_UTC [openHABian] Storing configuration... /etc/openhabian.conf: line 3: $'\r': command not found
/etc/openhabian.conf: line 7: $'\r': command not found
/etc/openhabian.conf: line 13: $'\r': command not found
/etc/openhabian.conf: line 19: $'\r': command not found
2017-04-10_09:59:09_UTC [openHABian] Changing default username and password... usermod: invalid user name 'openhabian^M'
usermod: user 'openhabian^M' does not exist
groupmod: invalid group name 'openhabian^M'
chpasswd: (user openhabian^M) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user openhabian^M) password not changed


# Modify your openHABian settings
# Handle with care, only touch if you need to!!


# Language and time. Be sure to set these to valid values
locales="en_US.UTF-8 de_DE.UTF-8"

# Wifi settings. An ethernet connection is recommended
# Requirement: RPi3, RPi0W, PineA64 or a supported external Wi-Fi dongle
# Uncomment and fill in your SSID and password

# vim: filetype=sh

If anyone can guide me in the right direction you will be my hero! - Thanks.

Brain Failure!. It’s version 2.1 that I’m trying to install.

Looks like there might be some extra character in the configuration file. See the “^M” in the log? It’s just a guess though.

The editor you’ve changed the openhabian.conf with modified the line endings of that file. I guess some ancient Mac editor but please name it here. What you need to do is start anew, then edit the file with any modern text editor

OK, that was Windows 7 notepad. I will edit with nano over ssh.
Thanks Thom for a really quick reply.
I feel I should have spotted that myself…

Editing the file on the RPi after booting is too late!

Use Notepad++ on Windows or install VS Code while you are at it, you’ll need it anyhow:

Thank you. Up and running now. Took 3hrs 40 m to boot up fully on my Pi2 with a decent internet connection.
Now using Notepad++ to edit files.

Looking forward to getting into the detail and integrating my big node-red system into OpenHab.