So I needed to change the current password on my system and I found this article. It works but now I'm afraid about security issues. Is there a way to add an extra security level to prevent my password to be changed from recovery mode?
You could use encrypted disks which would require entering a decryption password for any access. For example see https://www.maketecheasier.com/encrypt-hard-disk-in-ubuntu/
Apart from this you cannot prevent someone with physical access to your computer to read or modify data on your hard disk. If you disable the recovery mode, it is still possible to boot a Linux system from DVD or USB media or to take the hard disk and connect it to a different computer.
When some one has physical access to your computer, they don't need a password.
- They can just read the disk.
- They can compromise the machine: e.g. copy encrypted disk, and install a bot to capture your password, and send it to them. They can use this to decrypt the disk.
However it is best to disable recovery mode, and add a firmware-boot (BIOS) password. So that they would have to take the lid off.