Ugly way to change the primary UID
   
    Werner Koch
     
    wk@gnupg.org
       
    Tue May  1 19:51:01 2001
    
    
  
On Tue, 1 May 2001, Waldemar Brodkorb wrote:
> Is it possible to change the primary uid?
We can't yet set the primary key id flag.  I think this ugly
workaround should help:
 1. Make a local copy of your public and your secret key.
   (use --export and --export-secret-key)
 2. Use deluid to remove all non-primary user IDs
 3. Use expire to change the expiration time of the main key
 4. Save 
 5. Optional: Edit key again and change expiration time back to the
    old value.
 6. Wait one second (in case you are using a script)
 6. Use --import --allow-secret-key-import to import your
    backup public and secret key from step 1 again.
    
The newer signatures should take precedence over the ones from the
backup key and therefore you have one user ID with a newer timestamp
and in absence of a primary key flag, this one will count as primary
key.
I have not tested this and I know that it is ugly.
The plan is to have a self-signature update capability per user ID
which can the be used to change such things.  This will probably not
update the timestamp of the self-signature but just set it one
second ahead.  I am not sure on this point, though.
 
   Werner
-- 
Werner Koch        Omnis enim res, quae dando non deficit, dum habetur
g10 Code GmbH      et non datur, nondum habetur, quomodo habenda est.
Privacy Solutions                                        -- Augustinus