Generate master password from Simo.

This commit is contained in:
Karl MacMillan
-
parent 7ce4df7038
commit 67cddce4d4
4 changed files with 17 additions and 27 deletions

View File

@@ -23,6 +23,8 @@ import string
import tempfile
import logging
import subprocess
from random import Random
from time import gmtime
import os
import stat
import socket
@@ -331,3 +333,13 @@ def parse_generalized_time(timestr):
except ValueError:
return None
def ipa_generate_password():
rndpwd = ''
r = Random()
r.seed(gmtime())
for x in range(12):
# rndpwd += chr(r.randint(32,126))
rndpwd += chr(r.randint(65,90)) #stricter set for testing
return rndpwd