implement getpwnam with api setpwent,getpwent,endpwent.