    def normalize_username(self, username):
        """Round-trip the username to normalize it with PAM

        PAM can accept multiple usernames as the same user, normalize them."""
        if self.pam_normalize_username:
            import pwd

            uid = pwd.getpwnam(username).pw_uid
            username = pwd.getpwuid(uid).pw_name
            username = self.username_map.get(username, username)
            return username
        else:
            return super().normalize_username(username)
Round-trip the username to normalize it with PAM

PAM can accept multiple usernames as the same user, normalize them.
jupyterhub/auth.py