Changeset 844 for n4d-samba


Ignore:
Timestamp:
Mar 14, 2016, 9:32:18 AM (4 years ago)
Author:
hectorgh
Message:

stop relying on golem to create roadming password

File:
1 edited

Legend:

Unmodified
Added
Removed
  • n4d-samba/trunk/fuentes/install/usr/share/n4d/python-plugins/SambaManager.py

    r186 r844  
    1414import time
    1515import tarfile
     16import random
     17import string
    1618
    1719from jinja2 import Environment
     
    245247               
    246248                environment_vars=objects["VariablesManager"].get_variable_list(["LDAP_BASE_DN"])
    247                 environment_vars["PASSWORD"]=objects["Golem"].ldap.generate_random_ssha_password()
     249                password="".join(random.sample(string.letters+string.digits, 4))
     250                environment_vars["PASSWORD"]=objects['SlapdManager'].generate_ssha_password(password).strip()
    248251                string_template=template.render(environment_vars).encode("utf-8")
    249252                aux_dic=ast.literal_eval(string_template)
Note: See TracChangeset for help on using the changeset viewer.