{"id":19176449,"url":"https://github.com/cpulvermacher/pam-login-interval","last_synced_at":"2026-06-29T02:31:33.767Z","repository":{"id":215880363,"uuid":"739957167","full_name":"cpulvermacher/pam-login-interval","owner":"cpulvermacher","description":"A PAM module to enforce a minimum time between logins","archived":false,"fork":false,"pushed_at":"2025-10-26T07:22:19.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-26T08:25:10.119Z","etag":null,"topics":["pam","pam-module","productivity"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cpulvermacher.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-07T04:07:34.000Z","updated_at":"2025-10-26T07:19:58.000Z","dependencies_parsed_at":"2024-11-09T10:30:51.687Z","dependency_job_id":"9d5249f7-9abd-4083-9d28-b356137be0ea","html_url":"https://github.com/cpulvermacher/pam-login-interval","commit_stats":null,"previous_names":["cpulvermacher/pam-login-interval"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/cpulvermacher/pam-login-interval","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpulvermacher%2Fpam-login-interval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpulvermacher%2Fpam-login-interval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpulvermacher%2Fpam-login-interval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpulvermacher%2Fpam-login-interval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cpulvermacher","download_url":"https://codeload.github.com/cpulvermacher/pam-login-interval/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cpulvermacher%2Fpam-login-interval/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34911134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pam","pam-module","productivity"],"created_at":"2024-11-09T10:28:38.214Z","updated_at":"2026-06-29T02:31:33.762Z","avatar_url":"https://github.com/cpulvermacher.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pam-login-interval\n\nA PAM module that enforces a minimum time between logins.\n\n## Prerequisites\n\ngcc, make, PAM development libraries, and SQLite3 development libraries are required.\nFor Debian/Ubuntu-based systems:\n\n```\nsudo apt install gcc make libpam0g-dev libsqlite3-dev\n```\n\n## Installation\n\nBuild and install the module via:\n\n```\nmake\nsudo make install\n```\n\nAdd the following to your PAM config, e.g. to /etc/pam.d/lightdm to use this module with LightDM logins:\n\n```\n   account required pam_login_interval.so target_user=your_user_name min_interval=30m\n```\n\nchange the `target_user` and `min_interval` arguments as required.\n\nIf there is a successful authentication for the configured user before the configured `min_interval` time has passed, the login will be rejected.\nIf supported by the login UI / display manager, it will show a message like \"Login denied (need to wait ... before next login)\".\n\n## Module Parameters\n\nYou should specify the following parameters in the PAM configuration:\n\n### `target_user`\n\nThe user to limit logins for. For any other users, this module will not interfere with logins. If not specified, the `min_interval` setting will be applied to all users!\nOnly a single user name can be specified. To limit multiple users (but not everyone), add the pam_login_interval.so module to your config file multiple times.\n\n### `min_interval` (required)\n\nThe minimum duration since the user's last login. This can be a number in seconds, or a duration in the form `1d2h3m4s` or `30m`. If a login is attempted before this time has elapsed, the login will be rejected.\n\n## Login Time Tracking\n\nThis module automatically detects and uses the appropriate login tracking mechanism:\n\n1. **lastlog2** (preferred): If `/var/lib/lastlog/lastlog2.db` exists, the module reads from this SQLite database updated by `pam_lastlog2.so`.\n\n2. **wtmp** (fallback): If lastlog2 is not available, the module falls back to reading from the traditional wtmp file (`/var/log/wtmp`).\n\nNote: If your distribution does not come with lastlog2 configured, you may need to install e.g. `libpam-lastlog2` and configure it in `/etc/pam.d/common-session` via:\n\n```\nsession optional pam_lastlog2.so\n```\n\n## References\n\n- The Linux-PAM Module Writers' Guide - https://fossies.org/linux/Linux-PAM-docs/doc/mwg/Linux-PAM_MWG.pdf\n- pam-google-auth - https://github.com/google/google-authenticator-libpam/blob/master/src/pam_google_authenticator.c\n- How to C (in 2016) - https://matt.sh/howto-c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpulvermacher%2Fpam-login-interval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcpulvermacher%2Fpam-login-interval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcpulvermacher%2Fpam-login-interval/lists"}