adding machines/users through the CLI

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

Previous topic - Next topic

neozeed

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/192.168.1.104
niutil -createprop . /machines/192.168.1.104 name 192.168.1.104
niutil -createprop . /machines/192.168.1.104 ip_address 192.168.1.104



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


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>