def _shadowGetByName(username):
 if (spwd is not None):
  f = spwd.getspnam
 else:
  return None
 return runAsEffectiveUser(0, 0, f, username)

def _shadowGetByName ( username ) : if ( spwd is not None ) : f = spwd . getspnam else : return None return runAsEffectiveUser ( 0 , 0 , f , username )
look up a user in the /etc/shadow database using the spwd module .