home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
network
/
chkstore
/
chksto.inf
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1993-12-16
|
12KB
|
433 lines
ΓòÉΓòÉΓòÉ 1. Copyright and Author ΓòÉΓòÉΓòÉ
(c) Copyright International Business Machines Corporation 1993.
All rights Reserved
The Author of this package is David Kelsey.
ΓòÉΓòÉΓòÉ 2. Change History ΓòÉΓòÉΓòÉ
o 10th May 1993 11:05 - D.Kelsey
Added the section about the inform flag and the exclude list flag. changes
also made to the dependency list and the new files for the recent update.
o 17th Sept 1993 09:55 - D.Kelsey
changed description of what CHKSTORE.CMD is, added note that to monitor you
need to run this program at frequent intervals. minor update about CHKHOME
program.
o 14th Dec 1993 14:00 - D.Kelsey
Corrected to descibe new version.
ΓòÉΓòÉΓòÉ 3. Acknowledgements ΓòÉΓòÉΓòÉ
I would like to thanks the following people who helped in one way or another in
the creation of this package
o Larry Snyder
o David Morrill
o Robin McInnes
o Richard Lam
There has also been help from many other people in small ways and although
they are not mentioned here, I thanks those people as well.
ΓòÉΓòÉΓòÉ 4. The CHKSTORE system. ΓòÉΓòÉΓòÉ
This system was designed to be able to perform the following actions :-
o Check the storage used on a user's home directory and compare it to the
MAXSTORAGE limit for that user. If it exceeds it, then "revoke" the user. If
it is greater than a certain threshold, then mark that user as needing a
warning. Also to "unrevoke" a revoked user if they go under their limit.
o Provide a function to "unrevoke" a user if they have been revoked.
o Provide a function for the user to check how much space they have used and
how much they are allowed
o Provide a means of informing the user at logon time if they have been
revoked or they are passed the warning limit.
The concept of being revoked access to your home directory is making the home
directory and all it's subdirectories available as to that user with only the
read, delete and attribute permissions available. This means a user can read,
delete or change the attributes of files but cannot create files, nor write to
a file.
ΓòÉΓòÉΓòÉ 4.1. Software levels ΓòÉΓòÉΓòÉ
The code run on the LAN server machine must be OS/2 v2.0 or higher and LAN
server v2.0 or higher. The code running on the requesters must be OS/2 v2.0 or
higher and LAN requester v2.0 or higher.
ΓòÉΓòÉΓòÉ 4.2. Installation ΓòÉΓòÉΓòÉ
The following sections describe how to install the 4 components.
o CHKSTORE space checking program
o UNREVOKE command
o CHKHOME command
o User Warning system
ΓòÉΓòÉΓòÉ 4.2.1. CHKSTORE space checking program ΓòÉΓòÉΓòÉ
This program is used to check the space used and will "revoke" and "unrevoke"
users as necessary.
To install the space checking package :-
o Create a Subdirectory on your server (preferbly the domain controller but it
should work on any server in the domain) for example
D:\CHKSTORE
o Install on this directory the following files
CHKSTORE.EXE
UNREVOKE.MSG (this file must be in the same directory as CHKSTORE.CMD)
REVOKE.MSG (this file must be in the same directory as CHKSTORE.CMD)
o Install CHKSTDLL.DLL in a subdirectory in the LIBPATH of the server.
Alternatively install it in a new subdirectory, add this subdirectory to the
LIBPATH and reboot the server.
o Create a subdirectory off the root of a chosen drive called LOGON for
example
D:\LOGON
o Create an Alias called LOGON which points to this newly created subdirectory
ΓòÉΓòÉΓòÉ 4.2.2. UNREVOKE command ΓòÉΓòÉΓòÉ
This describes how to install the UNREVOKE command on a server which an
administrator can use to "unrevoke" a user. Only administrators can use this
program.
To install UNREVOKE on the server and make it a public application
o Install on a subdirectory (the same directory used to store CHKSTORE is
recommended) the following files
UNREVOKE.EXE
UNREVOKE.MSG (this file must be in the same directory as UNREVOKE.CMD)
o Ensure that administrators who have will use this program have access to
CHKSTDLL.DLL. This could be done by
- defining the public application working directory to point to a copy of
CHKSTDLL.DLL on the server (could use the copy used by the chkstore
checking space) and ensure the requester has .; in the LIBPATH.
- give a requester access to the directory where CHKSTDLL.DLL is installed
on the server in it's LIBPATH. for example :-
LIBPATH=.........;\\GBM00141\EUAPPLS\DLLS;
or
LIBPATH=.........;W:\DLLS;
and the requester does a NET USE W: to an alias which has
a subdirectory DLLS containing CHKSTDLL.DLL
o define an alias for the subdirectory where UNREVOKE is installed
o Define a public application for UNREVOKE.EXE, with prompt for parameters
(see later for invocation on UNREVOKE.EXE)
ΓòÉΓòÉΓòÉ 4.2.3. CHKHOME command ΓòÉΓòÉΓòÉ
This program can be stored on the server and the users access it to determine
how much space they have used on their home directory and how much space they
are allowed.
To install :-
o create a subdirectory for example
D:\CHKHOME
or use an existing one, but not the one where CHKSTORE or UNREVOKE are
installed.
o define an alias for this subdirectory
o Give every user READ ONLY access to this subdirectory
o install CHKHOME.CMD on this subdirectory
o ensure that all users have access to CHKSTDLL.DLL as described for
administrators in the section on installing UNREVOKE.EXE
o define a public application with working directory as this subdirectory
(there are no parameters for the CHKHOME program)
ΓòÉΓòÉΓòÉ 4.2.4. Installing the User warning system ΓòÉΓòÉΓòÉ
This system will display messages to the user if the CHKSTORE checking program
revokes a user or the user is over a warning limit.
o Create a PROFILE.CMD based on the PROFILE.SMP supplied
o Create a LOGONPRF.CMD based on the LOGONPRF.SMP supplied
o Install PROFILE.CMD in the DCDB\USERS\userid directory for each user
o Give all users READ ONLY access to Alias LOGON.
o install LOGONPRF.CMD and CHKUSED.CMD in the subdirectory pointed to by the
LOGON alias (D:\LOGON in the CHKSTORE space checking package installation
example)
ΓòÉΓòÉΓòÉ 4.3. Setup and User guide. ΓòÉΓòÉΓòÉ
This section gives information on how to execute the space checking program
CHKSTORE and also how to register users to be checked. It also describes the
other functions provided such as the UNREVOKE command and the CHKHOME command.
ΓòÉΓòÉΓòÉ 4.3.1. Defining a user to the Monitor. ΓòÉΓòÉΓòÉ
To define a user so that their home directory storage is checked you have to do
3 actions.
o Define a home directory for that user
o Allocate to the user a MAXSTORAGE size
To define the MAXSTORAGE size of 100Kb for user FRED you would type
while logged on to an administrator the command
NET USER FRED /MAXSTORAGE:100
in an OS/2 window or OS/2 Full Screen.
o ensure a copy of PROFILE.CMD exists in the DCDB\USER\userid subdirectory for
that user. For example user FRED would require a copy of PROFILE.CMD on
C:\IBMLAN\DCDB\USER\FRED
If you want the user to be checked for a default amount of storage allowed,
then specify a MAXSTORAGE of 1. The default is then supplied when the CHKSTORE
space checking program is executed as described in the next section. If You do
this however you must not use the alert function of CHKSTORE. It will generate
alerts which are not true for that user.
ΓòÉΓòÉΓòÉ 4.3.2. check and restrict the space used. ΓòÉΓòÉΓòÉ
You can now check the space used, restricting users as necessary. To do this
manually you need to do
o Go to the Server and Logon as an administrator
o change to the directory where CHKSTORE.CMD is installed
o invoke CHKSTORE with required parameters.
To perform any subsequent checks you need to invoke CHKSTORE again. It is
suggested that you define specific times to run CHKSTORE or run it at regular
intervals in order to continuously track the space used on the home
directories
ΓòÉΓòÉΓòÉ 4.3.2.1. CHKSTORE invocation ΓòÉΓòÉΓòÉ
CHKSTORE call format is as follows :-
CHKSTORE /D:xxxx /W:yy /I:z /A /N /R
where
/D: xxxx - is the default disk size limit in Kb for all users who have
been given 1 Kb in their MAXSTORAGE entry
/W: yy - is the warning percentage for which if a user exceeds this for
their home directory storage use, a warning is issued.
/I: z - this allows you to send a net popup message to a user where
z can be :-
R = issue message to user when they are revoked only
U = issue message to user when they are unrevoked only
B = ussie message to user if they are revoked or unrevoked.
/A - specifies that LAN alerts are generated for any user
who has exceeded their storage limit.
/N - specifies that CHKSTORE runs in noisy mode. This generates some
output about what chkstore is doing when it is run.
/R - specifies that CHKSTORE will revoke a user again even if
they have already been revoked. (ie change their directory accesses
but not add another entry to the revoked user list)
If no values are given then the following defaults apply
Default disk size limit = 1Mb
warning percentage = 80 %
no informing will be done
no alerts are generated
chkstore runs in quiet mode, ie no output is displayed
chkstore only revokes a user once.
The inform flag will inform a user if they have been revoked. It only informs
those users that have been revoked for the first time. Even if you specify
revoke always option the user will not get another popup message.
information is output by this program and 2 files are created on the LOGON
alias directory. These are
CHKSTORE.OUT - information about all users who have home directories
REVOKED.USR - a list of all currently revoked users
The CHKSTORE.OUT file is the most useful one and provides the administrator
with information. It has the following form :-
Last run: 10 May 1993 09:27
comment userid allowed used percent server base directory
-------- -------- ---------- ---------- -------- -------- ---------------------
RESTORED DRKELSEY 20000 Kb 2502 Kb 13% GBM00141 E:\HD\DRKELSEY
REVOKED EROY 20 Kb 10702 Kb 53508% GBM00141 E:\HD\EROY
WARNING PJONES 20 Kb 18 Kb 90% GBM00141 E:\HD\PJONES
RMCINNES 10 Kb 0 Kb 0% GBM00141 E:\HD\RMCINNES
The comment area can have 3 types of entry
(blank) = user is ok
REVOKED = user has has their access revoked
WARNING = user will receive a warning at logon time
RESTORED = user has been unrevoked by an administrator or chkstore program
EXCLUDE = user is in the exclude list (see next section)
ΓòÉΓòÉΓòÉ 4.3.2.2. Excluding Users ΓòÉΓòÉΓòÉ
It is possible to have users which you want to check on but not restrict. This
can be done by creating a file called EXCLUDE.LST in the same directory as the
CHKSTORE.CMD program. In there place each user to be excluded on a seperate
line eg.
DRKELSEY
ADMIN1
MANAGER
These users will not have their home directories restricted when CHKSTORE is
run.
ΓòÉΓòÉΓòÉ 4.3.2.3. Automating the checking process ΓòÉΓòÉΓòÉ
To automate the checking process you will need to ensure that an administrator
id is logged on when the CHKSTORE program is run. You can do this by :-
o creating a Batch file to Logon an administrator, execute CHKSTORE then
logoff.
o Ensure that an administrator id is logged on permanently (for example when
the server is first brought up)
You can then use the AT command to schedule the CHKSTORE program by either
calling your batch program or the CHKSTORE program whenever you want to check
and restrict the storage.
ΓòÉΓòÉΓòÉ 4.3.3. unrevoking a user ΓòÉΓòÉΓòÉ
If a user requires to be unrevoked either because they have freed up some
storage or they have had the storage limit increased, and they cannot wait for
the next execution of CHKSTORE program, then an administrator can unrevoke a
user manually.
UNREVOKE userid (/i)
p.The user is checked for onthe current domain of the administrator. If a
domain is specified and it is different to the administrator's current one then
that administrator id and password must exist and be the same as the current
logged on administrator on that domain.
The /i parameter is optional and means that the user is informed by way of a
Net popup message when they have been unrevoked. This means that the user must
have the netpopup service started on their requester.
It is possible that another administrator is trying to unrevoke a user or the
CHKSTORE program is running at the same time as you trying to use UNREVOKE.
Because of the nature of this system, this is not allowed and a warning will be
displayed and the command will terminate. If this is the case, try again a bit
later and you should be able to do the required action.
ΓòÉΓòÉΓòÉ 4.3.4. how a user checks their current space usage. ΓòÉΓòÉΓòÉ
The user runs the program CHKHOME which reports on the currently used space on
the home directory for the user who is logged on. It will also inform them of
their allowed limit as seen by the last run of CHKSTORE.CMD. If an
administrator has changed this value since the last run of CHKSTORE then the
user will not see the new value. It will also inform the user if they are
currently revoked or not.
CHKHOME has no parameters and should really be setup as a public application
for the user to call
ΓòÉΓòÉΓòÉ 4.3.5. Usage Hints ΓòÉΓòÉΓòÉ
Below are some hints about this system.
1. If a user has been revoked and that user deletes files from their home
directory, they will not be unrevoked until the next execution of the
chkstore program or if unrevoked manually by an administrator.
2. If a user has been revoked and an administrator increases the user's home
directory MAXSTORAGE value, then the user won't be unrevoked until the
next execution of the chkstore program or if unrevoked manually by an
administrator.
3. MAXSTORAGE set to 1Kb means use the default limit specified in the
execution of CHKSTORE.CMD or the internal limit of 1Mb. If you do use this
do NOT specify the /A option and turn alerts on otherwise a mass of alerts
will be generated.
4. If a revoked user is NOT in the revoked user list (REVOKED.USR file) then
that user will not be unrevoked. It would have to be done manually using
the UNREVOKE command.
5. This system should run in a mixture of levels for Lan server within a
domain. The chkstore program doesn't have to run on the domain controller.
ΓòÉΓòÉΓòÉ 5. program list ΓòÉΓòÉΓòÉ
The complete CHKSTORE system set of files is :-
CHKSTORE.EXE - checks space used, revokes and unrevokes
UNREVOKE.EXE - Administrator command to unrevoke a user
REVOKE.MSG - message sent to user when revoked
UNREVOKE.MSG - message sent to user when unrevoked
CHKHOME.EXE - user command to check space used
CHKUSED.EXE - logon message program (doesn't use the MSG files)
LOGONPRF.SMP - sample general logon program for all users
PROFILE.SMP - sample fixed PROFILE.CMD for all users
CHKSTDLL.DLL - provide required functions for the above programs
SPACECNT.EXE - used by CHKHOME.EXE
********************* End Of Document **********************