{"id":42924706,"url":"https://github.com/pierreforstmann/pgpasswd","last_synced_at":"2026-01-30T18:06:57.443Z","repository":{"id":131595320,"uuid":"385997517","full_name":"pierreforstmann/pgpasswd","owner":"pierreforstmann","description":"Change PostgreSQL account password from Linux command line without psql.","archived":false,"fork":false,"pushed_at":"2025-12-02T16:27:46.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T14:57:35.962Z","etag":null,"topics":["c","libpq","postgresql"],"latest_commit_sha":null,"homepage":"","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/pierreforstmann.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":"2021-07-14T16:01:15.000Z","updated_at":"2025-12-02T16:27:50.000Z","dependencies_parsed_at":"2025-02-18T21:26:44.105Z","dependency_job_id":"5799f2f8-bfdb-474a-b732-4f9712e34fe0","html_url":"https://github.com/pierreforstmann/pgpasswd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pierreforstmann/pgpasswd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreforstmann%2Fpgpasswd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreforstmann%2Fpgpasswd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreforstmann%2Fpgpasswd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreforstmann%2Fpgpasswd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierreforstmann","download_url":"https://codeload.github.com/pierreforstmann/pgpasswd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierreforstmann%2Fpgpasswd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28917033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T16:37:38.804Z","status":"ssl_error","status_checked_at":"2026-01-30T16:37:37.878Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","libpq","postgresql"],"created_at":"2026-01-30T18:06:56.756Z","updated_at":"2026-01-30T18:06:57.438Z","avatar_url":"https://github.com/pierreforstmann.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgpasswd\nChange or reset PostgreSQL account password from Linux command line without entering any SQL statement and sending the **encrypted** password to server.\u003cbr\u003e\n\n`chpasswd` and `resetpasswd`  have been successfully tested with PostgreSQL 13, 14, 15, 16, 17 and 18 on Debian 12 and openSSL 3.0.7 with `password_encryption` set to `scram-sha-256` or to `md5`. \u003cbr\u003e\nHowever compilation fails on Alma Linux 8.10 as of PostgreSQL 15.15, 16.11, 17.7 and 18.0 likely due to some incompatibilities with openSSL 1.1.1 and recent PostgreSQL versions.\n\n## Installation\n\n`pgpasswd` is a PostgreSQL extension :  `chpasswd` and `resetpasswd` are standalone executables (no need to install anything in the database, no `CREATE EXTENSION` to run).\n\n### Compiling\n\nThis module can be built using the standard PGXS infrastructure. \nIt can also be built using a standard PostgreSQL server installation that includes the corresponding PG development package to be able to compile libpq code:\nfor example to compile with PG 17 on RHEL-like systems `postgresql17-devel` RPM must be installed.\n\nIn both cases the `pg_config` program must be available in your $PATH:\n\n```\ngit clone https://github.com/pierreforstmann/pgpasswd.git \ncd pgpasswd\nmake \n```\n\n`make install` installs `chpasswd` and `resetpasswd` to PostgreSQL binaries directory returned by:\n```\npg_config --bindir\n```\n\n## Usage\n\n`chpasswd` for PostgreSQL can be compared to `passwd` on Linux and UNIX systems when used to change current user password.\n\nEnter:\n* same parameters (host name, port number, user account and database name) as `psql` to connect to PostgreSQL \n* current user password once\n* current user new password twice.\n\nExample:\n\n``` \nchpasswd -h localhost -p 5432 -U test -d postgres\nPassword:\nNew password:\nConfirm new password:\nPassword changed.\n```\n\nDetailed PG client and PG server versions can be displayed with -v option after successfull connexion:\n```\n$ ./chpasswd -h localhost -p 5432 -d postgres -U test -v\nPassword:\nPG libpq version: 170004\nconninfo: host=localhost port=5432 dbname=postgres user=test password=test  \nPG server version: 170004\nNew password:\nPassword changed.\n```\n\n`resetpasswd` for PostgreSQL can be compared to `passwd` on Linux and UNIX systems when used to change another user password:\n\nEnter:\n* same parameters (host name, port number, superuser account and database name) as `psql` to connect to PostgreSQL\n* other user account for which password must be reset \n* other user account new password twice.\n\nExample:\n\n``` \nresetpasswd -h localhost -p 5432 -U admin -d postgres\nPassword:\nAccount:test\nNew password:\nConfirm new password:\nPassword successfully reset.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierreforstmann%2Fpgpasswd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierreforstmann%2Fpgpasswd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierreforstmann%2Fpgpasswd/lists"}