|
|
|
@ -780,8 +780,10 @@ class shareLdap(imp_cl_err, imp_cl_xml, imp_cl_help, imp_cl_smcon):
|
|
|
|
|
|
|
|
|
|
При копировании сохраняются владелец, группа, права
|
|
|
|
|
"""
|
|
|
|
|
if os.path.exists(destDir) and not os.listdir(destDir):
|
|
|
|
|
os.rmdir(destDir)
|
|
|
|
|
if not os.path.exists(destDir):
|
|
|
|
|
# Создаем домашнюю директорию
|
|
|
|
|
# Создаем директорию
|
|
|
|
|
os.makedirs(destDir)
|
|
|
|
|
# Файловый объект
|
|
|
|
|
fileObj = cl_profile._file()
|
|
|
|
@ -4113,7 +4115,7 @@ class servSamba(shareLdap):
|
|
|
|
|
return False
|
|
|
|
|
if os.path.exists(userNetlogonDir) and os.listdir(userNetlogonDir):
|
|
|
|
|
if not self.backupDelUser(userName, 'samba/netlogon',
|
|
|
|
|
winProfDir):
|
|
|
|
|
userNetlogonDir):
|
|
|
|
|
return False
|
|
|
|
|
textLine = self.execProg("smbpasswd -x %s" %(delUser), False, False)
|
|
|
|
|
flagError = False
|
|
|
|
@ -4286,7 +4288,7 @@ class servSamba(shareLdap):
|
|
|
|
|
"samba/home", term)
|
|
|
|
|
if not resHome:
|
|
|
|
|
flagError = True
|
|
|
|
|
createDirLogon = False
|
|
|
|
|
createDirHome = False
|
|
|
|
|
else:
|
|
|
|
|
term, createDirHome, removeHomeBack = resHome
|
|
|
|
|
|
|
|
|
@ -4296,7 +4298,7 @@ class servSamba(shareLdap):
|
|
|
|
|
"samba/netlogon", term)
|
|
|
|
|
if not resLogon:
|
|
|
|
|
flagError = True
|
|
|
|
|
createDirHome = False
|
|
|
|
|
createDirLogon = False
|
|
|
|
|
else:
|
|
|
|
|
term, createDirLogon, removeLogonBack = resLogon
|
|
|
|
|
|
|
|
|
@ -4323,13 +4325,13 @@ class servSamba(shareLdap):
|
|
|
|
|
gid = int(resPasswd.split(":")[3])
|
|
|
|
|
# Не удаляемые директории
|
|
|
|
|
notDeletedDirs = []
|
|
|
|
|
if os.path.exists(createDirHome):
|
|
|
|
|
if createDirHome and os.path.exists(createDirHome):
|
|
|
|
|
notDeletedDirs.append(createDirHome)
|
|
|
|
|
if os.path.exists(createDirLogon):
|
|
|
|
|
if createDirLogon and os.path.exists(createDirLogon):
|
|
|
|
|
notDeletedDirs.append(createDirLogon)
|
|
|
|
|
if os.path.exists(createDirWinProfile):
|
|
|
|
|
if createDirWinProfile and os.path.exists(createDirWinProfile):
|
|
|
|
|
notDeletedDirs.append(createDirWinProfile)
|
|
|
|
|
if os.path.exists(createDirLinProfile):
|
|
|
|
|
if createDirLinProfile and os.path.exists(createDirLinProfile):
|
|
|
|
|
notDeletedDirs.append(createDirLinProfile)
|
|
|
|
|
if (resPasswd or resSearchUnix) and\
|
|
|
|
|
(options.has_key('n') or int(uid) >=1000):
|
|
|
|
|