mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-20 11:14:51 +00:00
13 lines
338 B
Python
13 lines
338 B
Python
#!/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)
|
|
|