Skip to main content

Change a UNIX password via web UI

Project description

This packages provides a web UI for the UNIX passwd command, e.g. so that SFTP-only user accounts can still change their password.

WARNING: The passwords are passed in plaintext via popen from the CGI process to the helper process that runs under sudo. So maybe don’t use this in an adversarial environment where people might spy on your process list or something.

Usage

Set up your webserver to run the CGI script. Here’s an example apache configuration snippet:

ScriptAlias /passwd /path/to/venv/bin/webpasswd-cgi

As changing the password for another user requires root access, you also need to setup passwordless sudo execution for the webpasswd-change helper. Add a rule like this, e.g. in /etc/sudoers.d/webpasswd:

www-data ALL=NOPASSWD:/path/to/venv/bin/webpasswd-change

(www-data means the user the webserver executing the CGI script runs as.)

You can pass the following environment variables to the CGI script:

WEBPASSWD_CHANGE:

Path to webpasswd-change helper. If unset, assumes a virtualenv installation (so it’s located next to webpasswd-cgi)

WEBPASSWD_STYLESHEET:

URL to a stylesheet to link to instead of using the built-in styles

Running tests

You’ll need to add a user account webpasswd, and interactively during the test run reset its password as instructed.

CHANGES

2.0.0 (2018-03-04)

  • Rewrite using python-pam, Flask, Python-3 compatible, pip-installable.

1.0.0 (2008-07-10)

  • First working version, using PyPAM.so and webpy.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ws.webpasswd-2.0.0.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file ws.webpasswd-2.0.0.tar.gz.

File metadata

  • Download URL: ws.webpasswd-2.0.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ws.webpasswd-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b722f208ae6937abae336087929c31b197bd190e94556893c5cfcfe2eb5aa3f5
MD5 9a9384a6ce33ef630a4638e473d12997
BLAKE2b-256 8c3d00222ac8cd782b6bfe7a14f4a7d8ef81b15249265240fd1946e86ac27d79

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page