R.A. Epigonos et al.

[pgp] primary ユーザID(uid)の変更

特定の鍵からprimary ユーザID(uid)を変更する

まずは現在の鍵の情報を確認。一番上にあるユーザIDがprimaryということ。

$ gpg --list-key XXXXXXXX
pub   4096R/XXXXXXXX 2012-02-10
uid                  AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>
uid                  AYANOKOUZI, Ryuunosuke
sub   4096R/YYYYYYYY 2012-02-10

この鍵からprimary ユーザID(uid)を変更。途中でこの鍵のパスフレーズを聞かれる。

$ gpg --edit-key YYYYYYYY
gpg (GnuPG) 1.4.10; Copyright (C) 2008 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.

Secret key is available.

gpg: checking the trustdb
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0  valid:   2  signed:   0  trust: 0-, 0q, 0n, 0m, 0f, 2u
pub  4096R/XXXXXXXX  created: 2012-02-10  expires: never       usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/YYYYYYYY  created: 2012-02-10  expires: never       usage: E
[ultimate] (1). AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>
[ultimate] (2)  AYANOKOUZI, Ryuunosuke

gpg> uid 2

pub  4096R/XXXXXXXX  created: 2012-02-10  expires: never       usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/YYYYYYYY  created: 2012-02-10  expires: never       usage: E
[ultimate] (1). AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>
[ultimate] (2)* AYANOKOUZI, Ryuunosuke

gpg> primary

You need a passphrase to unlock the secret key for
user: "AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>"
4096-bit RSA key, ID XXXXXXXX, created 2012-02-10


pub  4096R/XXXXXXXX  created: 2012-02-10  expires: never       usage: SC
                     trust: ultimate      validity: ultimate
sub  4096R/YYYYYYYY  created: 2012-02-10  expires: never       usage: E
[ultimate] (1)  AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>
[ultimate] (2)* AYANOKOUZI, Ryuunosuke

gpg> quit
Save changes? (y/N) y

最後に変更内容の確認。uidの順番が変わり、primaryユーザIDが変更されたことがわかる。

$ gpg --list-key XXXXXXXX
pub   4096R/XXXXXXXX 2012-02-10
uid                  AYANOKOUZI, Ryuunosuke
uid                  AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>
sub   4096R/YYYYYYYY 2012-02-10

リファレンス

  1. S/MIMEでセキュアな電子メール環境をつくる!
  2. 研修で教えてくれない!:第18回「PGP? S/MIME? 電子署名の違いを学ぶ」 - ITmedia Biz.ID
  3. What is "PGP"
  4. How to add and delete key components with GnuPG

ソーシャルブックマーク

  1. はてなブックマーク
  2. Google Bookmarks
  3. del.icio.us

ChangeLog

  1. Posted: 2010-04-15T08:50:33+09:00
  2. Modified: 2010-04-15T08:50:33+09:00
  3. Generated: 2024-11-18T23:09:16+09:00