|
|
|
@ -31,7 +31,7 @@ from os import path
|
|
|
|
|
from datavars import DataVarsClient, DataVars, __version__,__app__
|
|
|
|
|
|
|
|
|
|
from calculate.lib.cl_template import (Template, iniParser, TemplatesError,
|
|
|
|
|
ProgressTemplate)
|
|
|
|
|
ProgressTemplate, SystemIni)
|
|
|
|
|
from calculate.lib.cl_print import color_print
|
|
|
|
|
from calculate.lib.cl_ldap import ldapUser
|
|
|
|
|
from calculate.lib.utils.ip import Pinger, isOpenPort, IPError
|
|
|
|
@ -251,12 +251,10 @@ class Client(commandServer, encrypt, Desktop):
|
|
|
|
|
"""
|
|
|
|
|
self.clVars.Delete("cl_remote_host", "local")
|
|
|
|
|
self.clVars.Delete("cl_remote_pw", "local")
|
|
|
|
|
self.clVars.Delete("os_remote_auth")
|
|
|
|
|
self.clVars.Delete("os_remote_client")
|
|
|
|
|
SystemIni.delVar('client','connect')
|
|
|
|
|
self.clVars.Set("cl_remote_host", "", True)
|
|
|
|
|
self.clVars.Set("cl_remote_pw", "", True)
|
|
|
|
|
self.clVars.Set("os_remote_auth", "", True)
|
|
|
|
|
self.clVars.Set("os_remote_client", "", True)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def mountSambaRes(self,host,userName,userPwd,res,rpath,uid=None,gid=None):
|
|
|
|
@ -1078,12 +1076,11 @@ class Client(commandServer, encrypt, Desktop):
|
|
|
|
|
|
|
|
|
|
def writeClientVars(self,domain,currentVersion,pwdRemote):
|
|
|
|
|
"""
|
|
|
|
|
Записать переменные переменные клиента
|
|
|
|
|
Записать переменные клиента
|
|
|
|
|
"""
|
|
|
|
|
# write domain to config
|
|
|
|
|
self.clVars.Write("os_remote_auth", domain, True)
|
|
|
|
|
SystemIni.setVar('client',{'connect':domain})
|
|
|
|
|
# write current program version
|
|
|
|
|
self.clVars.Write("os_remote_client", currentVersion, True)
|
|
|
|
|
self.clVars.Write("cl_remote_host", domain, True, "local")
|
|
|
|
|
self.clVars.Write("cl_remote_pw", pwdRemote, True, "local")
|
|
|
|
|
return True
|
|
|
|
@ -1126,13 +1123,11 @@ class Client(commandServer, encrypt, Desktop):
|
|
|
|
|
self.printSUCCESS(_("The workstation is configured for work "
|
|
|
|
|
"in the domain"))
|
|
|
|
|
currentVersion = self.clVars.Get("cl_ver")
|
|
|
|
|
self.clVars.Write("os_remote_client", currentVersion, True)
|
|
|
|
|
self.clVars.Write("os_remote_auth", hostAuth, True)
|
|
|
|
|
SystemIni.setVar('client',{'connect':hostAuth})
|
|
|
|
|
else:
|
|
|
|
|
self.printSUCCESS(_("The workstation is configured for work "
|
|
|
|
|
"outside the domain"))
|
|
|
|
|
self.clVars.Delete("os_remote_auth")
|
|
|
|
|
self.clVars.Delete("os_remote_client")
|
|
|
|
|
SystemIni.delVar('client','connect')
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def cDelLdapSysUsersAndSyncCache(self):
|
|
|
|
|