|
|
|
@ -492,8 +492,12 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
self.createClVars()
|
|
|
|
|
uidGid = False
|
|
|
|
|
# Подсоединяемся к серверу
|
|
|
|
|
domain = self.clVars.Get("cl_remote_host")
|
|
|
|
|
domain = False
|
|
|
|
|
connectLdap = False
|
|
|
|
|
foundMountRemote = self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome = self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
if foundMountRemote and foundMountHome:
|
|
|
|
|
domain = self.clVars.Get("cl_remote_host")
|
|
|
|
|
if domain:
|
|
|
|
|
if not self.getLdapObjBind(domain):
|
|
|
|
|
return False
|
|
|
|
@ -548,16 +552,13 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
self.printSUCCESS(_("User account is configured") + " ...")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def isDomain(self, checkRemoteHost=True):
|
|
|
|
|
def isDomain(self):
|
|
|
|
|
"""Находится ли компьютер в домене"""
|
|
|
|
|
self.createClVars(self.clVars)
|
|
|
|
|
foundMountRemote =self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome =self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
remoteHost = True
|
|
|
|
|
if checkRemoteHost:
|
|
|
|
|
remoteHost =self.clVars.Get("cl_remote_host")
|
|
|
|
|
if not (remoteHost and foundMountRemote and\
|
|
|
|
|
foundMountHome):
|
|
|
|
|
foundMountRemote = self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome = self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
if not (self.clVars.Get("cl_remote_host") and foundMountRemote and\
|
|
|
|
|
foundMountHome):
|
|
|
|
|
self.printERROR("The computer is not in domain")
|
|
|
|
|
return False
|
|
|
|
|
return (foundMountRemote,foundMountHome)
|
|
|
|
@ -766,7 +767,9 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
"""Отмонтирование пользовательских ресурсов и синхронизация настроек"""
|
|
|
|
|
self.createClVars()
|
|
|
|
|
# В случае компьютера вне домена
|
|
|
|
|
if not self.clVars.Get("cl_remote_host"):
|
|
|
|
|
foundMountRemote = self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome = self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
if not (foundMountRemote and foundMountHome):
|
|
|
|
|
self.printSUCCESS(_("To be used by local profile."))
|
|
|
|
|
return True
|
|
|
|
|
connectDomain = self.isDomain()
|
|
|
|
@ -826,7 +829,9 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
без синхронизации настроек"""
|
|
|
|
|
self.createClVars(self.clVars)
|
|
|
|
|
# В случае компьютера вне домена
|
|
|
|
|
if not self.clVars.Get("cl_remote_host"):
|
|
|
|
|
foundMountRemote = self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome = self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
if not (foundMountRemote and foundMountHome):
|
|
|
|
|
self.printSUCCESS(_("To be used by local profile."))
|
|
|
|
|
return True
|
|
|
|
|
# Подсоединяемся к серверу
|
|
|
|
@ -871,7 +876,9 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
"""Монтирование пользовательских ресурсов и синхронизация настроек"""
|
|
|
|
|
self.createClVars()
|
|
|
|
|
# В случае компьютера вне домена
|
|
|
|
|
if not self.isDomain(False):
|
|
|
|
|
foundMountRemote = self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome = self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
if not (foundMountRemote and foundMountHome):
|
|
|
|
|
self.printSUCCESS(_("To be used by local profile."))
|
|
|
|
|
return True
|
|
|
|
|
# Проверим что компьютер в домене и смонтирован [remote]
|
|
|
|
|