|
|
|
@ -562,6 +562,7 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
gid = False
|
|
|
|
|
fullName = ""
|
|
|
|
|
mail = ""
|
|
|
|
|
jid = ""
|
|
|
|
|
if searchUser[0][0][1].has_key('uidNumber'):
|
|
|
|
|
uid = searchUser[0][0][1]['uidNumber'][0]
|
|
|
|
|
if searchUser[0][0][1].has_key('gidNumber'):
|
|
|
|
@ -573,10 +574,12 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
fullName = searchUser[0][0][1]['cn'][0]
|
|
|
|
|
if searchUser[0][0][1].has_key('mail'):
|
|
|
|
|
mail = searchUser[0][0][1]['mail'][0]
|
|
|
|
|
if searchUser[0][0][1].has_key('registeredAddress'):
|
|
|
|
|
jid = searchUser[0][0][1]['registeredAddress'][0]
|
|
|
|
|
if searchUser[0][0][1].has_key('homeDirectory'):
|
|
|
|
|
home = searchUser[0][0][1]['homeDirectory'][0]
|
|
|
|
|
if uid and gid:
|
|
|
|
|
return (uid, gid, fullName, mail, home, group)
|
|
|
|
|
return (uid, gid, fullName, mail, jid ,home, group)
|
|
|
|
|
else:
|
|
|
|
|
return ()
|
|
|
|
|
|
|
|
|
@ -687,11 +690,12 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
fullName = resPasswd.split(":")[4]
|
|
|
|
|
mail = ""
|
|
|
|
|
group = ""
|
|
|
|
|
jid = ""
|
|
|
|
|
home = os.path.join("/home",userName)
|
|
|
|
|
resGroup = self.searchGroupGid(gid)
|
|
|
|
|
if resGroup:
|
|
|
|
|
group = resGroup.split(":")[0]
|
|
|
|
|
return (uid, gid, fullName, mail, home, group)
|
|
|
|
|
return (uid, gid, fullName, mail, jid, home, group)
|
|
|
|
|
else:
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
@ -736,8 +740,9 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
gid = int(uidGid[1])
|
|
|
|
|
fullName = uidGid[2]
|
|
|
|
|
mail = uidGid[3]
|
|
|
|
|
homeDir = uidGid[4]
|
|
|
|
|
group = uidGid[5]
|
|
|
|
|
jid = uidGid[4]
|
|
|
|
|
homeDir = uidGid[5]
|
|
|
|
|
group = uidGid[6]
|
|
|
|
|
# Создаем пользовательскую директорию
|
|
|
|
|
self.clVars.Set('cl_root_path',homeDir,True)
|
|
|
|
|
homeExists = os.path.exists(homeDir)
|
|
|
|
@ -758,11 +763,13 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(homeDir):
|
|
|
|
|
self.createUserDir(uid, gid, homeDir)
|
|
|
|
|
|
|
|
|
|
# Записываем переменные
|
|
|
|
|
self.clVars.Set('ur_login',userName)
|
|
|
|
|
self.clVars.Set('ur_fullname',fullName)
|
|
|
|
|
self.clVars.Set('ur_mail',mail)
|
|
|
|
|
self.clVars.Set('ur_group',group)
|
|
|
|
|
self.clVars.Set('ur_login', userName)
|
|
|
|
|
self.clVars.Set('ur_fullname', fullName)
|
|
|
|
|
self.clVars.Set('ur_mail', mail)
|
|
|
|
|
self.clVars.Set('ur_jid', jid)
|
|
|
|
|
self.clVars.Set('ur_group', group)
|
|
|
|
|
# Применяем профили для пользователя
|
|
|
|
|
dirsAndFiles = self.applyProfilesFromUser(progress)
|
|
|
|
|
if not dirsAndFiles:
|
|
|
|
@ -1093,7 +1100,7 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
return False
|
|
|
|
|
uid = int(resLdap[0])
|
|
|
|
|
gid = int(resLdap[1])
|
|
|
|
|
homeDir = resLdap[4]
|
|
|
|
|
homeDir = resLdap[5]
|
|
|
|
|
home = os.path.split(homeDir)[0]
|
|
|
|
|
pathRemote = []
|
|
|
|
|
# Удаленный ресурс профилей
|
|
|
|
@ -1251,7 +1258,7 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
home = "/home"
|
|
|
|
|
homeDir = os.path.join(home,userName)
|
|
|
|
|
else:
|
|
|
|
|
homeDir = resLdap[4]
|
|
|
|
|
homeDir = resLdap[5]
|
|
|
|
|
home = os.path.split(homeDir)[0]
|
|
|
|
|
pathRemote = []
|
|
|
|
|
# Удаленный ресурс профилей
|
|
|
|
@ -1419,7 +1426,7 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
return False
|
|
|
|
|
uid = int(resLdap[0])
|
|
|
|
|
gid = int(resLdap[1])
|
|
|
|
|
homeDir = resLdap[4]
|
|
|
|
|
homeDir = resLdap[5]
|
|
|
|
|
# При отсуствии создаем домашнюю директорию
|
|
|
|
|
if not os.path.exists(homeDir):
|
|
|
|
|
os.makedirs(homeDir)
|
|
|
|
|