Results 1 to 8 of 8

Thread: gpg encryption not asking for password

  1. #1

    Default gpg encryption not asking for password

    Code:
    gpg -o message.gpg -e -r adress@mail.org message.txt
    shred message.txt
    gpg -o message.txt --decrypt message.gpg
    After one entering the password once, it's doesn't ask for the password again. This is a security risk.

    How do I make gpg (gpg2) ask for the password every time?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,778
    Blog Entries
    3

    Default Re: gpg encryption not asking for password

    It uses "gpg-agent" to handle the details. So "gpg-agent" is remembering the passphrase.

    You can set a time limit in ".gnupg/gpg-agent.conf", with lines for "default-cache-ttl" and "max-cache-ttl".

    Use:
    Code:
    man gpg-agent
    for details.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3

    Default Re: gpg encryption not asking for password

    .gnupg/gpg-agent.conf

    This file doesn't exist. ??

    gpg.conf
    gpa.conf
    trustdb.gpg

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,778
    Blog Entries
    3

    Default Re: gpg encryption not asking for password

    You can create that file with a text editor. I think that's where mine came from.

    Use the man page for hints. Where the man page mentions "--default-cache-ttl" you just omit the starting "--" and enter the keyword and value starting at the left margin.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  5. #5

    Default Re: gpg encryption not asking for password

    Quote Originally Posted by nrickert View Post
    You can create that file with a text editor. I think that's where mine came from.

    Use the man page for hints. Where the man page mentions "--default-cache-ttl" you just omit the starting "--" and enter the keyword and value starting at the left margin.


    Code:
    default-cache-ttl 0
    This works. I was able to do that command set three times in a row. (encrypt,shred, decryption) I'll post again, if I see any problems that might come with autologin.

    Thanks.

  6. #6

    Default Re: gpg encryption not asking for password

    How do I delete the password cache?

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,778
    Blog Entries
    3

    Default Re: gpg encryption not asking for password

    Quote Originally Posted by lord_valarian View Post
    How do I delete the password cache?
    It is in memory. It is not on disk. And I pretty sure that it is locked in memory (not allowed to be paged out, so won't ever be copied to disk). The entries should be deleted when their ttl expires or when you shutdown or reboot (which ever happens first).

    Since you have set a short ttl, I don't see any reason for concern.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  8. #8

    Default Re: gpg encryption not asking for password

    Quote Originally Posted by nrickert View Post
    It is in memory. It is not on disk. And I pretty sure that it is locked in memory (not allowed to be paged out, so won't ever be copied to disk). The entries should be deleted when their ttl expires or when you shutdown or reboot (which ever happens first).

    Since you have set a short ttl, I don't see any reason for concern.

    Thanks. That will help my skills.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •