From which version did you upgrade ?
I think in your history of openhab you had an openhabian instalation that once was based on openhab2.
So you either upgraded from 2.x to 4.x or the route via 2.x to 3.x and then to 4.x.
The openhabian account you use has a shell script that is being source while you login.
The script still uses code that is base on the openhab 2 instance and thus uses the path openhab2 instead of openhab.
This can be fixed in the scripts in files of that account.
Did you initially create an administrator account ?
sed: can’t read /var/lib/openhab2/etc/version.properties: No such file or directory
does not appear anymore.
The problem still exists that if I open on firefox http://openhabian:8080 the icon on the lower left side (Unlock administration) does not work. Any suggestion what I can do?
Use the browsers web developer console to check
a) if by clicking on the lock symbol network traffic is generated
b) if there is any error message shown in the web console