How to Delete User from /etc/passwd in FreeBSD
Many people might not know, in FreeBSD or any linux/unix system, you are not allow to delete a user or userid directly in /etc/passwd file. It should be done via pw userdel command in FreeBSD or userdel command in Linux machine.
For some reason, if you really need to delete the user from the file /etc/passwd, this is the command you need to run.
Deleting directly on the file of /etc/passwd might not reflect correctly in the system’s user sync. If you are trying to re-add the user into the system in future, you will get error mesg of user existed.
So, fire up the right command and make sure you delete the user correctly in Linux/Unix system.