It is a bad idea to open databases in text editors. It is likely to cause problems even if you did not change anything. The password databse would probably need rebuilt with pwd_mkdb.
Probably the easiest way to do this is to use /sbin/vipw, just doing ":wq" to save the changes (though there will be none), which will run pwd_mkdb for you.