> For the complete documentation index, see [llms.txt](https://yubico.gitbook.io/yubikey5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yubico.gitbook.io/yubikey5/gpg/getting-started/2.-pins/change.md).

# Change

Instructions on how to change your GPG PINs.

GPG PINs can be changed either by using the command-line, or with software such as Kleopatra, or any other GPG software that supports importing keys onto your device.

#### Select which method you want to use to change your PINs:

<table><thead><tr><th width="276"></th><th></th></tr></thead><tbody><tr><td><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FucylduyKzODjGFWzIeM9%2Flink_1.png?alt=media&amp;token=0f7be959-69a9-48f5-8092-e5b3853b3478" alt=""> <a href="#command-line"><strong>Command Line</strong></a></td><td>Enter commands using ykman.exe.</td></tr><tr><td><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FucylduyKzODjGFWzIeM9%2Flink_1.png?alt=media&amp;token=0f7be959-69a9-48f5-8092-e5b3853b3478" alt=""> <a href="#kleopatra"><strong>Kleopatra</strong></a></td><td>Application available on Windows and Linux.</td></tr></tbody></table>

{% hint style="warning" %}
Before getting started, ensure that you have followed our guide on how to install the GPG Command-line.\
\
[**Read Here.**](/yubikey5/guides/setting-up-cli-gpg.md)
{% endhint %}

## <mark style="color:red;">❊ Command-line</mark>

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2Fdyg8lj1Ds3J9Q1rhGFfh%2Fbanner_chgpins_commandline.png?alt=media&amp;token=3ddd5f0a-2027-4ad9-84b6-04ed64d679d0" alt=""><figcaption></figcaption></figure>

Open **Command Prompt**, **Terminal**, or **Powershell**.

Type the following command:

```powershell
gpg --card-edit
```

Wait until you see the text <mark style="color:yellow;">**`gpg/card>`**</mark>and then type:

```
admin
```

You should see the text <mark style="color:yellow;">**Admin commands are allowed**</mark>**, and then finally, type:**

```
passwd
```

You are now in admin mode for GPG and should see the following:

```
1 - change PIN               ( default PIN: 123456 )
2 - unblock PIN
3 - change Admin PIN         ( default PIN: 12345678 )
4 - set the Reset Code
Q - quit
```

Select <mark style="color:yellow;">**`1`**</mark>, follow the instructions, and then select <mark style="color:yellow;">**`3`**</mark>.

Once finished, press <mark style="color:yellow;">**`Q`**</mark>

## <mark style="color:red;">❊ Kleopatra</mark>

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2F9Fv4VJfzJyIKMRHCyRDj%2Fbanner_chgpins_kleopatra.png?alt=media&amp;token=3f8a0935-3e2e-4405-8448-964cdd4fd051" alt=""><figcaption></figcaption></figure>

Ensure you have the Gpg tools installed on your system. Click ![](https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FO0TgiNjiqrL28qe6JUft%2Fwindows_10x_icon.png?alt=media\&token=8c7613b1-03a6-4adb-82b4-c5685bd7c58e) and search for <mark style="color:red;">**Kleopatra**</mark>**.**

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FYh32fgyijNoWGj3Kiyun%2Fgpg_kleo_1.png?alt=media&amp;token=f6abb689-1f8d-4ade-8f19-1ff20c208a39" alt=""><figcaption></figcaption></figure>

Once the application loads, locate the <mark style="color:red;">**Smartcards**</mark> button to the right side.

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FAfCOQ1t3L2vfi90tOZqH%2Fgpg_kleo_2.png?alt=media&amp;token=659601b0-f8ec-42f4-a603-a370267a15e0" alt=""><figcaption></figcaption></figure>

Locate the Smartcard Management section and select <mark style="color:red;">**OpenPGP**</mark>.

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FwVW9WTZXE8kzYESrliv7%2Fgpg_kleo_3.png?alt=media&amp;token=a00e6772-58a1-48ae-bf0a-519102f28477" alt=""><figcaption></figcaption></figure>

In the lower portion of the OpenGPG panel, locate the **Actions** menu.

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FQZU3mLE95eaz8PFaio7O%2Fgpg_kleo_4.png?alt=media&amp;token=d41dffd6-8484-4643-b35d-adce8cf76350" alt=""><figcaption></figcaption></figure>

### <mark style="color:blue;">USER PIN</mark>

The following instructions explain how to change the GPG interface's USER PIN.

Select ![](https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FshoQPwnpoaDhXwIQBUJg%2Fgpg_kleo_5.png?alt=media\&token=7750b938-3ec6-44fb-a022-fc016e41c571)

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FTYjeOuTs4cANaDtuCLoL%2Fgpg_kleo_7.png?alt=media&amp;token=10421496-061a-4ba3-819c-52f1a35f4216" alt=""><figcaption></figcaption></figure>

This dialog is where you enter your CURRENT GPG User PIN.\ <mark style="color:red;">**`default:`**</mark><mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**123456**</mark>

<div><figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2Fcibl3no48KK6MNiscjAY%2Fgpg_kleo_8.png?alt=media&amp;token=3b5959fb-db72-456c-8c6c-12b8421edfb4" alt=""><figcaption></figcaption></figure> <figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2F7y5bd6NK2s9HNLGTT03o%2Fgpg_kleo_9.png?alt=media&amp;token=1319c254-b428-46b0-a31f-faf94bbc7e50" alt=""><figcaption></figcaption></figure></div>

You will then be asked to enter a NEW GPG User PIN and then confirm it.

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FNo9juhnuKGTnyH6LwrA0%2Fgpg_kleo_10.png?alt=media&amp;token=783cf407-6190-4e4a-b2f1-0209003f02aa" alt=""><figcaption></figcaption></figure>

Your new GPG User PIN is now saved.

### <mark style="color:blue;">ADMIN PIN</mark>

These instructions explain how to change the GPG interface's ADMIN PIN.

Select ![](https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2F6s49bDinGke3mEPnmJNp%2Fgpg_kleo_6.png?alt=media\&token=e943ecdd-7927-4720-9dca-124fa98f8f55)

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FunBgwXPdnnFXKHIi7DSi%2Fgpg_kleo_11.png?alt=media&amp;token=4b0caf25-a1d7-4b31-b989-bcfe6ba467e3" alt=""><figcaption></figcaption></figure>

This dialog is where you enter your CURRENT GPG Admin PIN.\ <mark style="color:red;">**`default:`**</mark><mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**12345678**</mark>

<div><figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FLpVYo6ZMzU5SQ3eu0XAk%2Fgpg_kleo_12.png?alt=media&amp;token=fdb42eb9-32ec-480c-a737-6d37d0a5a36d" alt=""><figcaption></figcaption></figure> <figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FjncIfzR7XAGd30MOqccq%2Fgpg_kleo_13.png?alt=media&amp;token=a0d9918e-85fc-40eb-bafb-46a058f64d8a" alt=""><figcaption></figcaption></figure></div>

You will then be asked to enter a NEW GPG Admin PIN and then confirm it.

<figure><img src="https://4134239767-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwDiMyl2FV0YbzWbcTioq%2Fuploads%2FU38o1DOsSu8OsW1i4ZDu%2Fgpg_kleo_14.png?alt=media&amp;token=b8d5da51-7c9e-454c-8b04-414db85ba770" alt=""><figcaption></figcaption></figure>

Your new GPG Admin PIN is now saved.
