'Return the user record corresponding to the given username.'

def getpwnam(self, name):

    for entry in self._users:
        if (entry.pw_name == name):
            return entry
    raise KeyError()
