Submit
Path:
~
/
/
usr
/
share
/
psa-roundcube
/
plugins
/
password
/
helpers
/
File Content:
chpass-wrapper.py
#!/usr/bin/env python import sys import pwd import subprocess BLACKLIST = ( # add blacklisted users here #'user1', ) try: username, password = sys.stdin.readline().split(':', 1) except ValueError: sys.exit('Malformed input') try: user = pwd.getpwnam(username) except KeyError: sys.exit('No such user: %s' % username) if user.pw_uid < 1000: sys.exit('Changing the password for user id < 1000 is forbidden') if username in BLACKLIST: sys.exit('Changing password for user %s is forbidden (user blacklisted)' % username) handle = subprocess.Popen('/usr/sbin/chpasswd', stdin = subprocess.PIPE, universal_newlines = True) handle.communicate('%s:%s' % (username, password)) sys.exit(handle.returncode)
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
change_ldap_pass.pl
2649 bytes
0644
chgdbmailusers.c
514 bytes
0644
chgsaslpasswd.c
554 bytes
0644
chgvirtualminpasswd.c
535 bytes
0644
chpass-wrapper.py
749 bytes
0644
passwd-expect
8117 bytes
0644
N4ST4R_ID | Naxtarrr