I followed the instructions to install openHABian on my Debian x86-64 server machine: openHABian | openHAB
Basically, I ran this script: openhabian-config unattended
Now my whole system is screwed up. I cannot even login anymore!
How do I get rid of openHABian, i.e., undo all the changes of the script?!
Do you have any other user on the system that you can use to login ?
If that is not the case I would use a linux rescue iso, boot it, mount your systems disk and edit file file etc/shadow to set a password. Then boot your linux instance again and check if you can get in.
Did you make any changes to openhabian.conf?
If not, did you try to login with username: openhabian, password: openhabian as these credentials are the defaults?
If you provided your own password in openhabian.conf try with password openhabian anyway.
This is the output of the installation process. Maybe it could give a clue:
sudo openhabian-config unattended
2024-10-02_21:11:42_CEST [openHABian] Checking for root privileges... OK
2024-10-02_21:11:42_CEST [openHABian] Updating Linux package information... OK
2024-10-02_21:11:47_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2024-10-02_21:11:48_CEST [openHABian] Setting timezone based on openhabian.conf... OK (Europe/Berlin)
sed: can't read /etc/default/openhab: No such file or directory
2024-10-02_21:11:48_CEST [openHABian] Setting locale based on openhabian.conf... OK (reboot required)
2024-10-02_21:12:23_CEST [openHABian] Setting hostname of the base system based on openhabian.conf... OK
2024-10-02_21:12:23_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2024-10-02_21:12:55_CEST [openHABian] Installing additional needed packages... FAILED
2024-10-02_21:12:56_CEST [openHABian] Adding slightly tuned bash configuration files to system... OK
2024-10-02_21:12:56_CEST [openHABian] Adding slightly tuned vim configuration file to system... OK
2024-10-02_21:12:56_CEST [openHABian] tailscale VPN installation... SKIPPED (no preauthkey defined)
2024-10-02_21:12:56_CEST [openHABian] Applying miscellaneous system settings... OK
2024-10-02_21:12:56_CEST [openHABian] Installing FireMotD required packages (bc, sysstat, jq, moreutils)... OK
2024-10-02_21:13:05_CEST [openHABian] Downloading FireMotD... OK
2024-10-02_21:13:11_CEST [openHABian] Installing FireMotD... OK
2024-10-02_21:13:11_CEST [openHABian] Generating FireMotD theme... OK
2024-10-02_21:13:22_CEST [openHABian] Setting up FireMotD apt updates count service... OK
2024-10-02_21:13:37_CEST [openHABian] Fetching OpenJDK 17... FAILED
2024-10-02_21:13:40_CEST [openHABian] Installing OpenJDK 17... FAILED
2024-10-02_21:13:41_CEST [openHABian] Beginning install of latest openhab release (stable repo)... OK
2024-10-02_21:13:41_CEST [openHABian] Adding required keys to apt... OK
2024-10-02_21:13:42_CEST [openHABian] Installing selected openHAB version... OK
2024-10-02_21:17:45_CEST [openHABian] Setting up openHAB service... OK
2024-10-02_21:17:45_CEST [openHABian] Creating dependencies to jointly start services that depend on each other... OK
2024-10-02_21:17:45_CEST [openHABian] Adding an openHAB dashboard tile for 'openhabiandocs'... OK
2024-10-02_21:17:46_CEST [openHABian] Restarting openHAB service the hard way to play it safe... OK
2024-10-02_21:18:46_CEST [openHABian] Getting initial openHAB configuration... SKIPPED (backup not found at /boot/initial.zip)
2024-10-02_21:18:46_CEST [openHABian] Activating the openHAB console on all interfaces... OK
2024-10-02_21:18:46_CEST [openHABian] Installing tailscale VPN... SKIPPED (no pre auth key provided)
2024-10-02_21:18:46_CEST [openHABian] Adding openHAB syntax to vim editor... OK
2024-10-02_21:18:47_CEST [openHABian] Adding openHAB syntax to nano editor... OK
2024-10-02_21:18:48_CEST [openHABian] Adding openHAB scheme to multitail... OK
2024-10-02_21:18:48_CEST [openHABian] Preparing openHAB folder mounts under '/srv/openhab-*'... OK
2024-10-02_21:18:51_CEST [openHABian] Setting up Samba network shares... OK
2024-10-02_21:18:52_CEST [openHABian] Setting up Samba service... OK
2024-10-02_21:18:53_CEST [openHABian] Installing Frontail prerequsites (NodeJS)... FAILED
2024-10-02_21:21:35_CEST [openHABian] Installing prerequisites for openhab_rules_tools (NodeJS)... FAILED
2024-10-02_21:21:35_CEST [openHABian] Skipping zram install on non-ARM hardware.
2024-10-02_21:21:35_CEST [openHABian] Beginning Mail Transfer Agent setup... SKIPPED (no configuration provided)
2024-10-02_21:21:35_CEST [openHABian] Beginning Network UPS Tools setup... SKIPPED (no configuration provided)
2024-10-02_21:21:35_CEST [openHABian] Applying file permissions recommendations... OK
2024-10-02_21:21:35_CEST [openHABian] Setting up automated SD mirroring and backup... SKIPPED (no configuration provided)
2024-10-02_21:21:35_CEST [openHABian] Cleaning up... FAILED
Are you logging in remotely? I am not experienced enough with ssh, but as I see the hostname has been changed maybe deleting and re-adding the connection details from your client might help?
Did you run first-boot.bash? I do not see any other place where the user “openhabian” is created except in first-boot.bash.
Did you add the user manually?
“openhabian-config unattended” does not create users.
Sorry, I was wrong. There is another function which adds openhabian user and is called by openhabian-config. It should have raised a warning if something went wrong. I have no idea.
Sorry that your first try with openhab results in a lockout of your server.
Please be patient. I am sure one of the maintainers will help you soon.
Not an expert, but I think Linux 10 is the “buster” OS. Note from the instructions on OS
Note with openHAB 4 and Java 17, buster and older distros are no longer supported and there’ll be issues when you attempt upgrading Java 11->17. Should you still be running an older distribution, we recommend not to upgrade the distro but to re-install using the latest openHABian image and import your config instead.
Since your log fails to install Java 17, that could be the issue. Might need to start over with Linux 11
I admit my advice is related to getting openhabian installed, not logging into a “hosed” server. IMO even if they are able to login, they will need to start over with a clean debian.
Yes, sure. In the meantime I rebooted a couple of times. Also in Debian’s recovery mode which did not change anything.
I’m afraid I would have to start over with a fresh Linux install. I have several other services running on my machine which I would have to configure again.
I find the explanation of openHABian quite misleading:
add openHABian just like any other software
It’s not quite like any other software. It did very fundamental changes to my system.
do you get any answer then you try to connect via ssh ?
how did you try to connect ( by using the old/new hostname or the servers IP address ) ?
did you try to use the openhabian account as well as your old known account that you used before you installed openhabian ? In case your root account has a password set did you try that ?
If all the above does not work I would suggest to create a life rescue boot medium ( usb stick, dvd/cd ). You can boot from that stick, the stick will not do any modification to your system.
In case you need a suggestion for that life boot iso I can provide one or the other.
It then can be used to examine your system.
The SSH server fails to start (red warnings during boot).
I took the hard disk and connected it to another machine to check the log files. I found in the auth.log
Oct 5 16:10:01 openhabian CRON[6229]: PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: cannot open shared object file: No such file or directory
Oct 5 16:10:01 openhabian CRON[6229]: PAM adding faulty module: pam_unix.so
Oct 5 16:10:01 openhabian login[470]: PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: cannot open shared object file: No such file or directory
Oct 5 16:10:01 openhabian login[470]: PAM adding faulty module: pam_unix.so
Oct 5 16:10:04 openhabian login[470]: FAILED LOGIN (1) on '/dev/tty1' FOR 'openhabian', Authentication failure
I checked and the file /lib/security/pam_unix.so exists. Seems the authentication modules are broken.