The UNIX and Linux Forums  
Hallo en welkom van de Verenigde Staten aan de UNIX en Linux Forum! Bedankt voor uw bezoek en Deelnemen aan onze wereldwijde gemeenschap.

Go Back   De Unix-en Linux Forum > Top Forums > Programmeren en Shell Scripting
.
google unix.com



Programmeren en Shell Scripting Post vragen over KSH, CSH, SH, Bash, Perl, PHP, sed, awk en andere shell scripts en shell scripting talen hier.

Meer UNIX en Linux Forum Onderwerpen Misschien vindt u Helpful
Draad Thread Starter Forum Antwoorden Last Post
gebruiker login probleem & Bestanden notering probleem. pernasivam AIX 1 06-18-2009 10:09
Loop probleem met een probleem aliahsan81 Programmeren en Shell Scripting 3 01-07-2009 02:02
probleem bij het vinden van een hardware-probleem girish.batra SUN Solaris 8 09-09-2008 11:10
ssh-script probleem probleem pcjandyala Programmeren en Shell Scripting 2 07-31-2008 04:27 PM
probleem met dd commando of misschien AFS probleem Anta Programmeren en Shell Scripting 0 08-25-2006 11:10

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Zoeken in deze Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-01-2009
anushree.a anushree.a is offline
Geregistreerde gebruiker
  
 

Join Date: mei 2008
Posts: 87
GPG Encription probleem

Dear Friends,
Ik gebruik gpg symmetrische encryptie. Ik versleutelen van een bestand als volgt

gpg - symmetrische <bestandsnaam>

Hij vraagt vervolgens om het wachtwoord twee keer

Nu is de problme is, heb ik een aantal 700 oneven bestanden die moeten worden gecodeerd door gebruik te maken van symmetrische gpg encription
Annuleerteken u plz mij vertellen hoe ik dat moet doen door gebruik te maken "voor"Lus.

Ik dank u bij voorbaat
Anushree.a
  #2 (permalink)  
Old 07-01-2009
fpmurphy's Avatar
fpmurphy fpmurphy is online now Forum Staff  
Moderator
  
 

Join Date: december 2003
Locatie: Florida
Berichten: 1.930
gpg man. Lees over de batch-modus.
  #3 (permalink)  
Old 07-07-2009
anushree.a anushree.a is offline
Geregistreerde gebruiker
  
 

Join Date: mei 2008
Posts: 87
gegaan doorgaand de man gpg resultaten ... maar niet in staat om de vereiste gegevens ...
Gelieve, indien er iemand is die weet de oplossing vriendelijk laat het me weten
Ik dank u bij voorbaat
Anushree
  #4 (permalink)  
Old 07-07-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: december 2008
Locatie: op.
Berichten: 1.877
Van de man pagina's (die u natuurlijk lezen) een aantal opties die nuttig kan zijn:
Code:
       --batch
       --no-batch
              Use batch mode.  Never ask, do not allow  interactive  commands.
              --no-batch disables this option.

       --no-tty
              Make  sure that the TTY (terminal) is never used for any output.
              This option is needed in  some  cases  because  GnuPG  sometimes
              prints warnings to the TTY even if --batch is used.

       --passphrase-fd n
              Read the passphrase from file descriptor n. Only the first  line
              will  be  read  from  file descriptor n. If you use 0 for n, the
              passphrase will be read from stdin. This can  only  be  used  if
              only  one  passphrase is supplied.  Note that this passphrase is
              only used if the option --batch has also been  given.   This  is
              different from gpg.


       --passphrase-file file
              Read  the passphrase from file file. Only the first line will be
              read from  file  file.  This  can  only  be  used  if  only  one
              passphrase is supplied. Obviously, a passphrase stored in a file
              is of questionable security if other users can read  this  file.
              Don't  use  this  option  if  you  can avoid it.  Note that this
              passphrase is only used if the  option  --batch  has  also  been
              given.  This is different from gpg.


       --passphrase string
              Use  string as the passphrase. This can only be used if only one
              passphrase is supplied. Obviously, this is of very  questionable
              security  on  a  multi-user system. Don't use this option if you
              can avoid it.  Note that this passphrase is  only  used  if  the
              option --batch has also been given.  This is different from gpg.
  #5 (permalink)  
Old 07-10-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: december 2008
Locatie: op.
Berichten: 1.877
Aangezien u begonnen met een tweede draad voor dezelfde vraag (kennelijk) zonder het lezen van de man-page, ik kom een oplossing bieden deze tijd.

Code:
> cat pass
s3cr3t
> gpg --batch --no-tty --armor --passphrase-file pass --symmetric test.file
> ls test.*
test.file  test.file.asc
> file test.file.asc
test.file.asc: PGP armored data message
  #6 (permalink)  
Old 07-13-2009
anushree.a anushree.a is offline
Geregistreerde gebruiker
  
 

Join Date: mei 2008
Posts: 87
I dont weet hoe je een oplossing.

Na de o / pi kreeg toen ik het script

test.sh: lijn 1:. / pass: Permission denied
test.sh: lijn 2: s3cr3t: command not found
test.sh: lijn 3: - batch: command not found
test.sh: lijn 4:. / test.file: Permission denied
test.sh: lijn 5:. / test.file: Permission denied
test.sh: lijn 6: test.file.asc: command not found
test.sh: lijn 7: test.file.asc:: command not found
  #7 (permalink)  
Old 07-13-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: december 2008
Locatie: op.
Berichten: 1.877
Dat is waarschijnlijk omdat wat ik bedoelde is niet een volledige script, maar een voorbeeld van hoe het er uit zou zien wanneer gebeurt handmatig. Posting opnieuw met opmerkingen te verduidelijken:
Code:
> cat pass    # Run the 'cat' program to show the contents of file 'pass' which
              # contains the passphrase
s3cr3t        # Contents of file 'pass'
# Calling gpg in batch mode, telling it not to allocate a TTY, asking for
# ASCII-Armor output (non-binary data), providing the passphrase in file 'pass',
# symmetric enryption for file 'test.file'
> gpg --batch --no-tty --armor --passphrase-file pass --symmetric test.file
> ls test.*   # Display a listing of the original & encypted file
test.file  test.file.asc
> file test.file.asc # Run the 'file' utility to take a guess at the type of the
                     # content of file 'test.file.asc'
test.file.asc: PGP armored data message # It tells us that it's encrypted,
                                        # armored data
Alles wat u hoeft te doen is substituut de bestandsnamen gebruikte ik met die je hebt. Zodra je dat neer, start met het gebruik van variabelen in plaats van bestandsnamen. En wanneer dat is gebeurd kun je beginnen met de for-lus.
Reply

Bladwijzers

Labels
encryptie, gpg

Thread Tools Zoeken in deze Thread
Zoeken in deze Thread:

Uitgebreid zoeken
Display Modes Beoordeel deze draad
Beoordeel deze draad:

Posting Regels
Jij mag niet Post Nieuwe threads
Jij mag niet na antwoorden
Jij mag niet post attachments
Jij mag niet bewerk uw berichten

BB code is Aan
Smilies zijn Aan
[IMG] code Aan
HTML-code is Uit
Trackbacks zijn Aan
Pingbacks zijn Aan
Refbacks zijn Aan




Alle tijden zijn GMT -4. Het is nu 08:14 PM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Limited. Vertalingen Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
De Unix-en Linux Forums Copyright © 1993-2009. Alle rechten Reserved.Ad Beheer door RedTyger

Content Relevante URL's door vBSEO 3.2.0