fyi, in Red Hat, you can use the /usr/sbin/vipw command to manually edit the /etc/passwd file. This is safer than editing it with a normal editor. Here's the description from the vipw man page...
Vipw edits the password file after setting the appropriate locks, and
does any necessary processing after the password file is unlocked. If
the password file is already locked for editing by another user, vipw
will ask you to try again later. The default editor for vipw is vi(1).
ChrisP
RHCE, LPIC-1, CCNA, CNE, MCSE, +10 others