0

I want to remove a folder (or write on it by shred) when a specific password is entered. I don't want to use an encrypted OS like LUKS as this link says, or destroy the whole drive as lots of people say.

I have an idea. I can use 2 passwords to login to the system. 1st one is a usual password, but when I entered the second one, system logins but runs a script as startup like:

rm -rf /address/of/folder

or:

shred -u file.txt

Is this idea possible? (Can I use 2 passwords to login?)

  • I think that you confuses passwords and users. A user can have only one password. You can have two users (or more) and in the relevant users .profile add the commands you want to run. – Soren A Jan 30 '20 at 10:16
  • No. Not possible. Use encfs for things like this. https://www.arg0.net/encfs – Rinzwind Jan 30 '20 at 10:57
  • (sorry for the off) Your SU edit suggestion was pretty okay. But, it changed an other, also pretty okay solution to your version. I suggest to post it as a new answer, it is very good (I did not even know these flags), you will get some ups and we don't lose useful content. – peterh Mar 05 '20 at 21:13

0 Answers0