Adjust spaces and newlines

This commit is contained in:
Anthony Wang 2021-08-20 17:03:44 -05:00
parent 1aa1da4777
commit b3eb09dd07
Signed by: a
GPG key ID: BC96B00AEC5F2D76
2 changed files with 4 additions and 2 deletions

View file

@ -15,6 +15,7 @@ password = os.popen('tr -dc A-Za-z0-9 </dev/urandom | head -c 16; echo ""').read
hashedpassword = os.popen('slappasswd -s ' + password).read()
print('Password:', password)
# Construct LDIF
ldif = '''dn: uid={username},ou=People,dc=exozy,dc=me
objectClass: top

View file

@ -7,9 +7,10 @@ import os
username = input('Enter username: ')
if username == 'Manager':
bind_user = 'cn=Manager,dc=exozy,dc=me'
bind_user = 'cn=Manager,dc=exozy,dc=me'
else:
bind_user = 'uid=' + username + ',ou=People,dc=exozy,dc=me'
bind_user = 'uid=' + username + ',ou=People,dc=exozy,dc=me'
# Modify user
os.system('EDITOR=nano ldapvi --user ' + bind_user)