code: def __ldap_attr(self, fname, lname, type, group,
                      group_api):  # pragma: no cover
          
          return {
              'uid':
              str(self.username).encode(),
              'cn':
              ' '.join([fname, lname]).encode(),
              'sn':
              str(lname).encode(),
              'givenname':
              str(fname).encode(),
              'homedirectory':
              os.path.join(os.path.sep, 'home', self.username).encode(),
              'loginshell':
              os.path.join(os.path.sep, 'bin', 'bash').encode(),
              'mail':
              '@'.join([self.username, self.client.mail_domain]).encode(),
              'uidnumber':
              self.__uidnumber(type),
              'gidnumber':
              API.__gidnumber(group, group_api),
              'userpassword':
              str('{SSHA}' + API.__create_password().decode()).encode(),
          }
docs: User LDAP attributes.