Currently I am using pwd.getpwall(), which shows me the entire password database. But I just want the users accounts of the computer. And with using getpwall() I am unable to do this ...
if 'foo' in pwd.getpwall():
do stuff
since pwd.getpwall() returns a list of objects. And if I wanted to check if a user exist I would have to do a loop. I assume there is an easier way to do this.