I've made a few daemon accounts with 'dscl', but unfortunately I didn't take good notes on what commands I issued. I had found decent instructions on creating a minecraft server on macOS which was really useful but now I can't seem to find it.
You can see what's "necessary" by examining one of the built-in daemons. For example,
dscl . read /Users/_sshd
Shows me:
AppleMetaNodeLocation: /Local/Default
GeneratedUID: FFFFEEEE-DDDD-CCCC-BBBB-AAAA0000004B
NFSHomeDirectory: /var/empty
Password: *
PrimaryGroupID: 75
RealName:
sshd Privilege separation
RecordName: _sshd sshd
RecordType: dsRecTypeStandard:Users
UniqueID: 75
UserShell: /usr/bin/false
You'll need to figure out an appropriate UniqueID that isn't being use on your system. IIRC numbers starting at 300 were unused, so that's where I made mine.
This will show you all the UniqueID's on your system:
dscl . readall /Users UniqueID
Oh yeah, the existing Apple daemons also belong to their own unique group -- I doubt that's necessary and you could just assign your to group 'staff' (i.e., 20). Otherwise you'd ahve to create the group records, too.
Oh, found one of the sources I used:
https://minecraft.fandom.com/wiki/T...startup_daemon#The_hard_.28and_correct.29_way
Hope that helps some.