mike@shogun.cc.umich.edu (Michael Nowak) (07/11/89)
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...
jgreely@oz.cis.ohio-state.edu (J Greely) (07/11/89)
In article <1133@mailrus.cc.umich.edu> mike@shogun.cc.umich.edu (Michael Nowak) writes: >2. You could use niutil to load the file in chunks. J Greely suggested >this script: [shell script deleted] This was my last-ditch solution for getting it into NI. I'm surprised you had to go this far (well, sort of surprised). Does anyone else want a real tty NI client? I have this dream of being able to run like this: % NI > set domain . > list /users /users/root /users/bin ... > login name: root password: xxxxx OK > read passwd /etc/passwd 1936 records read > enter passwd name: foo passwd: * uid: 12 ... > quit I'd rather not write it myself (I've used the NI library calls, and I don't want to do it again), but if no one else gets the urge, I just might. -=- J Greely (jgreely@cis.ohio-state.edu; osu-cis!jgreely)