I didn't know that the update process deletes directories like /root and /opt - otherwise I would have backed up these dirs and configured sshd to accept passwords…
What I did before update to secure my NAS in the internet: I configured authorized_keys for root to accept certificates then I disabled sshd_conf to disable password authentication:
Now after the update the whole /root dir is empty and therefore no authorized_keys can be read for authentication / ssh auth for user root will fail.
I'm still able to login as a normal user since this dir is not deleted but there is no 'su' available to get root this way.
Does anybody have an idea how I can work around this?
- Maybe using the update mechanism?
- copying an 'su' binary and execute that?
Is there any backdoor to upload/overwrite files in /etc ?
Any file which is writeable for normal users and executed during boot?
Any help is very, very welcome!