I'd like to join three ideas into one interesting and sometimes useful feature. There was a question about using multiple passwords earlier this year, but it didn't receive much attention. I'd like to ask the question again after showing an interesting and new way to use the feature. The three original posts I found to be interestingly combined were:
Basically I'd like to login to my account with two passwords and depending on the password I use, I would get a different content in my home directory. In a way I would get a cryptographically hidden account into my system. So the question is, is it possible to allow multiple passwords to log on to Ubuntu/Linux for the same user?
Best Answer
userPassword
can have more than 1 value.But there is NO way to distinguish between the 2 passwords after logon. The password is not kept in memory or set to a variable after the initial check so this ...
... is not going to be possible. What you want is pretty impossible anyways. Hiding is never a good method.
Besides that there are some commands that might be handy ...
chmod og-rwx {file}
will make the files only viewable by that user.attr -s hidden -V true {file}
.Hiding though is never a good method. "obscurity" is not a valid method for protecting data.
If these files are that important I would not store them on the machine and use an external medium like an USB stick. And only attach it when it is "safe".