[CentOS] Accidentally removed sync system user

Sun Oct 22 10:50:49 UTC 2017
Nicolas Kovacs <info at microlinux.fr>


As the subject says, I accidentally removed the 'sync' system user. (If
you want to know how I got to do that, I just experimented with hosting
my own Firefox Sync server on a public CentOS 7 server.)

When I removed the user, here's what I got:

# userdel -r sync
userdel : l'emplacement de boîte aux lettres de sync
(/var/spool/mail/sync) n'a pas été trouvé
userdel : /sbin n'appartient pas à sync, non supprimé

This was the exact moment I said: uh oh!

I logged in to another server, and here it is indeed:

# grep sync /etc/passwd

OK, so it looks I shot myself in the foot. I guess I could recreate that
user by issuing the following command:

# useradd -u 5 -g 0 -d /sbin/ -s /bin/sync sync

Since I'm not exactly sure and I wonder if I may have overlooked
something, I prefer to ask first before wrecking my system entirely.
Please correct me if I'm wrong.


Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info at microlinux.fr
Tél. : 04 66 63 10 32