Skip to content Skip to content


How to password protect files in Linux Kā ar paroli aizsargāt failus un Linux

LinuxSecurity

If you store important information on your Linux server and want to make sure it is for your eyes only you need to password protect these files. Ja jūs glabājat svarīgu informāciju par jūsu Linux servera un vēlaties, lai pārliecinātos, ka tā ir jūsu acis, tikai jums ar paroli aizsargāt šos failus. Let's see how you can do this with Linux. Let's redzēt, kā jūs varat izdarīt ar Linux.

First, pick a good password. Pirmkārt, izvēlēties labu paroli. There are a few websites on the Internet that help you generate strong passwords. Ir dažas tīmekļa vietnes, par internetu, kas palīdzēs jums radīt stipras paroles. Try and pick an alphanumeric password. Izmēģināt un izvēlēties burtciparu paroli. Something such as Rv7fkcxASW8h would be a good choice. Kaut kā Rv7fkcxASW8h būtu laba izvēle.

Now check to see if you have the package gpg installed on your computer. Tagad pārbaudiet, vai jums ir pakete gpg instalēta jūsu datorā. Run the following command to check: Palaist šādu komandu, lai pārbaudītu:

# whereis gpg # Whereis GPG
gpg: /usr/bin/gpg /usr/share/man/man1/gpg.1.gz GPG: / usr / bin / GPG / usr/share/man/man1/gpg.1.gz

If you get an output like the one shown above it means you have the required package installed. Ja Jums izejas kā vienu norādīts iepriekš, tas nozīmē, jums ir nepieciešama pakete uzstādīta. If not, check your Linux distribution's documentation to see how you can install the GPG package. Ja ne, pārbaudiet savu Linux izplatīšanas dokumentāciju, lai redzētu, kā jūs varat instalēt GPG paketi.

Say you want to password protect a file called dbbackup.zip with the password Rv7fkcxASW8h here's how you would go about it: Ka vēlaties ar paroli aizsargāt failu ar nosaukumu dbbackup.zip ar paroli Rv7fkcxASW8h Lūk, kā jūs varētu iet par to:

# gpg -c dbbackup.zip # GPG-c dbbackup.zip

When you enter this you will be requested to enter a passphrase, which is the password you want to protect the file with. Ievadot, jums tiks lūgts ievadīt paroli, kura paroli vēlaties aizsargāt failu ar. Enter the password twice. Ievadiet paroli divas reizes. Now you should see a file called dbbackup.zip.gpg in the same directory as the original file. Tagad jums vajadzētu redzēt faila nosaukumu dbbackup.zip.gpg šajā pašā direktorijā, kā oriģinālā. This is the encrypted and password protected copy of the original file. Šī ir šifrēta un aizsargāta ar paroli kopiju oriģinālo failu. You can store this file on your hard drive or ship it to someone on a DVD knowing that it will be very hard and nearly impossible for most people to crack it. Jūs varat saglabāt šo failu uz cietā diska vai nosūtīt to kādam uz DVD, zinot, ka tas būs ļoti grūti un gandrīz neiespējami vairums cilvēku kreka to.

When you want to read the file you will need to remove the password protected encryption. Ja vēlaties nolasīt failu, jums būs nepieciešams novērst aizsargāta ar paroli šifrēšanu. For that execute the following command: Šim izpildīt šādu komandu:

gpg dbbackup.zip.gpg GPG dbbackup.zip.gpg

You will be asked to enter the password using which the file was protected. Jums tiks prasīts ievadīt paroli, izmantojot kuras fails ir aizsargāts. Enter that and you should be in business. Ievadiet to un jums ir biznesā. Note that this only works for files and not for folders. Ņemiet vērā, ka tas darbojas tikai failus nevis mapes. You should create a zip or tar archive of the files you want to secure and then add the password protected encryption to it. Jums vajadzētu izveidot zip vai tar arhīva failu, kuru vēlaties, lai nodrošinātu un tad pievieno aizsargāta ar paroli šifrēšanu, lai to.

Posted in Posted in Linux Linux , , Security Security . .

Get Simple Help tutorials just like this one in your email inbox every day - for free! Get Simple Palīdzība konsultācijas tāpat kā šo vienu savā e-pastā ik dienas - bez maksas! Just enter your email address below: Vienkārši ievadiet savu e-pasta adresi:

You can always opt out of this email subscription at any time. Jūs vienmēr varat atteikties no šīs e-pasta abonementu jebkurā laikā.

3 Responses 3 Atbildes

Stay in touch with the conversation, subscribe to the Uzturēt kontaktus ar sarunu, abonēt RSS feed for comments on this post RSS barību komentārus par šo ziņu . .

  1. IT Buzz IT Buzz says saka

    Thanks a lot i was looking for this command from last week. Thanks daudz es meklēju šo komandu no pagājušajā nedēļā. Ultimately find it at your website. Galu galā atrast jūsu mājas lapā.

Continuing the Discussion Turpinot iztirzājumu

  1. | Standalone Sysadmin | Standalone Sysadmin linked to this post on June 29, 2009 saistībā ar šo pastu June 2009 29

    [...] to ssh authentication. [...] Ar SSH autentifikācija. If you want to learn more about how to use it, Simple Help has a tutorial on it, covering the very basic usage. Ja vēlaties uzzināt vairāk par to, kā to izmantot, Simple Help ir apmācība par to, kas aptver ļoti vienkāršas izmantošanas. Once you're comfortable with that, check out the [...] Kad esat apmierināts ar to, izbraukšana [...]

  2. Password-protect files in Linux « Linux & Stuff Ar paroli aizsargāt failus Linux "Linux & Stuff linked to this post on July 1, 2009 saistībā ar šo amatu 2009 1.jūlijā

    [...] in CLI, password | Tags: CLI, password Here's a useful CLI to enable protecting special files in your system. [...] In CLI, parole | Tags: CLI, paroli Šeit ir noderīga CLI, lai aizsargātu īpašu failus jūsu sistēmā. To protect file.txt just run [...] Lai aizsargātu file.txt ieskriet [...]



Some HTML is OK Daži HTML ir OK

or, reply to this post via vai, atbildot uz šo ziņu izmantojot trackback Trackback . .