build proper dockerized example

This commit is contained in:
Dominic Breuker
2018-02-18 14:03:59 +01:00
parent a31224ff21
commit c56430d8c4
13 changed files with 111 additions and 32 deletions

View 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)