Accidentally Removed Sync System User

Home » CentOS » Accidentally Removed Sync System User
CentOS No Comments

Hi,

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 sync:x:5:0:sync:/sbin:/bin/sync

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.

Cheers,

Niki

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

LEAVE A COMMENT