Fix segfault were modifying the uid of a user Do a direct commit as the code on head has changed a lot and does not fail in that case PR: 202111 Reported by: gondim@bsdinfo.com.br