mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-21 03:34:50 +00:00
build proper dockerized example
This commit is contained in:
12
docker/root/scripts/password_reset.py
Normal file
12
docker/root/scripts/password_reset.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/python
|
||||
import string
|
||||
import random
|
||||
from subprocess import call
|
||||
|
||||
new_password = ''.join(random.SystemRandom()
|
||||
.choice(string.ascii_uppercase + string.digits)
|
||||
for _ in range(16))
|
||||
|
||||
call("/bin/echo -e \"{}\\n{}\" | passwd myuser"
|
||||
.format(new_password, new_password), shell=True)
|
||||
|
||||
Reference in New Issue
Block a user