home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
CPROG
/
LOGIN.ZIP
/
README
< prev
next >
Wrap
Text File
|
1991-02-03
|
6KB
|
190 lines
### ##
## ##
## ###### ######## ## #####
## ######## ########## ### ##########
## ## ## ## ## ## ### ##
## ## ## ########## ## ## ##
## ## ## ######### ## ## ##
## ## ## ## ## ## ##
## # ######## ########## ## # ## ##
### ###### ######## ### ## ##
Inspired by the simple "login" program in the Feb. C Users
Journal, I have written another version of "login" for the
IBM PC and compatibles.
This version of login implements the following features:
1. Validate a user name and password.
2. Change to a specific disk drive.
3. Change to a specific directory.
4. Execute a program, batch file,
or "command.com" (shell)
5. Update a master user activity log file.
6. Display a "message of the day".
7. A utility program to add users.
(no change, delete, list yet...)
8. Encrypted passwords.
CUSTOMIZATION
=============
Login may be customized by changing the following file names
or paths. These file names and paths may be changed by editing
the file "login.h" and changing the values for the MNEMONIC
defines, or by setting the MNEMONIC equal to another path or
name in the autoexec.bat file.
MNEMONIC DEFAULT VALUE DESCRIPTION
-------------------------------------------------------------
PASSWD "C:\etc\passwd" default password file
LOGFILE "C:\etc\logfile" default activity log
MOTD "C:\etc\motd" default daily message file
ROOT "root" default root user name
COMMAND LINE OPTIONS
====================
Login supports the following command line options:
OPTION OPTION FUNCTION
------------------------------------------
'd' enable debugging output
'v' enable verbose output mode
'l' enable user activity logging mode
'm' enable display of "message of the day"
Any error in command line usage will elicit:
"usage: login [-dvlm]"
PASSWORD FILE MAINTENANCE PROGRAM
=================================
The "user" program is provided to add users to the password
file. The user program is an interactive program, and prompts
for the proper information. The command line to use "user" is:
user -a<CR> (The "-a" is mandatory)
Data validation is done on the informations entered. When
the last of the information has been entered, the info will
be shown, with the prompt: "Is This OK?". If the answer is
affirmative, then this user will be added to the password file.
Note that the password will be encrypted in the password file,
so that users who are given shell access may not view another
users password. This is a SIMPLE encryption based on the
public domain "uuencode" programs. (DES seemed like overkill
when a user could simply place a bootable diskette in drive A.)
PASSWORD FILE FORMAT:
=====================
A sample login password file follows:
############################################################
# PASSWORD FILE FORMAT #
# name:id number:drive:home directory:command or "shell" #
# #
# NOTES #
# 1. id 0 is reserved for root #
# 2. colons are mandatory separators #
# 3. leading and trailing white space is significant #
# 4. '#' indicates a comment line #
############################################################
root:0::C:\usr\tmp:shell
games:1:%9V%M97, :D:\games:shell
qedit:2:%<65D70 :C:\usr\tmp:q
bat:3:&8F%T8F%T:C:\usr\tmp:foo.bat
DEFINITIONS:
------------
NAME User name <= 14 characters (required)
ID NUMBER 3 digit number (required)
(NOTE: 0 is reserved for "root" name)
DRIVE Disk drive letter. (If omitted, defaults to
the current drive.)
HOME Directory path for user. (defaults to
current directory if omitted.)
COMMAND Command to execute. (If omitted, defaults to
command.com.)
NOTE: If a batch file is specified as the
command to run, the ".bat" extension MUST
be provided.
The passwords for the demo login IDs are:
games: "games"
qedit: "qedit"
bat: "batbat"
ACTIVITY LOG FILE FORMAT:
=========================
A sample activity log file follows:
T| Date Time | User Name |ID#|D| User Home Dir | Command/Shell
-+-----------------+-----------+---+-+---------------+--------------
I|02/03/91 17:20:35|games | 1|D|\games |C:\COMMAND.COM
O|02/03/91 17:20:38|games | 1|D|\games |C:\COMMAND.COM
The headings for the columns are defined as follows:
T The 'T'ype of activity recorded by this entry.
'I' indicates user logged Into the system.
'O' indicates user logged Out of the system.
Date & Time The Date and Time of the activity.
User Name User name from the password file.
ID# User ID Number from the password file.
D User Default Disk Drive from the password file.
User Home dir User Default Directory from the password file.
Command/Shell User Default Command from the password file, or
the word "shell" to indicate that a "command.com"
command processor should be given to this user.
COMPILING LOGIN
===============
Login was written in Microsoft 'C' Version 6.0.
To compile login, edit the file "login.h" and make
any changes regarding path names, and default ID's, etc.
The makefile may be edited to change any compile time
switches.
Then, type "make".
Off you go......
Have fun...
Michael Lavett
Birmingham, Alabama
205-991-5920