Hi V.K.:
The "sudo find /Users/jay -user _unknown -exec sudo chown jay: {} \;"
is just an example. I would not actually use that on the home directory,
although it would work, but it would not change any other files/directories
with improper ownership such as "root", it would only change files/directories
with "_unknown" ownership, which does make it desirable for fixing data drives.
A person would be wise to, beforehand to use only the find portion of the command
to locate potential files that need changing:
"sudo find /path/to/file -user _unknown" will find them nicely.
Actually "sudo find /path/to/file -uid 501" may work better for the OP.
Yes, I was a bit off on my syntax on dscl
this would be correct:
sudo dscl . -delete /Users/test_account UniqueID 501
followed by
sudo dscl . -delete /Users/test_account
(it takes both commands to wipe out all account info).
Of course since the OP named his new test account the same as his old test account,
that is probably why he has no access to and cannot release user ID 501, so I definitely
don't recommend using dscl before fixing the account name conflict.
In fact the best way fix account problems is through Apple's GUI program Workgroup
Manager (in the server admin toolkit). Now that I use WGM so much, I've gotten rusty
using dscl. dscl is pretty crude compared to WGM. Remnant account info will show up
in WGM and dealing with it is easier. Changing names and user account info is a snap
in WGM and much less likely to "brick" the account than with other methods.
http://support.apple.com/kb/DL968
Just my personal opinion, but I don't see any practical use for the "_unknown user"
account, and if it causes a security problem or something else, I haven't been able to
verify it. I find that can cause confusion and complexity in dealing with actual file ownership.

Kj ♘