mirror of https://github.com/jumpserver/jumpserver
更改显示
parent
8756172b9b
commit
1ea85c3b19
|
@ -305,24 +305,24 @@ def addUser(request):
|
|||
|
||||
user_dn = "uid=%s,ou=People,%s" % (username, ldap_base_dn)
|
||||
userPassword = gen_sha512(keygen(6), ldap_password)
|
||||
user_attr = {'uid': [str(username)],
|
||||
'cn': [str(username)],
|
||||
'objectClass': ['account', 'posixAccount', 'top', 'shadowAccount'],
|
||||
'userPassword': ['{crypt}%s' % userPassword],
|
||||
'shadowLastChange': ['16328'],
|
||||
'shadowMin': ['0'],
|
||||
'shadowMax': ['99999'],
|
||||
'shadowWarning': ['7'],
|
||||
'loginShell': ['/bin/bash'],
|
||||
'uidNumber': [str(u.id)],
|
||||
'gidNumber': [str(u.id)],
|
||||
'homeDirectory': [str('/home/%s' % username)]
|
||||
}
|
||||
user_attr = {
|
||||
'uid': [str(username)],
|
||||
'cn': [str(username)],
|
||||
'objectClass': ['account', 'posixAccount', 'top', 'shadowAccount'],
|
||||
'userPassword': ['{crypt}%s' % userPassword],
|
||||
'shadowLastChange': ['16328'],
|
||||
'shadowMin': ['0'],
|
||||
'shadowMax': ['99999'],
|
||||
'shadowWarning': ['7'],
|
||||
'loginShell': ['/bin/bash'],
|
||||
'uidNumber': [str(u.id)],
|
||||
'gidNumber': [str(u.id)],
|
||||
'homeDirectory': [str('/home/%s' % username)]}
|
||||
|
||||
group_dn = "cn=%s,out=Group,%s" % (username, ldap_base_dn)
|
||||
group_attr = {
|
||||
'objectClass': ['posixGroup', 'top'],
|
||||
'cn': [username],
|
||||
'cn': [str(username)],
|
||||
'userPassword': ['{crypt}x'],
|
||||
'gidNumber': [str(u.id)]
|
||||
}
|
||||
|
|
|
@ -26,8 +26,15 @@
|
|||
<td><input type="checkbox" name="selected" value="{{ user.id }}"></td>
|
||||
<td>{{ user.id }}</td>
|
||||
<td>{{ user.username }}</td>
|
||||
<td>{{ user.group }}</td>
|
||||
<td>{{ user.name }}</td>
|
||||
<!--<td>{{ user.group }}</td>-->
|
||||
<td>
|
||||
{% for group in user.group.all() %}
|
||||
{{ group.name }}
|
||||
{% endfor}
|
||||
</td>
|
||||
<td>{{ user.is_admin }}</td>
|
||||
<td>{{ user.is_superuser }}</td>
|
||||
<td>{{ user.email }}</td>
|
||||
<td><a href="/downKey/">下载</a></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue