home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / network / chkstore / chksto.doc < prev    next >
Text File  |  1993-12-16  |  18KB  |  546 lines

  1.                                       CHKSTORE package V2.03
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                          December 16th, 1993
  8.  
  9.  
  10.  
  11.                                            Author: D. Kelsey
  12.  
  13.                                 Last updated: 14/12/93 14:00
  14.  
  15.  
  16.  
  17.  
  18. TABLE OF CONTENTS
  19. _________________
  20.  
  21. Copyright and Author   . . . . . . . . . . . . . . . . . . 3
  22.  
  23. Change History   . . . . . . . . . . . . . . . . . . . . . 5
  24.  
  25. Acknowledgements   . . . . . . . . . . . . . . . . . . . . 7
  26.  
  27. The CHKSTORE system.   . . . . . . . . . . . . . . . . . . 9
  28. Software levels  . . . . . . . . . . . . . . . . . . . . . 9
  29. Installation   . . . . . . . . . . . . . . . . . . . . .  10
  30.   CHKSTORE space checking program  . . . . . . . . . . .  10
  31.   UNREVOKE command   . . . . . . . . . . . . . . . . . .  10
  32.   CHKHOME command  . . . . . . . . . . . . . . . . . . .  11
  33.   Installing the User warning system   . . . . . . . . .  12
  34. Setup and User guide.  . . . . . . . . . . . . . . . . .  13
  35.   Defining a user to the Monitor.  . . . . . . . . . . .  13
  36.   check and restrict the space used.   . . . . . . . . .  13
  37.     CHKSTORE invocation  . . . . . . . . . . . . . . . .  15
  38.     Excluding Users  . . . . . . . . . . . . . . . . . .  17
  39.     Automating the checking process  . . . . . . . . . .  17
  40.   unrevoking a user  . . . . . . . . . . . . . . . . . .  17
  41.   how a user checks their current space usage.   . . . .  18
  42.   Usage Hints  . . . . . . . . . . . . . . . . . . . . .  19
  43.  
  44. Appendix A. program list   . . . . . . . . . . . . . . .  21
  45.  
  46.  
  47.  
  48.  
  49. COPYRIGHT AND AUTHOR
  50. ____________________
  51.  
  52. (c)  Copyright  International  Business Machines Corporation
  53. 1993.
  54.  
  55. All rights Reserved
  56.  
  57. The Author of this package is David Kelsey.
  58.  
  59.  
  60.  
  61.  
  62. CHANGE HISTORY
  63. ______________
  64.  
  65. o   10th May 1993  11:05 - D.Kelsey
  66.  
  67.     Added  the section about the inform flag and the exclude
  68.     list flag.  changes also made to the dependency list and
  69.     the new files for the recent update.
  70.  
  71. o   17th Sept 1993  09:55 - D.Kelsey
  72.  
  73.     changed description of what CHKSTORE.CMD is, added  note
  74.     that to monitor you need to run this program at frequent
  75.     intervals. minor update about CHKHOME program.
  76.  
  77. o   14th Dec 1993  14:00 - D.Kelsey
  78.  
  79.     Corrected to descibe new version.
  80.  
  81.  
  82.  
  83.  
  84. ACKNOWLEDGEMENTS
  85. ________________
  86.  
  87. I  would  like  to thanks the following people who helped in
  88. one way or another in the creation of this package
  89.  
  90. o   Larry Snyder
  91.  
  92. o   David Morrill
  93.  
  94. o   Robin McInnes
  95.  
  96. o   Richard Lam
  97.  
  98. There has also been help from many  other  people  in  small
  99. ways  and  although  they  are  not mentioned here, I thanks
  100. those people as well.
  101.  
  102.  
  103.  
  104.  
  105. THE CHKSTORE SYSTEM.
  106. ____________________
  107.  
  108.   This system was designed to be able to perform the follow-
  109. ing actions :-
  110.  
  111. o   Check the storage used on a user's  home  directory  and
  112.     compare  it to the MAXSTORAGE limit for that user. If it
  113.     exceeds it, then "revoke" the user.   If it  is  greater
  114.     than a certain threshold, then mark that user as needing
  115.     a  warning. Also to "unrevoke" a revoked user if they go
  116.     under their limit.
  117.  
  118. o   Provide a function to "unrevoke" a  user  if  they  have
  119.     been revoked.
  120.  
  121. o   Provide  a function for the user to check how much space
  122.     they have used and how much they are allowed
  123.  
  124. o   Provide a means of informing the user at logon  time  if
  125.     they  have  been  revoked or they are passed the warning
  126.     limit.
  127.  
  128. The concept of being revoked access to your  home  directory
  129. is  making  the  home  directory and all it's subdirectories
  130. available as to that user with only the read, delete and at-
  131. tribute permissions available. This means a user  can  read,
  132. delete  or  change the attributes of files but cannot create
  133. files, nor write to a file.
  134.  
  135. SOFTWARE LEVELS
  136. _______________
  137.  
  138. The code run on the LAN server machine must be OS/2 v2.0  or
  139. higher  and  LAN  server v2.0 or higher. The code running on
  140. the requesters must be OS/2 v2.0 or higher and LAN requester
  141. v2.0 or higher.
  142.  
  143.  
  144. INSTALLATION
  145. ____________
  146.  
  147. The  following sections describe how to install the 4 compo-
  148. nents.
  149.  
  150. o   CHKSTORE space checking program
  151.  
  152. o   UNREVOKE command
  153.  
  154. o   CHKHOME command
  155.  
  156. o   User Warning system
  157.  
  158. CHKSTORE space checking program
  159. _______________________________
  160.  
  161. This program is used to check the space used and  will  "re-
  162. voke" and "unrevoke" users as necessary.
  163.  
  164. To install the space checking package :-
  165.  
  166. ∙   Create  a Subdirectory on your server (preferbly the do-
  167.     main controller but it should work on any server in  the
  168.     domain) for example
  169.  
  170.       D:\CHKSTORE
  171.  
  172. o   Install on this directory the following files
  173.  
  174.       CHKSTORE.EXE
  175.       UNREVOKE.MSG   (this file must be in the same directory as CHKSTORE.CMD)
  176.       REVOKE.MSG     (this file must be in the same directory as CHKSTORE.CMD)
  177.  
  178. o   Install CHKSTDLL.DLL in a subdirectory in the LIBPATH of
  179.     the server.  Alternatively install it in a new subdirec-
  180.     tory,  add  this  subdirectory to the LIBPATH and reboot
  181.     the server.
  182.  
  183. o   Create a subdirectory off the root  of  a  chosen  drive
  184.     called LOGON for example
  185.  
  186.       D:\LOGON
  187.  
  188. o   Create  an Alias called LOGON which points to this newly
  189.     created subdirectory
  190.  
  191. UNREVOKE command
  192. ________________
  193.  
  194. This describes how to install  the  UNREVOKE  command  on  a
  195. server  which an administrator can use to "unrevoke" a user.
  196. Only administrators can use this program.
  197.  
  198.  
  199. To install UNREVOKE on the server and make it a  public  ap-
  200. plication
  201.  
  202. o   Install  on  a  subdirectory (the same directory used to
  203.     store CHKSTORE is recommended) the following files
  204.  
  205.       UNREVOKE.EXE
  206.       UNREVOKE.MSG   (this file must be in the same directory as UNREVOKE.CMD)
  207.  
  208. o   Ensure that administrators who have will use  this  pro-
  209.     gram have access to CHKSTDLL.DLL. This could be done by
  210.  
  211.     ─   defining the public application working directory to
  212.         point to a copy of CHKSTDLL.DLL on the server (could
  213.         use  the  copy  used by the chkstore checking space)
  214.         and ensure the requester has .; in the LIBPATH.
  215.                                      .;
  216.                                      .;
  217.                                      .;
  218.  
  219.     ─   give a  requester  access  to  the  directory  where
  220.         CHKSTDLL.DLL  is  installed  on  the  server in it's
  221.         LIBPATH. for example :-
  222.  
  223.           LIBPATH=.........;\\GBM00141\EUAPPLS\DLLS;
  224.  
  225.             or
  226.  
  227.           LIBPATH=.........;W:\DLLS;
  228.  
  229.             and the requester does a NET USE W: to an alias which has
  230.             a subdirectory DLLS containing CHKSTDLL.DLL
  231.  
  232. o   define an alias for the subdirectory where  UNREVOKE  is
  233.     installed
  234.  
  235. o   Define  a  public  application  for  UNREVOKE.EXE,  with
  236.     prompt for  parameters  (see  later  for  invocation  on
  237.     UNREVOKE.EXE)
  238.  
  239. CHKHOME command
  240. _______________
  241.  
  242. This  program  can be stored on the server and the users ac-
  243. cess it to determine how much space they have used on  their
  244. home directory and how much space they are allowed.
  245.  
  246. To install :-
  247.  
  248. o   create a subdirectory for example
  249.  
  250.       D:\CHKHOME
  251.  
  252.     or  use  an existing one, but not the one where CHKSTORE
  253.     or UNREVOKE are installed.
  254.  
  255. o   define an alias for this subdirectory
  256.  
  257.  
  258. o   Give every user READ ONLY access to this subdirectory
  259.  
  260. o   install CHKHOME.CMD on this subdirectory
  261.  
  262. o   ensure that all users have access to CHKSTDLL.DLL as de-
  263.     scribed  for administrators in the section on installing
  264.     UNREVOKE.EXE
  265.  
  266. o   define a public application with  working  directory  as
  267.     this  subdirectory  (there  are  no  parameters  for the
  268.     CHKHOME program)
  269.  
  270. Installing the User warning system
  271. __________________________________
  272.  
  273. This system  will  display  messages  to  the  user  if  the
  274. CHKSTORE checking program revokes a user or the user is over
  275. a warning limit.
  276.  
  277. o   Create a PROFILE.CMD based on the PROFILE.SMP supplied
  278.  
  279. o   Create a LOGONPRF.CMD based on the LOGONPRF.SMP supplied
  280.  
  281. o   Install  PROFILE.CMD  in the DCDB\USERS\userid directory
  282.     for each user
  283.  
  284. o   Give all users READ ONLY access to Alias LOGON.
  285.  
  286. o   install LOGONPRF.CMD and CHKUSED.CMD in the subdirectory
  287.     pointed to by the LOGON alias (D:\LOGON in the  CHKSTORE
  288.     space checking package installation example)
  289.  
  290.  
  291. SETUP AND USER GUIDE.
  292. _____________________
  293.  
  294. This  section  gives information on how to execute the space
  295. checking program CHKSTORE and also how to register users  to
  296. be  checked.  It also describes the other functions provided
  297. such as the UNREVOKE command and the CHKHOME command.
  298.  
  299. Defining a user to the Monitor.
  300. _______________________________
  301.  
  302. To define a user so that their  home  directory  storage  is
  303. checked you have to do 3 actions.
  304.  
  305. o   Define a home directory for that user
  306.  
  307. o   Allocate to the user a MAXSTORAGE size
  308.  
  309.       To define the MAXSTORAGE size of 100Kb for user FRED you would type
  310.       while logged on to an administrator the command
  311.  
  312.       NET USER FRED /MAXSTORAGE:100
  313.  
  314.       in an OS/2 window or OS/2 Full Screen.
  315.  
  316. o   ensure   a   copy   of   PROFILE.CMD   exists   in   the
  317.     DCDB\USER\userid subdirectory for that user. For example
  318.     user FRED would require a copy of PROFILE.CMD on
  319.  
  320.       C:\IBMLAN\DCDB\USER\FRED
  321.  
  322. If you want the user to be checked for a default  amount  of
  323. storage allowed, then specify a MAXSTORAGE of 1. The default
  324.                                               _
  325. is then supplied when the CHKSTORE space checking program is
  326. executed  as  described  in the next section. If You do this
  327. however you must not use the alert function of CHKSTORE.  It
  328. will generate alerts which are not true for that user.
  329.  
  330. check and restrict the space used.
  331. __________________________________
  332.  
  333. You  can now check the space used, restricting users as nec-
  334. essary.  To do this manually you need to do
  335.  
  336. o   Go to the Server and Logon as an administrator
  337.  
  338. o   change to the directory where CHKSTORE.CMD is installed
  339.  
  340. o   invoke CHKSTORE with required parameters.
  341.  
  342. To perform any subsequent checks you need to invoke CHKSTORE
  343. again. It is suggested that you define specific times to run
  344.  
  345.  
  346. CHKSTORE or run it at regular intervals in order to  contin-
  347. uously track the space used on the home directories
  348.  
  349.  
  350. CHKSTORE invocation
  351.  
  352. CHKSTORE call format is as follows :-
  353.  
  354.   CHKSTORE /D:xxxx /W:yy /I:z /A /N /R
  355.  
  356.   where
  357.   /D: xxxx - is the default disk size limit in Kb for all users who have
  358.                    been given 1 Kb in their MAXSTORAGE entry
  359.   /W:   yy - is the warning percentage for which if a user exceeds this for
  360.              their home directory storage use, a warning is issued.
  361.   /I:    z - this allows you to send a net popup message to a user where
  362.                    z can be :-
  363.                    R = issue message to user when they are revoked only
  364.                    U = issue message to user when they are unrevoked only
  365.                    B = ussie message to user if they are revoked or unrevoked.
  366.   /A       - specifies that LAN alerts are generated for any user
  367.              who has exceeded their storage limit.
  368.   /N       - specifies that CHKSTORE runs in noisy mode. This generates some
  369.              output about what chkstore is doing when it is run.
  370.   /R       - specifies that CHKSTORE will revoke a user again even if
  371.              they have already been revoked. (ie change their directory accesses
  372.              but not add another entry to the revoked user list)
  373.  
  374. If no values are given then the following defaults apply
  375.  
  376.   Default disk size limit = 1Mb
  377.   warning percentage      = 80 %
  378.   no informing will be done
  379.   no alerts are generated
  380.   chkstore runs in quiet mode, ie no output is displayed
  381.   chkstore only revokes a user once.
  382.  
  383. The  inform  flag  will  inform a user if they have been re-
  384. voked. It only informs those users that  have  been  revoked
  385. for the first time. Even if you specify revoke always option
  386. the user will not get another popup message.
  387.  
  388. information  is  output by this program and 2 files are cre-
  389. ated on the LOGON alias directory. These are
  390.  
  391.   CHKSTORE.OUT - information about all users who have home directories
  392.   REVOKED.USR  - a list of all currently revoked users
  393.  
  394. The CHKSTORE.OUT file is the most useful  one  and  provides
  395. the  administrator  with  information.  It has the following
  396. form :-
  397.  
  398.   Last run: 10 May 1993 09:20:27
  399.   comment    userid    allowed       used     percent    server      base directory
  400.   --------  --------  ----------  ----------  --------  --------  ---------------------
  401.   RESTORED  DRKELSEY    20000 Kb     2502 Kb       13%  GBM00141  E:\HD\DRKELSEY
  402.   REVOKED   EROY           20 Kb    10702 Kb    53508%  GBM00141  E:\HD\EROY
  403.   WARNING   PJONES         20 Kb       18 Kb       90%  GBM00141  E:\HD\PJONES
  404.             RMCINNES       10 Kb        0 Kb        0%  GBM00141  E:\HD\RMCINNES
  405.  
  406.  
  407. The comment area can have 3 types of entry
  408.  
  409.   (blank) = user is ok
  410.   REVOKED   = user has has their access revoked
  411.   WARNING   = user will receive a warning at logon time
  412.   RESTORED  = user has been unrevoked by an administrator or chkstore program
  413.   EXCLUDE   = user is in the exclude list (see next section)
  414.  
  415.  
  416. Excluding Users
  417.  
  418. It  is possible to have users which you want to check on but
  419. not restrict.  This can be done by creating  a  file  called
  420. EXCLUDE.LST  in  the same directory as the CHKSTORE.CMD pro-
  421. gram. In there place each user to be excluded on a  seperate
  422. line eg.
  423.  
  424.   DRKELSEY
  425.   ADMIN1
  426.   MANAGER
  427.  
  428. These  users will not have their home directories restricted
  429. when CHKSTORE is run.
  430.  
  431. Automating the checking process
  432.  
  433. To automate the checking process you  will  need  to  ensure
  434. that an administrator id is logged on when the CHKSTORE pro-
  435. gram is run. You can do this by :-
  436.  
  437. o   creating a Batch file to Logon an administrator, execute
  438.     CHKSTORE then logoff.
  439.  
  440. o   Ensure that an administrator id is logged on permanently
  441.     (for example when the server is first brought up)
  442.  
  443. You  can  then  use  the AT command to schedule the CHKSTORE
  444. program by either calling your batch program or the CHKSTORE
  445. program whenever you want to check and restrict the storage.
  446.  
  447. unrevoking a user
  448. _________________
  449.  
  450. If a user requires to be unrevoked either because they  have
  451. freed up some storage or they have had the storage limit in-
  452. creased,  and  they  cannot  wait  for the next execution of
  453. CHKSTORE program, then an administrator can unrevoke a  user
  454. manually.
  455.  
  456.   UNREVOKE userid (/i)
  457.  
  458. p.The  user  is checked for onthe  current domain of the ad-
  459. ministrator.  If a domain is specified and it  is  different
  460. to  the  administrator's current one then that administrator
  461. id and password must exist and be the same  as  the  current
  462. logged on administrator on that domain.
  463.  
  464. The  /i parameter is optional and means that the user is in-
  465. formed by way of a Net popup message when they have been un-
  466.  
  467.  
  468. revoked. This means that the user  must  have  the  netpopup
  469. service started on their requester.
  470.  
  471. It is possible that another administrator is trying to unre-
  472. voke  a  user or the CHKSTORE program is running at the same
  473. time as you trying to use UNREVOKE.  Because of  the  nature
  474. of  this  system,  this is not allowed and a warning will be
  475. displayed and the command will terminate.  If  this  is  the
  476. case, try again a bit later and you should be able to do the
  477. required action.
  478.  
  479. how a user checks their current space usage.
  480. ____________________________________________
  481.  
  482. The  user runs the program CHKHOME which reports on the cur-
  483. rently used space on the home directory for the user who  is
  484. logged  on.  It will also inform them of their allowed limit
  485. as seen by the last run of CHKSTORE.CMD. If an administrator
  486. has changed this value since the last run of  CHKSTORE  then
  487. the user will not see the new value. It will also inform the
  488. user if they are currently revoked or not.
  489.  
  490. CHKHOME  has  no  parameters and should really be setup as a
  491. public application for the user to call
  492.  
  493.  
  494. Usage Hints
  495. ___________
  496.  
  497. Below are some hints about this system.
  498.  
  499. 1.  If  a  user has been revoked and that user deletes files
  500.     from their home directory, they will  not  be  unrevoked
  501.     until  the  next execution of the chkstore program or if
  502.     unrevoked manually by an administrator.
  503.  
  504. 2.  If a user has been  revoked  and  an  administrator  in-
  505.     creases the user's home directory MAXSTORAGE value, then
  506.     the  user won't be unrevoked until the next execution of
  507.     the chkstore program or if unrevoked manually by an  ad-
  508.     ministrator.
  509.  
  510. 3.  MAXSTORAGE set to 1Kb means use the default limit speci-
  511.     fied  in  the  execution of CHKSTORE.CMD or the internal
  512.     limit of 1Mb. If you do use this do NOT specify  the  /A
  513.     option  and  turn  alerts  on otherwise a mass of alerts
  514.     will be generated.
  515.  
  516. 4.  If a revoked user  is  NOT  in  the  revoked  user  list
  517.     (REVOKED.USR file) then that user will not be unrevoked.
  518.     It  would  have  to  be done manually using the UNREVOKE
  519.     command.
  520.  
  521. 5.  This system should run in a mixture of  levels  for  Lan
  522.     server  within  a  domain.  The chkstore program doesn't
  523.     have to run on the domain controller.
  524.  
  525.  
  526.  
  527.  
  528. APPENDIX A. PROGRAM LIST
  529. ________________________
  530.  
  531. The complete CHKSTORE system set of files is :-
  532.  
  533.   CHKSTORE.EXE    - checks space used, revokes and unrevokes
  534.   UNREVOKE.EXE    - Administrator command to unrevoke a user
  535.   REVOKE.MSG      - message sent to user when revoked
  536.   UNREVOKE.MSG    - message sent to user when unrevoked
  537.   CHKHOME.EXE     - user command to check space used
  538.   CHKUSED.EXE     - logon message program (doesn't use the MSG files)
  539.   LOGONPRF.SMP    - sample general logon program for all users
  540.   PROFILE.SMP     - sample fixed PROFILE.CMD for all users
  541.   CHKSTDLL.DLL    - provide required functions for the above programs
  542.   SPACECNT.EXE    - used by CHKHOME.EXE
  543.  
  544.  
  545. ********************* End Of Document **********************
  546.