{
    "mode": "man",
    "parameter": "user-keyring",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/user-keyring/7/json",
    "generated": "2026-11-08T06:05:53Z",
    "sections": {
        "NAME": {
            "content": "user-keyring - per-user keyring\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  user  keyring is a keyring used to anchor keys on behalf of a user.  Each UID the kernel\ndeals with has its own user keyring that is shared by all processes with that UID.  The  user\nkeyring  has  a  name  (description) of the form uid.<UID> where <UID> is the user ID of the\ncorresponding user.\n\nThe user keyring is associated with the record that the kernel maintains  for  the  UID.   It\ncomes  into existence upon the first attempt to access either the user keyring, the user-ses‐\nsion-keyring(7), or the session-keyring(7).  The keyring remains pinned in existence so  long\nas  there  are processes running with that real UID or files opened by those processes remain\nopen.  (The keyring can also be pinned indefinitely by linking it into another keyring.)\n\nTypically, the user keyring is created by pamkeyinit(8) when a user logs in.\n\nThe user keyring is not searched by default by requestkey(2).  When pamkeyinit(8) creates a\nsession keyring, it adds to it a link to the user keyring so that the user  keyring  will  be\nsearched when the session keyring is.\n\nA  special serial number value, KEYSPECUSERKEYRING, is defined that can be used in lieu of\nthe actual serial number of the calling process's user keyring.\n\nFrom the keyctl(1) utility, '@u' can be used instead of a numeric key ID  in  much  the  same\nway.\n\nUser keyrings are independent of clone(2), fork(2), vfork(2), execve(2), and exit(2) except‐\ning that the keyring is destroyed when the UID record is destroyed when the last process pin‐\nning it exits.\n\nIf  it  is  necessary  for  a key associated with a user to exist beyond the UID record being\ngarbage collected—for example, for use by a  cron(8)  script—then  the  persistent-keyring(7)\nshould be used instead.\n\nIf a user keyring does not exist when it is accessed, it will be created.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "keyctl(1), keyctl(3), keyrings(7), persistent-keyring(7), process-keyring(7),\nsession-keyring(7), thread-keyring(7), user-session-keyring(7), pamkeyinit(8)\n\nLinux man-pages 6.7                          2023-10-31                              user-keyring(7)",
            "subsections": []
        }
    },
    "summary": "user-keyring - per-user keyring",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "keyctl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/keyctl/1/json"
        },
        {
            "name": "keyctl",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/keyctl/3/json"
        },
        {
            "name": "keyrings",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/keyrings/7/json"
        },
        {
            "name": "persistent-keyring",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/persistent-keyring/7/json"
        },
        {
            "name": "process-keyring",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/process-keyring/7/json"
        },
        {
            "name": "session-keyring",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/session-keyring/7/json"
        },
        {
            "name": "thread-keyring",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/thread-keyring/7/json"
        },
        {
            "name": "user-session-keyring",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/user-session-keyring/7/json"
        },
        {
            "name": "pamkeyinit",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/pamkeyinit/8/json"
        }
    ]
}