PROFILE Abstract: --------- PROFILE is a FORTRAN utility which adds new accounts or modifies existing accounts by using a screen-oriented interface that allows changes to be made by moving the cursor to the desired field and entering the changes. Four different screens can be displayed: main user profile, login flags, primary and secondary days, access restrictions, and privileges. Cursor movement is accomplished by using the arrow keys or the Unix 'hjkl' keys. Fields can be changed in the main user profile screen by typing the "Insert Here" or "Enter" keys to toggle edit mode. After the text has been entered, Carriage Return or any of the arrow keys will terminate the input. Login flags, Primary days, and Privileges can be changed with the "Select" or keypad "Period" keys. Normal or full privileges can be enabled with the "N" or "A" keys. Access modes can be changed by: hitting "-" or "Remove" keys to deny total access to an access type; hitting "+" or "Insert Here" to allow total access to an access type; hitting "Select" or keypad "Period" keys to selectively allow or deny access on an hourly basis. The user's top level directory will be created, diskquota will be enabled, and a sample login procedure will be copied to the user's directory. Installation: ------------- Installation is extremely simple. Compile and link PROFILE.FOR. Once the program is compiled and linked it should be ready for use. The only module you may wish to change is the subroutine SPAWN_DCL. See comments in that module for details. Copy the image PROFILE.EXE to SYS$SYSTEM: (or any location you desire), and optionally define a symbol for running the program. With a command defined such as: PROFILE:==$PROFILE you can pass the username as a parameter. If a symbol is not defined you will be prompted for a username when you run the program. Operation: ---------- If you profile an existing user, the information about the user will be gathered using the system service $GETUAI and written to the screen using SMG$ routines. If you profile a new user, the information from the DEFAULT account template is gathered and displayed (with a few pertinent fields already changed). You have the option at this point of selecting another user to profile (by hitting Control_Z), or modifying any of the fields on the main screen (by using the cursor keys and entering edit mode), or selecting an alternate screen (using one of the four PF keys). A Control_Z from one of the alternate screens will return you to the main screen. A Control_Z from the main screen, once any changes have been made, will cause the program to add or modify the account. You will first be prompted for confirmation, however. If the account already exists the account will be modified by using the system service $SETUAI. All fields will be set, including those fields not changed. This will not pose any problems other than a lengthy security alarm audit message if audits are enabled for UAF modification. If the account is new it will be added by spawning a quick DCL command procedure ($SETUAI cannot be used to add a new account) and using $SETUAI to modify the now existing new account. The DCL command is performed by creating a temporary command file and using LIB$SPAWN, without propogating symbol and logical name tables, with the temporary command file as input. The spawn is reasonably quick, but if you prefer to use a mailbox routine to execute the DCL command, you may wish to consider it. Disk quota is enabled for the user (defaulted at 1000, you may wish to change it) and top level directory is created by using LIB$CREATE_DIR. An optional subroutine you may wish to remove copies a sample login command procedure to the directory of the new user. The copy is performed by using the CONVERT utility. Special behavior for some fields: For the UIC field, if you enter the group number only, the next available member number will be supplied. You can also enter group and member numbers without the brackets and they will be supplied also. The directory field can be entered without brackets and they will be supplied. All string fields will be automatically converted to uppercase except for the owner field which will accept mixed case. Account expiration can be entered either as an absolute time (eg. 31-JAN-2001) or as a delta time (eg. 180 00:00:00 or simply 180). Files: ------ PROFILE.FOR - source code UAF.CMN - common definitions SMGDEF.CMN - extracted from FORSYSDEF.TLB and included in case you do not have it in your library README.TXT - this file Bugs: ----- Probably many, hopefully minor. -------------------------------------------------------------------------------- John Howells | "Science does not | howells@pioneer.arc.nasa.gov Sterling Software | remove the terror | howells@krypton.arc.nasa.gov Palo Alto, Ca. | of the Gods" | howells%kry@ames-io.arpa