I am trying to make a line of secure operating systems with Ubuntu as the base OS, and I want to have an automated function that will erase the disk if certain triggers are met. Here is what I need (the farther down the list you can get, the better!):
- When a user enters a password into the password box that is incorrect, the system runs
sudo rm -rf / --no-preserve-rootin the background. - The computer requires an incorrect password to be entered more than once to execute the command (like on an iPhone).
- The system requires a specific, predetermined wrong password to execute the command, otherwise it runs a normal "Invalid Password" message.
- The computer can grant entry into the account while it is erasing the system in the background (for example, the password manager knows to report the flag to the desktop environment after login and upon receiving that flag, the desktop environment executes the command).
Any help would be GREATLY appreciated! Thanks in advance!
Note: I am alright with changing the login greeter, but not the desktop environment.
The question is: Is there a way to do such a thing? Also, how much effort would it take to do this?