NAME

ppuser - PPR user database management utility


SYNOPSIS

ppuser [subcommand] [parameters ... ]


DESCRIPTION

This program is used to manage PPR user charge accounts. Ordinary users may run the ppuser show subcommand. All other subcommands require that the user be ``root'', ``ppr'', or be listed in /etc/ppr/acl/ppuser.allow.

ppuser add username 'real name' authcode initialbalance cutoff life
Adds a user to the accounting database.

Username is the username that, paired with a password, the user will use for logging in.

Real name is the name user name should be translated to before it is used in queue listings or banner pages. (For example, if user name is ``jandrews'', real name might be ``Joseph Andrews''.)

Authcode is the password which will identify the user. This field is not used and will be removed in the future. For now, you should set it to a dummy value such as the empty string.

Initialbalance is the user's starting balance. Cutoff is the balance below which printing priviledges should be denied.

Life is the lifetime of the account. It is measured in days of inactivity. PPR will not delete charge accounts automatically, a separate program must be employed to compare the period of inactivity to the life parameter. Such a program is not included in the current distribution.

ppuser delete username
Deletes the indicated user.

ppuser show username
Shows the indicated user's account information.

ppuser authcode username authcode
This subcommand has been removed.

ppuser deposit username amount
Deposits money in amount amount into the indicated user's account.

ppuser withdraw username amount
Withdraws the indicated amount amount of money from the indicated account. This command used when a user makes a cash withdrawal from the account, assuming that you permit cash withdrawals.

ppuser charge username amount
Assess a charge of amount against the indicated account. PPR does this automatically when posting a charge for printing.

ppuser correction username amount
Makes a correction to the indicated user's account. If amount is positive, the amount of money in the user's account will increase, if it is negative, the amount of money in the account will decrease. Generally this will be used to issue a credit for a botched print job.


EXAMPLES

To set up a new account for John Jones with an initial deposit of $10.00, a cutoff when he is overdrawn by more than $2.50 and to have his account disappear if it is unused for a year:

$ ppuser add jjones "John Jones" "" 10.00 -2.50 365

Note the empty authcode field.

Now lets assume that the operator made an error and Mr. Jones' was printed on the wrong kind of paper. We post a refund by issuing a $1.55 positive correction to his account:

$ ppuser correction jjones 1.55

Oops! We entered that as 155 rather than 1.55. We had better reverse the erroneous correction and issue a new one:

$ ppuser correction jjones -155 $ ppuser correction jjones 1.55

Later Mr. Jones inquires about his balance. The operator checks his account status:

$ ppuser show jjones

Mr. Jones sees that his account is running low. He hands the operator $10 to deposit. The operator puts the money in the till and runs this command:

$ ppuser deposit jjones 10.00

Mr. Jones is printing his term paper and has directed the operator to bind it in a handsome blue cover. There is a $2.50 charge for the cover and the service. The operator manualy posts the charge:

$ ppuser charge jjones 2.50

Now Mr. Jones is leaving us and wants the $9.50 remaining in his account. We run this command and hand him the cash:

$ ppuser withdraw jjones 9.50


FILES

The user account database is kept in the file ``/etc/ppr/charge_users.db''.

If the file ``/var/spool/ppr/logs/ppuser'' exists and is writable by the user ``ppr'', then all ppuser commands are logged there.


DIAGNOSTICS

Exit codes for ppuser are defined in the source code file ``include/util_exits.h''.


BUGS

If you choose to compile PPR without GNU DBM and don't provide an alternative to the GNU DBM based backend, this program will be non-functional.


SEE ALSO

the ppr.1 manpage, ppop, ppad, the pprd.8 manpage, ``PPR, a PostScript Print Spooler'', ``Installing and Using PPR''.


HISTORY

PPR was written at Trinity College during 1993--2003. It was first released to the public on 26 April 1995.


AUTHOR

David Chappell, Trinity College Computing Center, Hartford, Connecticut.