{"id":17382922,"url":"https://github.com/hanez/checkpw","last_synced_at":"2025-03-27T20:49:19.815Z","repository":{"id":255391818,"uuid":"848522917","full_name":"hanez/checkpw","owner":"hanez","description":"checkpw is a program that checks the validity of a users password on a UNIX/PAM-based system. (mirror from: https://git.xw3.org/xw3/checkpw)","archived":false,"fork":false,"pushed_at":"2025-03-09T23:51:47.000Z","size":57,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T00:25:29.349Z","etag":null,"topics":["authentication","cgi","checkpassword","checkpw","linux","pam","passwd","shadow","shell","unix"],"latest_commit_sha":null,"homepage":"https://git.xw3.org/xw3/checkpw","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanez.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}},"created_at":"2024-08-27T23:19:42.000Z","updated_at":"2025-03-09T23:51:50.000Z","dependencies_parsed_at":"2024-10-29T06:23:35.661Z","dependency_job_id":"90aba00e-150c-46f6-a955-8180d51e6853","html_url":"https://github.com/hanez/checkpw","commit_stats":null,"previous_names":["hanez/checkpw"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fcheckpw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fcheckpw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fcheckpw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fcheckpw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanez","download_url":"https://codeload.github.com/hanez/checkpw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924493,"owners_count":20694728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["authentication","cgi","checkpassword","checkpw","linux","pam","passwd","shadow","shell","unix"],"created_at":"2024-10-16T07:39:50.586Z","updated_at":"2025-03-27T20:49:19.794Z","avatar_url":"https://github.com/hanez.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# checkpw\n\ncheckpw is a program that checks the validity of a users password on a UNIX/[PAM](https://en.wikipedia.org/wiki/Pluggable_Authentication_Module)-based system.\n\nCurrently checkpw is only tested on Linux, but it should work on a [AIX](https://en.wikipedia.org/wiki/IBM_AIX), [DragonFly BSD](https://www.dragonflybsd.org/), [FreeBSD](https://www.freebsd.org/), [HP-UX](https://en.wikipedia.org/wiki/HP-UX), [Linux](https://kernel.org/), [macOS](https://en.wikipedia.org/wiki/MacOS), [NetBSD](https://netbsd.org/) and [Solaris](https://en.wikipedia.org/wiki/Oracle_Solaris) operating system too.\n\n## The idea\n\nI needed a program to verify passwords of users on Linux/UNIX systems using PAM that just returns 0 on success and 1 on error.\n\n## Building checkpw\n\n```\ngit clone https://git.xw3.org/xw3/checkpw.git\ncd checkpw\nmake\n```\n\nThe code only supports verifying passwords for user id 1000 by default. Look at the file checkpw.h for some compile time options!\n\n### Custom build example\n\nSet MAX_UID and MIN_UID at compile time:\n\n```\ngcc -Wall -DMAX_UID=1000 -DMIN_UID=1000 -o checkpw checkpw.c -lpam -lpam_misc\n```\n\n## Installation\n\n**WARNING:** Install this software with care. checkpw could easily be used for bruteforcing passwords from local users!\n\n```\nsudo make install\n```\n\ncheckpw is installed to /usr/bin/.\n\ncheckpw.h is installed to /usr/include/ for use in other applications.\n\n## Uninstall\n\n```\nsudo make uninstall\n```\n\n## Usage\n\n```\ncheckpw -h\nUsage: checkpw [-u \u003cusername\u003e] [-p \u003cpassword\u003e] [-v] [-V] [-h]\n\nOptions:\n  -u \u003cusername\u003e  Set username.\n  -p \u003cpassword\u003e  Set password.\n  -v             Enable verbose mode.\n  -V             Print program version.\n  -h             Show this help.\n```\n\nYou can also use checkpw even without installing by just running the following command:\n\n```\n./checkpw\n```\n\n### Return codes\n\ncheckpw returns 0 on success, 1 otherwise.\n\n### Examples\n\n\n#### Interactive mode asking for a username and a password\n\n```\ncheckpw\n```\n\n#### Interactive mode only asking for a password\n\n```\ncheckpw -u hanez\n```\n\n#### None interactive mode with username and password provided as arguments to checkpw\n\n```\ncheckpw -u hanez -p password\n```\n\n#### Request the result from the above commands\n\n```\necho $?\n```\n\n## License\n\ncheckpw is licensed under the Apache License, Version 2.0.\n\nSee LICENSE for details.\n\n## Links\n\n - [Homepage of checkpw](https://git.xw3.org/xw3/checkpw)\n - [https://cr.yp.to/checkpwd.html](https://cr.yp.to/checkpwd.html)\n - [https://pamtester.sourceforge.net/](https://pamtester.sourceforge.net/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanez%2Fcheckpw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanez%2Fcheckpw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanez%2Fcheckpw/lists"}