From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,5412e7936291c27c,start X-Google-Attributes: gid10d4db,public From: Operator Subject: Dial-Up Utils v1.13 Released Date: 1996/05/12 Message-ID: X-Deja-AN: 154740799 x-original-date: Sat, 11 May 1996 04:08:34 -0600 organization: University of Saskatchewan followup-to: comp.os.linux.networking newsgroups: comp.os.linux.announce -----BEGIN PGP SIGNED MESSAGE----- Here's the .lsm: Begin3 Title: Dial-Up_Utils Version: 1.13 Entered-date: 10May96 Description: Various utility programs to facilitate the administration of a Dial-Up or BBS under Linux. Dial-Up Utils may be used in conjunction with a BBS package. Keywords: dial-up modem pool bbs administration Author: Adam.McKee@usask.ca (Adam McKee) Maintained-by: Adam.McKee@usask.ca (Adam McKee) Primary-site: sunsite.unc.edu /pub/Linux/system/BBS 604 Dial-Up_Utils_1.13.lsm 20kB Dial-Up_Utils_1.13.tar.gz Copying-policy: GPL End Here's the README: Dial-Up_Utils v1.13 for Linux by Adam McKee Dial-Up_Utils is a package designed to solve the basic problems associated with administrating a Dial-Up / BBS on a Linux system. Dial-Up_Utils is meant to meet your administrative needs. If you are running a BBS, and you need an interface for users who are uncomfortable with the shell, you'll need to look elsewhere (i.e. lynx, VUBBS). Here is a quick summary of each utility: - --- Programs Used by Users ---------------------------------------------------- timeleft: -- Tells users how much time they have left before they will be booted from the system (i.e. all their processes killed with extreme prejudice ;-). daysleft: -- Tells users how many days they have left before their account expires. Upon expiration, an account may be either deleted or unsubscribed. - --- Programs Used by the Administrator ---------------------------------------- user_add : -- Adds a new account, updating the Dial-Up user database as well. This is just a shell script that calls system-native programs to set up an account, then calls 'user_addrec' to create a record in the Dial-Up user database. NOTE: you will need to modify 'user_add' to suit your system. user_addrec [session_limit] [priority]: -- Creates a record in the Dial-Up user database. This is normally called from 'user_add', and you shouldn't run it directly unless you know what you're doing. : The login name of the user to add. : The expiry time for the account. You can specify days, months, or years, as follows: 1 = 1 day, 1d = 1 day, 1m = 1 month, 1y = 1 year. NOTE: If = 0, the account will not be expired. NOTE: The 1st day/month/year will align to the end of the current day/month/year. If = 1y, for example, the account will be expired at the end of the current year. : How much time / day to give the user (in minutes). [session_limit]: How much time / session to give the user (in minutes). If this is not given, it defaults to . NOTE: session_limit <= time_limit [priority]: The priority for this user (0-7, 7 being the highest). If this is not given, it defaults to 4. user_ban [-l] [-p] < | >: -- Bans a phone number (or group of phone numbers). -l: List all banned numbers. -p: Prefix ban. All numbers beginning with the specified prefix will be banned. : An expiry date for the ban. The same syntax and rules apply to here as in 'user_addrec' and others. : Ban a specific user. The specified user will be kicked off of the system immediately (if they are on), their account deleted, and their phone number banned. Extreme prejudice! NOTE: One of the *first* things you should do if you plan to use call-back verification is to ban local phone numbers such as: user_ban -p 0 (don't bother telco operators) user_ban -p 1 (prevent long distance calls) user_ban -p 911 (*definitely* don't bother 911 operators) user_ban user_ban Of course, you won't be able to get them all... This is the draw-back of call-back verification -- there is no way to totally prevent malicious people from abusing it. user_del : -- Delete an account, and the associated record in the Dial-Up user database. This is a shell script which calls other programs (including 'user_delrec'). NOTE: you will need to modify 'user_del' to suit your system. user_delrec : -- Deletes a record from the Dial-Up user database. This is normally called from 'user_del', and you shouldn't run it directly unless you know what you're doing. user_data : -- Shows a Dial-Up user record in a human-readable format. user_kick : -- Give a user the boot (i.e. kill all of their processes). user_login: -- Determine whether or not it is OK for a particular user to log in. 'user_login' *must* be called whenever a user logs in or else users will not be booted at the proper time. You should put the following line in the system-wide startup script (i.e. /etc/profile): user_login || logout NOTE: If you have Smart-Boot enabled in user_updated.config, 'user_login' will permit a user who is out of time to login provided there is at least 1 free line. user_purge : -- Remove accounts which have not been used in a certain # of days. The argument must be > 14, or the program will terminate with an error message. user_renew: -- At midnight (or some other time), it is necessary to renew each users's time. This is done by simply calling 'user_renew' from root's crontab: 0 0 * * * /usr/sbin/user_renew 'user_renew' also takes care of expired accounts, subscriptions and bans. user_subscribe [session_limit] [priority]: -- Subscribe a user. See 'user_add' for a description of the arguments. After a user is unsubscribed (by 'user_renew'), the account will be restored to its state before the subscription (i.e. same time limits as before). user_sync: -- Synchronize the Dial-Up user file with the password file. Any records with a uid field that is NOT associated with a login name in the password file are deleted. Also, duplicated accounts (which, of course, shouldn't exist in the first place) are taken care of. 'user_sync' should be run periodically depending on how paranoid you happen to be. user_time [session_limit] [priority]: -- Directly change the expiry date and time limits of a user. See 'user_add' for a description of the arguments. user_touch: -- Modify a user's "last online" field to equal the current date. This is useful if you want to exempt certain users from the effects of 'user_purge'. user_unban : -- Unban a phone number previously banned with 'user_ban'. user_unsubscribe : -- Terminate a users's subscription. This is normally called from 'user_expire', but can be run directly. Terminating a subscription is simply a matter of restoring time limits to their values before the subscription was given. user_updated: -- 'user_updated' is a daemon that boots users off the system as necessary, and keeps user information current. Here is pseudo-code for it: while (true) do if ("Smart-Boot" is enabled) if (all lines are busy) if (anyone is over their time limit) if ("Smart-Boot-One" is enabled) boot the user who has least priority AND time else boot all users with no time left fi else if (any users with priority 0 are online) boot the one with the least time fi fi else if (anyone is over their time limit) boot all users with no time left else if (all lines are busy) if (any users with priority 0 are online) boot the one with the least time fi fi fi sleep for 1 minute done You'll probably want to have 'user_updated' started from one of your system's init scripts. user_verify: -- Does call-back verification. Allows a user to create an account after: - choosing a unique username. - choosing a legal phone number. - proving that that it is actually their phone number. clean_proc: -- Kills processes that, for one reason or another, were left running by users after they logged out. Users can be exempted from having their processes killed by clean_proc (i.e. you probably don't want root's processes to be killed...). You may want to run this from root's crontab. clean_tmp: -- Unlinks files in directories you specify (usually /tmp, /var/tmp, ...) which meet specific criteria (i.e. not owned by root, not accessed in the last day, ...). If clean_tmp encounters a file with time stamp > the current time, it will stamp the file with the current time. This is to make it more difficult to circumventing clean_tmp using 'touch'. You may want to run this from root's crontab. - --- Installation Instructions ------------------------------------------------- To install Dial-Up_Utils: - Run 'make depend ; make install' Red Hat users: do 'make dep ; make rpm' and install the RPM - Edit /etc/profile (and/or other startup scripts...) to include a call to 'user_login' as described above. - Edit 'user_add', and 'user_del' as required. - Edit 'clean_proc.config', 'clean_tmp.config', 'dial-up_utils.config' as required. - Make addition to root's crontab as outlined above. - ------------------------------------------------------------------------------- Bug reports, and ideas for improving Dial-Up_Utils will both be appreciated. Also, feel free to let me know if the package is working great and serving you well :-) - Adam McKee NOTE: E-Mail address is valid until September '96. -----BEGIN PGP SIGNATURE----- Version: 2.6.2i iQCVAwUBMZYYJIQRll5MupLRAQFwrAP9EyGnBrSI1R/uGacL34z/RsDKWSUfCtGj XLuzyKn9jjMDBnYvBzigfLuH37T1WpJlygQ2y+QYg8dB2YtaVSFY8EVQwj0uenL+ mKfgS5K864hGH5MJ6v9dxGykSFldM4yVUR0hDTcvlsNOsmwWpllCobVi8tYoGOh+ sE3I7GpNLaI= =PUes -----END PGP SIGNATURE----- -- This article has been digitally signed by the moderator, using PGP. Finger wirzeniu@kruuna.helsinki.fi for PGP key needed for validating signature. Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember a short description of the software and the LOCATION.