From f0692f51fe079bce47d97ed06f60be3f55befb51 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 1 Jun 2017 17:43:09 +0100 Subject: [PATCH] gpg key generation --- src/freedombone-adduser | 2 +- src/freedombone-base-email | 4 ++-- src/freedombone-utils-backup | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/freedombone-adduser b/src/freedombone-adduser index 2106d653..a55d89f9 100755 --- a/src/freedombone-adduser +++ b/src/freedombone-adduser @@ -144,7 +144,7 @@ echo "Name-Real: $ADD_USERNAME" >> /home/$ADD_USERNAME/gpg-genkey.conf echo "Name-Email: $ADD_USERNAME@$HOSTNAME" >> /home/$ADD_USERNAME/gpg-genkey.conf echo 'Expire-Date: 0' >> /home/$ADD_USERNAME/gpg-genkey.conf chown $ADD_USERNAME:$ADD_USERNAME /home/$ADD_USERNAME/gpg-genkey.conf -su -m root -c "gpg --homedir /home/$ADD_USERNAME/.gnupg --batch --passphrase '' --gen-key /home/$ADD_USERNAME/gpg-genkey.conf" - $ADD_USERNAME +su -m root -c "gpg --homedir /home/$ADD_USERNAME/.gnupg --batch --passphrase '' --full-gen-key /home/$ADD_USERNAME/gpg-genkey.conf" - $ADD_USERNAME chown -R $ADD_USERNAME:$ADD_USERNAME /home/$ADD_USERNAME/.gnupg shred -zu /home/$ADD_USERNAME/gpg-genkey.conf MY_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$ADD_USERNAME" "$ADD_USERNAME@$HOSTNAME") diff --git a/src/freedombone-base-email b/src/freedombone-base-email index b844a727..6ba48a2a 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -1499,7 +1499,7 @@ function create_gpg_subkey { echo "Name-Comment: $GPG_KEY_USAGE" >> /home/$MY_USERNAME/gpg-genkey.conf echo 'Expire-Date: 0' >> /home/$MY_USERNAME/gpg-genkey.conf chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/gpg-genkey.conf - su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --batch --passphrase '' --gen-key /home/$MY_USERNAME/gpg-genkey.conf" - $MY_USERNAME + su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --batch --passphrase '' --full-gen-key /home/$MY_USERNAME/gpg-genkey.conf" - $MY_USERNAME chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg shred -zu /home/$MY_USERNAME/gpg-genkey.conf @@ -1614,7 +1614,7 @@ function configure_gpg { echo 'Expire-Date: 0' >> /home/$MY_USERNAME/gpg-genkey.conf chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/gpg-genkey.conf echo $'Generating a new GPG key' - su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --batch --passphrase '' --gen-key /home/$MY_USERNAME/gpg-genkey.conf" - $MY_USERNAME + su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --batch --passphrase '' --full-gen-key /home/$MY_USERNAME/gpg-genkey.conf" - $MY_USERNAME chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg KEY_EXISTS=$(gpg_key_exists "$MY_USERNAME" "$MY_EMAIL_ADDRESS") if [[ $KEY_EXISTS == "no" ]]; then diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index 988bbe17..47f3f510 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -72,7 +72,7 @@ function configure_backup_key { echo 'Expire-Date: 0' >> /home/$MY_USERNAME/gpg-genkey.conf chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/gpg-genkey.conf echo $'Backup key does not exist. Creating it.' - su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --batch --passphrase '' --gen-key /home/$MY_USERNAME/gpg-genkey.conf" - $MY_USERNAME + su -m root -c "gpg --homedir /home/$MY_USERNAME/.gnupg --batch --passphrase '' --full-gen-key /home/$MY_USERNAME/gpg-genkey.conf" - $MY_USERNAME chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.gnupg shred -zu /home/$MY_USERNAME/gpg-genkey.conf