|
|
|
@ -37,7 +37,7 @@ from cl_print import color_print
|
|
|
|
|
from cl_ldap import ldapUser
|
|
|
|
|
from client.progressbar import ProgressBar
|
|
|
|
|
from cl_utils import runOsCommand, getpathenv, getModeFile, removeDir, isMount,\
|
|
|
|
|
appendProgramToEnvFile, removeProgramToEnvFile
|
|
|
|
|
appendProgramToEnvFile, removeProgramToEnvFile, pathJoin
|
|
|
|
|
from _cl_keys import getKey, clearKey
|
|
|
|
|
from convertenv import convertEnv
|
|
|
|
|
from encrypt import encrypt
|
|
|
|
@ -2055,6 +2055,22 @@ you need to remove it from the previous domain"))
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def copyHomeDirs(self):
|
|
|
|
|
cacheObj = userCache()
|
|
|
|
|
loginUsersData = cacheObj.getLoginDomainUsers()
|
|
|
|
|
if loginUsersData is False:
|
|
|
|
|
return False
|
|
|
|
|
previousHome = "/var/calculate/client-home"
|
|
|
|
|
for userName, x, uid, gid, gecos, directory, shell in loginUsersData:
|
|
|
|
|
srcDir = pathJoin(previousHome, directory)
|
|
|
|
|
destDir = directory
|
|
|
|
|
if os.path.exists(srcDir):
|
|
|
|
|
if not os.path.exists(destDir):
|
|
|
|
|
if not self.copyTemplateDir(srcDir, destDir):
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def mountRemote(self):
|
|
|
|
|
"""Монтирование remote если компьютер в домене
|
|
|
|
|
|
|
|
|
@ -2105,6 +2121,8 @@ you need to remove it from the previous domain"))
|
|
|
|
|
return False
|
|
|
|
|
if not self.cAddCacheUsersFromSystem():
|
|
|
|
|
return False
|
|
|
|
|
if not self.copyHomeDirs():
|
|
|
|
|
return False
|
|
|
|
|
if beforeRemoteAuth != self.clVars.Get('os_remote_auth'):
|
|
|
|
|
self.restartDBus()
|
|
|
|
|
return True
|
|
|
|
|