{
    "mode": "man",
    "parameter": "pam_filter",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/pam_filter/8/json",
    "generated": "2026-06-14T12:48:09Z",
    "synopsis": "pamfilter.so [debug] [newterm] [nonterm] run1|run2 filter [...]",
    "sections": {
        "NAME": {
            "content": "pamfilter - PAM filter module\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pamfilter.so [debug] [newterm] [nonterm] run1|run2 filter [...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module is intended to be a platform for providing access to all of the input/output that\npasses between the user and the application. It is only suitable for tty-based and\n(stdin/stdout) applications.\n\nTo function this module requires filters to be installed on the system. The single filter\nprovided with the module simply transposes upper and lower case letters in the input and\noutput streams. (This can be very annoying and is not kind to termcap based editors).\n\nEach component of the module has the potential to invoke the desired filter. The filter is\nalways execv(2) with the privilege of the calling application and not that of the user. For\nthis reason it cannot usually be killed by the user without closing their session.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "debug",
                    "content": "Print debug information.\n\nnewterm\nThe default action of the filter is to set the PAMTTY item to indicate the terminal that\nthe user is using to connect to the application. This argument indicates that the filter\nshould set PAMTTY to the filtered pseudo-terminal.\n\nnonterm\ndon't try to set the PAMTTY item.\n"
                },
                {
                    "name": "runX",
                    "content": "In order that the module can invoke a filter it should know when to invoke it. This\nargument is required to tell the filter when to do this.\n\nPermitted values for X are 1 and 2. These indicate the precise time that the filter is to\nbe run. To understand this concept it will be useful to have read the pam(3) manual page.\nBasically, for each management group there are up to two ways of calling the module's\nfunctions. In the case of the authentication and session components there are actually\ntwo separate functions. For the case of authentication, these functions are\npamauthenticate(3) and pamsetcred(3), here run1 means run the filter from the\npamauthenticate function and run2 means run the filter from pamsetcred. In the case of\nthe session modules, run1 implies that the filter is invoked at the pamopensession(3)\nstage, and run2 for pamclosesession(3).\n\nFor the case of the account component. Either run1 or run2 may be used.\n\nFor the case of the password component, run1 is used to indicate that the filter is run\non the first occasion of pamchauthtok(3) (the PAMPRELIMCHECK phase) and run2 is used\nto indicate that the filter is run on the second occasion (the PAMUPDATEAUTHTOK phase).\n"
                },
                {
                    "name": "filter",
                    "content": "The full pathname of the filter to be run and any command line arguments that the filter\nmight expect.\n"
                }
            ]
        },
        "MODULE TYPES PROVIDED": {
            "content": "All module types (auth, account, password and session) are provided.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "PAMSUCCESS\nThe new filter was set successfully.\n\nPAMABORT\nCritical error, immediate abort.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Add the following line to /etc/pam.d/login to see how to configure login to transpose upper\nand lower case letters once the user has logged in:\n\nsession required pamfilter.so run1 /lib/security/pamfilter/upperLOWER\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pam.conf(5), pam.d(5), pam(7)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "pamfilter was written by Andrew G. Morgan <morgan@kernel.org>.\n\n\n\nLinux-PAM Manual                             06/08/2020                                PAMFILTER(8)",
            "subsections": []
        }
    },
    "summary": "pamfilter - PAM filter module",
    "flags": [],
    "examples": [
        "Add the following line to /etc/pam.d/login to see how to configure login to transpose upper",
        "and lower case letters once the user has logged in:",
        "session required pamfilter.so run1 /lib/security/pamfilter/upperLOWER"
    ],
    "see_also": [
        {
            "name": "pam.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pam.conf/5/json"
        },
        {
            "name": "pam.d",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pam.d/5/json"
        },
        {
            "name": "pam",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/pam/7/json"
        }
    ]
}