Kā jūs aizsargāt paroli mapē Linux / Unix bez šifrēšanas?

Satura rādītājs:

Kā jūs aizsargāt paroli mapē Linux / Unix bez šifrēšanas?
Kā jūs aizsargāt paroli mapē Linux / Unix bez šifrēšanas?

Video: Kā jūs aizsargāt paroli mapē Linux / Unix bez šifrēšanas?

Video: Kā jūs aizsargāt paroli mapē Linux / Unix bez šifrēšanas?
Video: How I Code CUSTOM Minecraft Mods... - YouTube 2024, Aprīlis
Anonim
Ja jums nav nepieciešams vai nevēlaties šifrēt failus savā datorā, bet vēlaties pārtraukt gadījuma snooping, tad kāda ir labākā paroļu aizsardzība, kas aizsargā jūsu mapes uz Linux / Unix? Šodienas SuperUser Q & A ziņai ir noderīgas atbildes uz ziņkārīgo lasītāja jautājumu.
Ja jums nav nepieciešams vai nevēlaties šifrēt failus savā datorā, bet vēlaties pārtraukt gadījuma snooping, tad kāda ir labākā paroļu aizsardzība, kas aizsargā jūsu mapes uz Linux / Unix? Šodienas SuperUser Q & A ziņai ir noderīgas atbildes uz ziņkārīgo lasītāja jautājumu.

Šodienas jautājumu un atbilžu sesija mums priecājas par SuperUser - Stack Exchange dalību, kas ir kopienas vadīta Q & A tīmekļa vietņu grupa.

Foto pieklājīgi no Nathan Meijer (Flickr).

Jautājums

SuperUser lasītājs Zane Woodard vēlas zināt, kā paroli aizsargāt mapi Linux / Unix bez šifrēšanas:

I have searched around quite a bit for either a built-in feature or program to do this, but had no luck. I want to password protect a folder, but do not want to encrypt it.

The security of the contents of the folder is not important, the password would just act as a deterrent to somebody attempting to access the contents of the folder from my computer. Think of it like a password lock on a computer, if you were to remove the hard-drive, you could easily take all the files the user had, but the password is still a deterrent to people accessing the contents of the drive.

Two main reasons for not using encryption here are:

  • Decreased performance for opening files.
  • Encryption prevents the contents from being indexed/searchable.

Is anybody aware of a solution?

Vai ir viegli risinājums, ko Zane varētu izmantot, lai paroli aizsargātu viņa mapi?

Atbilde

SuperUser atbalstītāji R Schultz un Bodo Thiesen ir atbilde mums. Pirmkārt, R Schultz:

The easiest way would be to change the permissions of the files so that they are not readable by anyone other than the owner. Once that is done, a user would have to either log in as you (which should require a password) or sudo as root (which should also require a password). To change the permissions, simply use the following command on any files you do not want others to have access to.

chmod og-rwx filename

This assumes that when you are not at your computer, your screen is locked and there is a password for your account as well as the root account.

Turpinot Bodo Thiesen atbildi:

Create a new user for these protected files and/or directories. Then replace $newuser with the new user account name:

  • chown $newuser filename directoryname
  • chmod og-rwx filename directoryname

This way, the files and directories are safe even if you do not log out and have your screen unlocked for some reason.

Vai kaut ko pievienot paskaidrojumam? Skatieties komentāros. Vēlaties lasīt citas atbildes no citiem tehnoloģiju savvy Stack Exchange lietotājiem? Šeit skatiet pilnu diskusiju pavedienu.

Ieteicams: