Change a UNIX password via web UI
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.
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 means the user the webserver executing the CGI script runs as.)
You can pass the following environment variables to the CGI script:
|Path to webpasswd-change helper. If unset, assumes a virtualenv installation (so it’s located next to webpasswd-cgi)|
|URL to a stylesheet to link to instead of using the built-in styles|
You’ll need to add a user account webpasswd, and interactively during the test run reset its password as instructed.
- Handle PATH_INFO internally
- Rewrite using python-pam, Flask, Python-3 compatible, pip-installable.
- First working version, using PyPAM.so and webpy.org
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ws.webpasswd-2.0.1.tar.gz (7.2 kB)||File type Source||Python version None||Upload date||Hashes View hashes|