Corrected usage of 'getent passwd' and replaced it with 'getpwent()'.