terminal – How to produce a system user/group that will appear in/ etc/passwd and/ etc/groups?

I wish to programmatically produce a system user (and group) for a brand-new system service I’m dealing with. I have actually followed the tips to utilize dscl here:

https://serverfault.com/questions/20702/how-do-i-create-user-accounts-from-the-terminal-in-mac-os-x-10-5

dscl apparently develops the user however id and group commands report that the user does not exist. / etc/passwd and / etc/groups likewise do not reveal the recently produced user.

I’m essentially searching for the practical equivalent of:

 useradd -r -s/ bin/false USERNAME

And I anticipate id and group commands to work later.

Likewise, I see most system users noted in / etc/passwd have a highlight prefixed to their name (e.g. _ dovecot). Unsure why that holds true or if it is very important however it’ll be frustrating if I need to utilize various user account names throughout platforms.

Like this post? Please share to your friends:
Leave a Reply

;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: