I am not sure why this happened I think it's because the file was in use by another duplicate process or script.
userdel user userdel: cannot lock /etc/passwd; try again later.
userdel, user, etc, passwd, duplicate,