% ypmatch joeuser passwd joeuser::508:10:Joseph User,,,,,,,<eng>:/home/joeuser:/usr/bin/tcsh % sgitcl sgitcl> dlopen libsautil.so init SAUtil_Init sgitcl> getpwnam pwent joeuser pw_name pw_passwd pw_uid pw_gid pw_comment pw_gecos pw_dir pw_shell sgitcl> set pwent(pw_shell) /usr/bin/tcshIn the example above, getpwnam returns the array element identifiers for the password entry array pwent. The set command shows that these array elements have been filled in according to the YP password map entry for joeuser.
System administration utilities for dealing with network information maps have the same names as standard C library routines for dealing with /etc files for password, group, hosts, networks, protocols, and services. These utilities are self-documenting--they print the proper usage if issued without arguments. Table 3-1 shows the utilities available:
For more information about each of the sautils utilities above, use the Tcl help facility, giving the name of a YP map and a utility:
sgitcl> help sautils/YPmap/utility