ftp.nice.ch/pub/next/tools/system/Quotas.N.bs.tar.gz#/Quotas

DisableOver
 
Nightly
 
ProcessReport
 
QuotaCheck
 

README.wn


 
Source/
 
addpu
 
disable
 
enable
 
exceeded.ps
[View exceeded.ps as PDF] 
getall
 
getdq
 
getdu
 
getpq
 
getpu
 
pagecount
 
setall
 
setdq
 
setpq
 
setpu
 

README.wn

%˜†ˆ†„†€†�†Œ	ÿ
7X°))°ÿdHHdÚ/d"�´"�´�Hÿÿ%M%M%MUÑ!¹˜†ˆ†„†€†�†Œ	ÿ
7X°))°ÿdHHdÚ/d»ë�´»ë�´�"""*Ž







xHHÚ/d[(üHHdd'�@



PP�(”(qdisabled	List of disabled accounts.
log    	Date and error messages from ÿ÷Nightlyÿ÷.
report	List of the form ÿ÷nameÿ÷ ÿ÷diskquotaÿ÷ ÿ÷diskusageÿ÷.
low	List of users with disk usage within 20% of disk space quota.
over	List of users over disk space quota.
over.[1-9]	Aged ÿ÷overÿ÷ files.
mail	Temporary file used to construct mail messages.
setdq	Usage: ÿ÷setdqÿ÷ ÿ÷user quotaÿ÷.  Sets disk space quota for user.
getdq	Usage: ÿ÷getdqÿ÷ ÿ÷userÿ÷.  Prints disk quota for user.
getdu	Usage: ÿ÷getduÿ÷ ÿ÷userÿ÷.  Prints disk usage for user.
ÈüZ
Z°Ð0÷ÿ÷öõDisk Space and Page Usage Quota Systemsÿ÷
ÿ÷Marc Majkaÿ÷


This package contains software for quota systems for disk space usage and printer page usage.  It was written for the University of British Columbia Computer Science Department first-year Computer Science Laboratory.

Quotas are recorded under NetInfo, and may be managed through ÿ÷NetInfoManagerÿ÷, UNIX system command-line utilities, or the ÿ÷Quotasÿ÷ Application.  The latter is designed to allow users to examine their own usage and quotas, and to permit managers to change quotas or reset usages.

ÿ÷
0: Caveat Administratorÿ÷ù÷
This package is free for you to use and modify.  It is unsupported, and has parts that are not terribly elegant.  The page usage software only works with non-NeXT printers.  If your printer is hosted by a machine other than the NetInfo master, you will introduce a security hole to use the page accounting.
ÿ÷
Š1: Locationÿ÷
Software, reports, and source code is stored in a single directory. Access to this directory should be permitted only to root and members of an administrative group.  See the installation notes below.
ÿ÷
2: NetInfoù÷ÿ÷
New properties are added to the NetInfo user directories.  They are ÿ÷diskquotaÿ÷, ÿ÷pagequotaÿ÷, and ÿ÷pageusageÿ÷.  The quota software will use default values of 0 for all these properties if they have not been added to a user's NetInfo entry.  Two programs have been written to get and set netinfo properties for all users.  ÿ÷getall ÿ÷propertyÿ÷ prints user names and values for the given property.  ÿ÷setall ÿ÷property valueÿ÷ sets the given property to the given value for all users.  These are extraordinarily powerful programs, which could cause havoc in NetInfo if used improperly.  Please be carefull.
t
ÿ÷3.1: Files and Software
ù÷ÿ÷Nightly	Script run by ÿ÷cronÿ÷.
QuotaCheck	Run by ÿ÷Nightlyÿ÷.  Output file is ÿ÷reportÿ÷.  Ages ÿ÷overÿ÷ files.
ProcessReport	Run by ÿ÷Nightlyÿ÷.  Input is ÿ÷reportÿ÷, outputs are ÿ÷overÿ÷ and ÿ÷lowÿ÷.
		Sends mail to users in ÿ÷overÿ÷ and ÿ÷lowÿ÷, unless run with "-m".
DisableOver	Disables accounts over quota for 7 of of the last 10 days.
disable	Usage: ÿ÷disableÿ÷ ÿ÷userÿ÷.  Used by ÿ÷DisableOverÿ÷.
enable	Usage: ÿ÷enableÿ÷ ÿ÷userÿ÷.  Re-enables user accounts.
È
ÿ÷2.1 Files and Software
ù÷ÿ÷setall	Usage: ÿ÷setall ÿ÷property valueÿ÷. Sets ÿ÷propertyÿ÷ for all users.
getall	Usage: ÿ÷getall ÿ÷propertyÿ÷.  Prints ÿ÷propertyÿ÷ value for all users.
Source/netinfo/*	Source files.

ÿ÷3: Disk space quotas
ù÷ÿ÷Disk usage is monitored byÿ÷ Nightlyÿ÷, which should be invoked by ÿ÷cronÿ÷.  This script first produces a report using ÿ÷QuotaCheckÿ÷.  The report lists ÿ÷nameÿ÷, ÿ÷diskquotaÿ÷, and ÿ÷diskusageÿ÷ for each user.  The ÿ÷Nightlyÿ÷ script then runs ÿ÷ProcessReportÿ÷, which constructs lists of users over their quota, and within 20% of their quota.  Mail messages are sent to the users on each list informing them of their usage.   ÿ÷QuotaCheckÿ÷ ages the over-quota list for 10 days.  The most recent over-quota list is called ÿ÷overÿ÷.  The over-quota list for the previous days are kept in ÿ÷over.1ÿ÷ to ÿ÷over.9ÿ÷.  ÿ÷Nightlyÿ÷ then runs ÿ÷DisableOverÿ÷, which disables the account of anyone over disk quota for 7 of the last 10 days.  A list of disabled accounts is written to the file ÿ÷disabledÿ÷.
x/usr/lib/crontab	Invokes ÿ÷Nightlyÿ÷.
Source/diskq/*	Source files.

ÿ÷4: Printer page quotas
ù÷ÿ÷Printer page usage is counted byÿ÷ /usr/lib/transcript/psifÿ÷.  The printer is queried before and after every print job by ÿ÷pagecount ÿ÷to determine the page count.  The value of the ÿ÷pageusageÿ÷ property in the NetInfo entry for the user doing the printing is updated by ÿ÷/usr/lib/transcript/updatepageÿ÷.  This program is actually a copy of ÿ÷addpuÿ÷.  When ÿ÷pageusageÿ÷ is over ÿ÷pagequotaÿ÷ the printjob is cancelled, and a cancellation page is printed.

ÿ÷4.1: Files and Software
ù÷ÿ÷setpq	Usage: ÿ÷setpqÿ÷ ÿ÷user quotaÿ÷  Sets printer page quota for user.
getpq	Usage: ÿ÷getpqÿ÷ ÿ÷userÿ÷.  Prints page quota for user.
setpu	Usage: ÿ÷setpuÿ÷ ÿ÷userÿ÷ ÿ÷usageÿ÷  Sets printer page usage for user.
getpu	Usage: ÿ÷getpuÿ÷ ÿ÷userÿ÷.  Prints page usage for user.
addpu	Usage: ÿ÷addpuÿ÷ ÿ÷userÿ÷ ÿ÷pagesÿ÷.  Adds pages to ÿ÷pageusageÿ÷ for user.
pagecount	Usage: ÿ÷pagecount ÿ÷deviceÿ÷. ÿ÷Gets and prints a page count from a printer.
/usr/lib/transcript/psif
		Printer output filter modified to maintain ÿ÷pageusageÿ÷.
		Cancels print jobs if the user is over quota.
/usr/lib/transcript/updatepage
		A copy of ÿ÷addpuÿ÷.
exceeded.ps	Prototype cancellation page.
		ÿ÷%%Titleÿ÷ modified to Page Quota Exceeded.
		ÿ÷%%Creatorÿ÷ modified to Accounting.
Source/pageq/*	Source Files.
ÿ÷5: Quotas application
ù÷ÿ÷A NextStep application program for examining and managing quotas and usage is available in ÿ÷Qÿ÷uotasÿ÷.  It presents the user with a window containing the user's login name, current disk usage, disk quota, page usage and page quota.  The application's menu contains a Manager item.  When selected, an authorization window appears and prompts for a password.  If the system root password is entered, the program will allow one to examine and change quotas and page usage for any user, selected by entering their name into the User TextField.
]ÿ÷
5.1: Files and Software
ÿ÷Quotas	Quota Application
Source/Quotas/*	Source FilesüZ
Z€°Ð0÷

ÿ÷6: Installation
ÿ÷ù÷·	Set the name of the installation directory  in ÿ÷Nightlyÿ÷.  It is currently set to 	ÿ÷/Users/Admin/Quotasÿ÷.

·	ÿ÷/usr/lib/crontabÿ÷ should invoke ÿ÷Nightlyÿ÷ with an entry like:
	0 4 * * *       root    /bin/sh /Users/Admin/Quotas/Nightly

·	Copy ÿ÷Source/pageq/psifÿ÷ to ÿ÷/usr/lib/transcriptÿ÷ on the printer server.

·	Copy ÿ÷addpuÿ÷ to ÿ÷/usr/lib/transcript/updatepageÿ÷ on the printer server.
ü	If your printer is not served by the NetInfo master, then you will need to use the 	version of ÿ÷addpuÿ÷ in ÿ÷addpu.root.cÿ÷.  Read the ÿ÷READMEÿ÷ file inÿ÷ Source/pageqÿ÷, 	and the comments in the code.

·	Copy ÿ÷pagecountÿ÷ to ÿ÷/usr/lib/transcriptÿ÷ on the printer server.  ÿ÷pagecountÿ÷ keeps a log 	file in ÿ÷/usr/adm/printlogÿ÷.  If you want to change this, edit the source and recompile.  	This code should work on most PostScript printers, but your milage may vary.  Note 	that this code does not work for a NeXT printer, which appears to be connected to 	/dev/null (lp=/dev/null in NetInfo), and doesn't have a PostScript interpreter that 	ÿ÷pagecountÿ÷ can to ask for a pagecount.
Hd%§�¦”$ï¼$ñä${€$²Œ$»€$5ª$?¸d\Ö$»Œþ	If your printer is not served by the NetInfo master, then you will need to use the 	version of ÿ÷addpuÿ÷ in ÿ÷addpu.root.cÿ÷.  Read the ÿ÷READMEÿ÷ file inÿ÷ Source/pageqÿ÷, 	and the comments in the code.

·	Copy ÿ÷pagecountÿ÷ to ÿ÷/usr/lib/transcriptÿ÷ on the printer server.  ÿ÷pagecountÿ÷ keeps a log 	file in ÿ÷/usr/adm/printlogÿ÷.  If you want to change this, edit the source and recompile.  	This code should work on most PostScript printers, but your milage may vary.  Note 	that this code does not work for a NeXT printer, which appears to be connected to 	/dev/null (lp = /dev/null in NetInfo), and doesn't have a PostScript interpreter that 	ÿ÷pagecountÿ÷ can to ask for a pagecount.
Hd%§�¦”$ï¼$ñä${€$²Œ$»€$5ª$?¸d\Ö$"Œ

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.