def createCnfFile(self, textCnf): '''Generate openssl.cnf file''' if not os.path.exists(self.sslFile): self.printERROR(_("%s not found")%self.sslFile) return False strData = time.strftime("%Y%m%d%H%M%S",time.localtime(time.time())) cnfFileName = "%s.%s.cnf" %(strData,genpassword()) if not os.path.exists(self.tmpDir): self._createDir(self.tmpDir) cnfFile = os.path.join(self.tmpDir,cnfFileName) self._createFile(cnfFile, textCnf) return cnfFile
def get_ld_unix_pw(self): """пароль администратора сервиса Unix""" return cl_utils.genpassword().strip()
def get_ld_admin_pw(self): """пароль root""" return cl_utils.genpassword().strip()
def get_ld_temp_pw(self): """пароль временного пользователя root""" return cl_utils.genpassword().strip()
def get_ld_dns_pw(self): """пароль администратора сервиса DNS""" return cl_utils.genpassword().strip()
def get_ld_repl_pw(self): """пароль ветки репликации""" return cl_utils.genpassword().strip()
def get_ld_proxy_pw(self): """пароль администратора сервиса Proxy""" return cl_utils.genpassword().strip()
def get_ld_jabber_pw(self): """пароль администратора сервиса Jabber""" return cl_utils.genpassword().strip()
def get_ld_mail_pw(self): """пароль администратора сервиса Mail""" return cl_utils.genpassword().strip()
def get_ld_samba_pw(self): """пароль администратора сервиса Samba""" return cl_utils.genpassword().strip()
def get_ld_admin_pw(self): """password root""" return genpassword()
def get_ld_temp_pw(self): """пароль временного пользователя root""" return genpassword()
def get_cl_builder_iso_path(self): directory = "/var/calculate/tmp/iso" newDirectoryName = directory while path.exists(newDirectoryName): newDirectoryName = "%s.%s"%(directory,genpassword(8)) return newDirectoryName