@staticmethod
    def system_user_exists(user):
        try:
            pwd.getpwnam(user.name)
        except KeyError:
            return False
        else:
            return True
Check if the user exists on the system
dataset/ETHPy150Open jupyterhub/jupyterhub/jupyterhub/auth.py/LocalAuthenticator.system_user_exists