Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shogun!mike From: mike@shogun.cc.umich.edu (Michael Nowak) Newsgroups: comp.sys.next Subject: Loading large password files into NetInfo Message-ID: <1133@mailrus.cc.umich.edu> Date: 10 Jul 89 21:26:55 GMT Sender: usenet@mailrus.cc.umich.edu Reply-To: mike@shogun.us.cc.umich.edu () Organization: University of Michigan Computing Center, Ann Arbor Lines: 39 UUCP-Path: mailrus!shogun!mike Thanks for your help concerning the question of loading large password files into NetInfo. Although I didn't hear from NeXT, I did get two helpful responses from jgreely@cis.ohio-state.edu (J Greely) and alg@wrath.cs.cornell.edu (Anne Louise Gockel). Basically, there were two main ways to avoid using niload for a large password file. 1. You should run ypserv. You can even skip loading the yellow pages database and it will access /etc/passwd but we decided that this would be too slow, especially for a 4500 entry password file. 2. You could use niutil to load the file in chunks. J Greely suggested this script: ----- cut here ----- #!/bin/sh awk -F: -f - $* <<\EOF | sh { printf("echo now creating user %s\n",$1); printf("niutil -create . /users/%s\n",$1); printf("niutil -createprop . /users/%s %s '%s'\n",$1,"passwd",$2); printf("niutil -createprop . /users/%s %s '%s'\n",$1,"uid",$3); printf("niutil -createprop . /users/%s %s '%s'\n",$1,"gid",$4); printf("niutil -createprop . /users/%s %s '%s'\n",$1,"realname",$5); printf("niutil -createprop . /users/%s %s '%s'\n",$1,"home",$6); printf("niutil -createprop . /users/%s %s '%s'\n",$1,"shell",$7); } EOF ----- cut here ----- Thanks again. ----------------------------------------------------------------------------- Michael Nowak ...mailrus!shogun!mike Workstation Consultant mike@shogun.cc.umich.edu U of M Computing Center User Services Mike_Nowak@um.cc.umich.edu ...working for but in no way representing the University of Michigan...