Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ To modify the existing user ID and comments GPG key     - Debian installation (Linux)

- How the program is executed (Programming)

- How to configure AWStats in Ubuntu Server (Server)

- Difference LVS three scheduling modes (Server)

- Swift defined type conversion and type aliases (typealias) (Programming)

- Installation and management of Linux applications (Linux)

- CentOS 7.0 running Docker kernel error solution (Server)

- To use Android RecyclerView (Programming)

- Build Python3.4 + PyQt5.5.1 + Eric6.1.1 development platform under Mac OS X 10.11.1 (Server)

- MySQL / MariaDB database master-slave replication (Database)

- How to monitor Nginx (Database)

- iOS GCD multithreading simple to use (Programming)

- To use Java arrays implement the order form (Programming)

- Linux systems for entry-learning - Install Go language in Linux (Linux)

- Linux / CentOS 7.0 installation and configuration under Tomcat 8.0 (Server)

- Oracle JDK installation under Ubuntu Linux (Linux)

- Linux System Getting Started Learning: the curl set custom HTTP header (Linux)

- Linux kernel source tree to establish load module hello (Linux)

- GitLab installation configuration notes (Linux)

- Oracle TDE transparent data encryption (Database)

 
         
  To modify the existing user ID and comments GPG key
     
  Add Date : 2018-11-21      
         
         
         
  For a GPG key pair has been generated, in which users want to name, comment information is modified, then how to do it?

Rekeying?
Modify the generated key?

Rekeying is very simple, but this will lead to the selection of multiple keys, then here already generated key to modify the method to make a presentation.

Below heard slowly come:

1, first, the command line, type the following command to modify the interface of key information:
gpg --edit-key test@test.com

gpg (GnuPG) 1.4.16; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

The private key is available.

pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
Absolute (1). Yy_test1 (yy_email_gpg)
gpg>

2, using the list you can see the current user's key and user ID (or user name, comments):
gpg> list

pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
Absolute (1) * yy_test1 (yy_email_gpg)

3, add a user ID:
gpg> adduid
Real Name: [yy] yy Ming Xiao
E-mail address: test@test.com
Note: DSC security
You selected this user ID:
    "[Yy] yy Ming Xiao (DSC security) "

Change the name (N), Note (C), e-mail address (E) or OK (O) / Quit (Q)? O

You need to enter a password to unlock the user's private key: "yy_test1 (yy_email_gpg) "
4096 RSA keys, key number DPPPPPPP, established in 2015-03-16


pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
Absolute (1) * yy_test1 (yy_email_gpg)
Unknown (2). [Yy] yy Ming Xiao (DSC security)

4, delete / write-off of the original UID information:
First use uid 1 to delete the selected identification number, where we want to remove the identification number is 1;
gpg> uid 1

pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
Absolute (1) * yy_test1 (yy_email_gpg)
Unknown (2). [Yy] yy Ming Xiao (DSC security)

Here can be divided into two cases,
1), has not been uploaded to the key server key to delete the key.
2), has been uploaded to the key server for a key, the original key if we are not then used, then the write-off logo on the use command to log off.

1), has not been uploaded to the key server key to delete the key.
Absolute (1) * marked with * means that the currently selected identity, then use the delete command deluid No. 1 can be identified:
gpg> deluid
Really remove this user ID? (Y / N) y

pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
Unknown (1). [Yy] yy Ming Xiao (DSC security)

2), has been uploaded to the key server for a key, the original key if we are not then used, then the write-off logo on the use command to log off.
gpg> revuid
Really revoke this user ID? (Y / N) y
Please select the reason for the revocation:
  0 = Reason Not specified
  4 = user ID is no longer valid
  Q = Cancel
(You might want to select 4)
What is your decision? 4
Please enter a description (optional); blank line to the end:
>
Revocation Reason: The user ID is no longer valid
(Not given description)
Is this okay? (Y / N) y

You need to enter a password to unlock the user's private key: "yy_test1 (yy_email_gpg) "
4096 RSA keys, key number DPPPPPPP, established in 2015-03-16


pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
[Revoked] (1). Yy_test1 (yy_email_gpg)
Unknown (2). [Yy] yy Ming Xiao (DSC security)

5, set up a trust relationship to generate a new identity:
gpg> trust
pub 4096R / DPPPPPPP Created: 2015-03-16 Valid to: 2016-03-15 may be used: SC
                    Trust: Absolute effectiveness: Absolute
sub 4096R / PDDDDDDD Created: 2015-03-16 Valid to: 2016-03-15 may be used: E
Unknown (1). [Yy] yy Ming Xiao (DSC security)

Do you trust this user to correctly verify (check other users' identity cards, checks through different channels
Fingerprints, etc.)?

  1 = I do not know or I do not answer
  2 = I do not believe
  3 = I barely believe
  4 = I totally believe
  5 = I absolutely believe
  m = back to the main menu

What is your decision? 5
Do you really want to set this key to ultimate trust? (Y / N) y

After setting, in front of "unknown (1)." Changes to "absolute (1).", Which is generally carried out after the first save operation You can view the list again.

6, save for modification, use the save command.
gpg> save

/ ************************************************* ********************
 * Author: Samson
 * Date: 03/18/2015
 * Test platform:
 * Gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
 * GNU bash, 4.3.11 (1) -release (x86_64-pc-linux-gnu)
 * ************************************************* ****************** /
     
         
         
         
  More:      
 
- xCAT line installation on CentOS 6.X (Linux)
- Axel install plug under CentOS 5/6 acceleration yum downloads (Linux)
- AngularJS - Getting Started with Routing (Programming)
- Virtualbox virtual machine can not copy CentOS Network (Linux)
- 2016, the new Node project Precautions (Programming)
- Linux upgrade Glibc (Linux)
- CentOS 6.x and CentOS7 install MPlayer (Linux)
- Parts of the partition is not recognized after Debian mount mobile hard disk (Linux)
- CentOS 7 repair MBR and GRUB (Linux)
- Service manager OpenBSD on rccl (Server)
- Ubuntu mysql stop fail to solve the problem (Database)
- Bash common several configuration files (Linux)
- To install HDRMerge 0.4.3 under ubuntu (Linux)
- Linux environment password security settings (Linux)
- Oracle 11g RAC root.sh execution error second node failure example (Database)
- MySQL 5.6.26 source install (Database)
- expdp reported ORA-39181 Export Processing Method (Database)
- SELinux multi-level security (Linux)
- Installation and configuration under Linux SVN server - Backup - Recovery - Scheduled Tasks (Server)
- Android Qemu GPS module (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.