adding machines/users through the CLI

Started by neozeed, June 07, 2017, 01:31:37 pm

Previous topic - Next topic


Some things (cvs) will fail to connect to strict ip addresses, it wants a name.  So to add an IP into the netinfo db it would be something like this:

niutil -create . /machines/
niutil -createprop . /machines/ name
niutil -createprop . /machines/ ip_address

to add a hostname:
niutil -create . /machines/radhost
niutil -createprop . /machines/radhost name radhost
niutil -createprop . /machines/radhost ip_address

and for adding a user:

niutil -create . /users/neozeed
niutil -createprop . /users/neozeed name neozeed
niutil -createprop . /users/neozeed uid 100
niutil -createprop . /users/neozeed passwd
niutil -createprop . /users/neozeed gid 100
niutil -createprop . /users/neozeed realname Nobody Special
niutil -createprop . /users/neozeed shell /bin/tcsh
niutil -createprop . /users/neozeed home /Local/Users/neozeed

I'm 99.999% sure you don't need the 'name' property as it seems awfully redundant.  :roll:
# include <wittycomment.h>