TThhee CCSSOO NNaammeesseerrvveerr AAnn IInnttrroodduuccttiioonn by Steven Dorner, Computing Services Office % ph steven dorner -201 1:Database ready. ---------------------------------------- alias: sdorner name: dorner steven c email: dorner@uxg.cso.uiuc.edu phone: (W) 333-3339 (H) 356-8892 address: 189 DCL, 1304 W Springfield, U address: 1201 W. Washington, C department: computing services office title: research programmer mailcode: 256 hours: weekdays project: CSO Nameserver (Ph) ---------------------------------------- WWhhaatt iiss iitt?? The CSO Nameserver could be considered a data- base containing information about people and things at the University of Illinois. It is designed to be extremely flexible in what information it keeps, and also to provide fast access to that information. Currently, most of the in- formation in it comes from the University _S_t_u_d_e_n_t_/_S_t_a_f_f_ _D_i_r_e_c_t_o_r_y (the phone book). The CSO Nameserver could also be considered to be a pair of programs; one that manages the actual data (this program is called _q_i, for __q_u_e_r_y __i_n_t_e_r_p_r_e_t_e_r), and another one that han- dles user requests (the program CSO provides for this is called _p_h, for __p__h_o_n_e _b_o_o_k). To most people, the CSO Nameserver will be exactly this second program, _p_h, the pro- gram that gives them access to the University _D_i_r_e_c_t_o_r_y. WWhheerree iiss iitt?? The database for the Nameserver resides on a CSO minicomputer (a VAXServer 3500) that runs the UnixTM operating system; the name of this computer is garcon.cso.uiuc.edu. The program that manages the database (_q_i) runs on this machine. _Q_i allows programs running on other computers to access the database by serving as an in- termediary between them and the actual database. It commun- icates with such programs using the campus network, _U_I_U_C_n_e_t. _P_h (the program that is usually used to communicate with _q_i) is installed on all of CSO's UNIXTM computers. A simple version of _p_h is also available on CSO's main IBM computer, a 3081 which uses a proprietary IBM operating system. _P_h is also installed on many non-CSO computers across the campus; later, I'll discuss how you can get _p_h installed on your system. WWhhaatt iiss iitt ggoooodd ffoorr?? The Nameserver is good for looking up phone numbers and addresses of University faculty, students or staff members, just like the _S_t_u_d_e_n_t_/_S_t_a_f_f__D_i_r_e_c_t_o_r_y; but the Nameserver is good for more than just that. For one thing, the Nameserver knows the electronic mail address for thousands of faculty, students and staff; this information is not present in the _S_t_u_d_e_n_t_/_S_t_a_f_f__D_i_r_e_c_t_o_r_y. For some people, it knows other things, such as office hours or vaca- tion plans. A key thing to know about the Nameserver is that, if you use a computer that has _p_h installed on it, you can change the information the Nameserver keeps about you. That means that, if you change offices in the middle of the year, you can put your correct address and phone number in the Nameserver immediately, so that people can use _p_h to find up-to-date information about you. WWhhaatt iissnn''tt iitt ggoooodd ffoorr?? There are some things the Nameserver is not meant to do. One thing that should be mentioned right away is that the Namesever can't be used to generate mailing lists for junk mail; you don't have to wor- ry about getting junk mail because you appear in the Nameserver's database. Another thing it isn't good for is notifying the University of changes of address. Changes you make to your information in the Nameserver are not automatically sent to your depart- ment, or the Office of Admissions and Records, or Payroll, or anywhere else; you must still notify these places of changes in your address. HHooww ccaann II hhaavvee pphh iinnssttaalllleedd oonn mmyy ccoommppuutteerr?? If one of the computers you use runs UNIXTM or VMS and is connected to _U_I_U_C_n_e_t, you can probably have _p_h installed on it. Tell the person who manages your computer that he can get the source code for _p_h by anonymous ftp to uxc.cso.uiuc.edu, in the net/ph subdirectory (don't worry-he'll know what that means). HHooww ddoo II uussee pphh?? There are two different ways to use _p_h. One way is good for finding information about people, and the other is good for changing the information the Nameserver keeps about you. I will give you a brief idea of how both these ways work; for more detailed information, you should read the ``manual page'' for _p_h, which you can read (if your computer runs UnixTM) by typing the command, ``man ph''. To use _p_h to find out information, you should type ``ph'' and the name of the person you want to know about; _p_h will respond with information about that person: % ph steven dorner -201 1:Database ready. ---------------------------------------- alias: sdorner name: dorner steven c email: dorner@uxg.cso.uiuc.edu phone: (W) 333-3339 (H) 356-8892 address: 189 DCL, 1304 W Springfield, U address: 1201 W. Washington, C department: computing services office title: research programmer mailcode: 712 hours: weekdays project: CSO Nameserver (Ph) ---------------------------------------- If there are a lot of people who have the name you asked for, _p_h will let you view the list a screenful at a time; just hit the spacebar to move to the next screen. You don't have to know the exact spelling of a name to find information; you can put special symbols in the name for which you are searching that tell the Nameserver to find names that you only know a few letters of. I won't say any- thing more about that here; look in the manual page if you are interested in the details. Sometimes, you will ask ph for a name, and it will refuse to give you information, because too many people have that name: % ph smith -201 1:Database ready. 502:Too many entries to print (373). _P_h does this so that no one can use it to get mailing lists for junk mail or other nefarious purposes. If you really want to find the person, you will have to know something else about them, like part of their first name, or their phone number If you want to change the information the Nameserver keeps about you, you should just type ``ph''. _P_h won't look up a name, but will instead give you a prompt. There are many possible commands you can type to _p_h; they are described in full in the _p_h manual page. You will only need to know three commands to change your information, however; _l_o_g_i_n, _e_d_i_t, and _q_u_i_t. Before actually using _p_h for this, you will have to make some preparations. The first thing you have to do is find your Nameserver _a_l_i_a_s. This is a unique name assigned to you by the NameServer. It will be your first initial, followed by a dash, followed by your last name. If there is more than one person with the same first initial and last name as yours, there may be number tacked onto the end of your alias. The easiest way to find your alias is simply to look up your name with ph; it will be obvious to you which entry is yours. Once your know your alias, you need to find out your Nameserver password. To do this, send electronic mail to nameserv@uxg.cso.uiuc.edu. You will receive (in a day or two) a reply that contains your password. Now, it's time to use _p_h to change your information. Type ``ph'' and a return. You will get a ``ph>'' prompt. Now, type ``login alias'' (but use your real alias, not the word ``alias''!) and a return. _P_h will ask for your password; type your password and a return. You should get a greeting from the Nameserver, and another prompt. % ph $Header: ph.c,v 2.10 88/03/09 09:59:32 dorner Locked $ Please mail questions or comments to dorner@uxg.cso.uiuc.edu. ph> login sdorner -201 1:Database ready. Enter nameserver password: _t_y_p_e _y_o_u_r _p_a_s_s_w_o_r_d _h_e_r_e 200:sdorner:Hi how are you? ph> You are now ready to change your information. Your informa- tion is organized into ``fields'', each one containing a different piece of information. There is a field for your name, your address, your phone numbers, etc. To change a particu- lar field, type ``edit field'' and a return, substituting the name of the field you wish to change for ``field''. For example, if you want to change your phone numbers, type ``edit phone''. You will be placed in your favorite UNIX editor, with the contents of the field you asked for as the text. Make whatever changes you wish, and exit the editor. _P_h will then change the information for you. Some information cannot be changed; the ``name'' field, for example, cannot be changed. If you need to change one of these fields, you should send mail to nameserv@uxg.cso.uiuc.edu and arrangements can be made. Once you are done changing your information, type ``quit'' and a return. SSuuppppoossee II ccaann''tt uussee pphh ffrroomm mmyy ccoommppuutteerr?? If your computer doesn't have ph installed on it, but you would like to use ph to look up addresses or change your information, you can still do so. Connect to CSO's staff Pyramid, uxe, by using telnet (telnet uxe.cso.uiuc.edu), sytek (call 12ee) or by dialup (333-4008, class duxe). When you are prompted for login:, type ``phones'' and a return. When you are prompted for Password:, type another return. You will then be prompted for your terminal type. If you have a vt100 termi- nal or terminal emulator, you can just type a return; if you have some other terminal, type its name. You will receive a ph> prompt, and can use ph. WWhheerree ccaann II ffiinndd mmoorree iinnffoorrmmaattiioonn?? More information can be found by reading the manual page on _p_h. Programmers who wish to access the Nameserver from their programs should ob- tain the document _N_a_m_e_s_e_r_v_e_r__S_e_r_v_e_r_/_C_l_i_e_n_t__L_a_n_g_u_a_g_e, avail- able in the file ``language.troff'' in the same directory on uxc.cso.uiuc.edu as the _p_h source code. WWhhaatt iiff II hhaavvee ttrroouubbllee?? If you have problems or questions that are not resolved by reading this document, the _p_h manu- al page, or _N_a_m_e_s_e_r_v_e_r__S_e_r_v_e_r_/_C_l_i_e_n_t__L_a_n_g_u_a_g_e, feel free to ask me by sending mail to ``dorner@uxg.cso.uiuc.edu''. AAppppeennddiixx -- AA RRaannkk BBeeggiinnnneerr''ss GGuuiiddee ttoo VVII This page describes a few vi commands to accomplish simple editing tasks. Full documentation for vi can be found in _T_h_e _U_N_I_X _U_s_e_r'_s _M_a_n_u_a_l _S_u_p_p_l_e_m_e_n_t_a_r_y _D_o_c_u_m_e_n_t_s, chapter 15 (really advanced users should read chapter 16 as well). Two thing to keep in mind: First, the editor is pronounced ``vee eye''; if you pronounce it, ``vie,'' UNIX gurus will laugh at you, though not out loud. Secondly, vi is case-sensitive; be sure to use upper or lower case commands as appropriate. MMooddeess.. Vi is a modal editor; what you can do depends on what mode you are in. The two modes of interest to us are _c_o_m_m_a_n_d mode and _i_n_s_e_r_t mode. You type most commands in command mode; all you do in insert mode is type your text. You get out of insert mode by typing _e_s_c_a_p_e, usually marked ``esc'' on keyboards; on some keyboards, you may have to hold down the control or alt key and press ``[''. If you type escape in command mode, vi will beep at you; so if you get confused, just type escape until vi beeps; then you'll be back in command mode. MMoovviinngg AArroouunndd.. Here are some motion commands in vi. They are typed in command mode, and leave the editor in command mode. CCoommmmaanndd WWhhaatt iitt ddooeess control-h Moves the cursor lleefftt ([[]]) one character. h Moves the cursor lleefftt ([[]]) one character. j Moves the cursor ddoowwnn ([[]]) one line. k Moves the cursor uupp ([[]]) one line. l Moves the cursor rriigghhtt ([[]]) one character. w Moves the cursor ffoorrwwaarrdd to the beginning of the next word. b Moves the cursor bbaacckkwwaarrdd to the beginning of the previous word. DDeelleetteeiinngg TTeexxtt.. Here are some commands to get rid of stuff. Type them in command mode; they will leave the editor in command mode. CCoommmmaanndd WWhhaatt iitt ddooeess dd Deletes the current line. x Deletes the character at the cursor, and moves the rest of the line to fill the hole. AAddddiinngg TTeexxtt.. The following commands all put you into insert mode and let you type text. Type escape when you are fin- ished adding text, and you will be returned to command mode. CCoommmmaanndd WWhhaatt iitt ddooeess i Start inserting characters before the charac- ter the cursor is on. O Create a new line above the cursor, and start inserting at the beginning of that line. Note that this command is a _c_a_p_i_t_a_l ``O''. GGeettttiinngg OOuutt.. The following commands exit vi. They work in command mode. CCoommmmaanndd WWhhaatt iitt ddooeess ZZ Exit vi, and save the changes you have made. Those are _c_a_p_i_t_a_l Z's, by the way. :q!o/ Exit vi, but don't save changes (the ``o/'' means to type return).