home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
util
/
menu
/
010
/
login.mnu
< prev
next >
Wrap
Text File
|
1993-01-26
|
23KB
|
953 lines
Comment
========================================================
Copyright 1990-92 by Marc Perkel * All right reserved.
MarxMenu now allows you to login to a Novell network without using
Novell's login program or messing with nasty login scripts. You can
be in MarxMenu all the way in.
Before you start on this make sure you have read the Novell section of
the MarxMenu manual. This menu is somewhat tricky and requires some
study before you dive right in.
Logging into Novell is tricky. Especially if you are using boot roms
on your network cards. Through much trial and error, I have found
some solid tricks that make life easier.
You should have the following two BATCH files in your LOGIN
directory as follows:
LOADNET.BAT ;if used with BESTNET
-----------
@Echo Off
%NET%
%NETD%
Set NET=
Set NETD=
Startup
LOADNET.BAT ;if not used with BESTNET
-----------
@Echo Off
NETX
F:
Startup
STARTUP.BAT
-----------
SET BOOTUP=LOGIN
MarxMenu Login
%BOOTUP%
Each workstation should have their own AUTOEXEC.BAT. The last line
should be LOADNET. If you are running multiple versions of dos or a
variety of computers you should run BESTNET as part of your bootup
sequence.
Also, if you want automatic login you can add the following lines to you
AUTOEXEC.BAT file:
SET USERNAME=MARC Your Name Here
SET PASSWORD=NERD Your Password Here
You should also change the COMSPEC= to the network command.com BEFORE
you run NETX. For some unknown reason, this solves a lot of problems.
Example:
IPX
SET COMSPEC=O:COMMAMD.COM
NETX
Another boot rom quirk is that you can't run any program off a boot
rom that trashes upper memory. An example is running QEMM on a
monochrome monitor.
By using this method the boot disk or boot rom hands control over in
a clean way. LOADNET.BAT then branches to STARTUP.BAT for the rest
of the login sequence.
For some strange reason which I can't explain, LOADNET and STARTUP
have to be two separate batch files. I think it forces the transient
part of COMMAND.COM to load into memory. Anyhow, don't combine these
into one batch file
The first line of STARTUP.BAT is a message that tells this menu that
the user is logging in for the first time. This menu creates a batch
file and puts the name of it in the environment variable BOOTUP.
STARTUP.BAT then executes this file.
This is the example for MY network. You'll have to modify it for
yours. I'm doing a lot of tricky things in my login. Your login might
not need to be as complex as mine.
One word of caution. After modifing this menu, always run MARXCOMP
LOGIN to compile it. Otherwise, if you boot up into it you won't
have enough access rights to recompile automatically. I do this by
making a file called L.BAT.
ME LOGIN.MNU
MARXCOMP LOGIN.MNU
========================================================
EndComment
var
UserName
OldPass
NewPass
Logged
Station
SmartDir
MyServer
OrigServer
HomeDir
DosDir
Shell
Vols
PasswordExpDays
SkipError
Servers
StatusWin
TsrLoaded
DrDos6
MyGroups
Comment
========================================================
If you are using 386 NetWare then make sure you copy the program
SUBLOGIN.EXE to the LOGIN directory. This will allow you to do encrypted
logins. Or you can run:
SET ALLOW UNENCRYPTED PASSWORDS = ON
========================================================
EndComment
Shell = CleanFileName(%COMSPEC%)
MyServer = NovDefaultServer
OrigServer = MyServer
NovServers(Servers)
Logged = %LOGGED% = 'TRUE'
SkipError = False
TryAutoLogin ;login using environment variables
if not Logged then LoginFromScreen
NovSetPrimaryServer (MyServer)
NovSetPreferredServer (MyServer)
NovReadGroups(UserName,MyGroups) ;Read Groups user is in.
SortArray(MyGroups)
UserName = NovLoginName
%LOGGED% = ''
%USERNAME% = UserName
%PASSWORD% = ''
;----- Another Server Selected
if MyServer <> OrigServer
%BOOTUP% = 'STARTUP'
%LOGGED% = 'TRUE'
NovMapDrive('F',MyServer + '/SYS:LOGIN')
ChDir('F:\LOGIN')
ExitMenu
endif
;----- You can't assume that you have an F: drive unless you map it.
NovMapDrive ('F','SYS:LOGIN')
Comment
========================================================
If a TEMP environment variable is set, MarxMenu will use it for
temporary batch files. This is compatible with DOS 5 and Windows
conventions. The users should be given full access rights to this
directory. I'm using \TMPFILES for my network.
========================================================
EndComment
if ExistDir('F:\TMPFILES') then %TEMP% = 'F:\TMPFILES'
;----- Here we calculate a home directory for each user.
HomeDir = 'SYS:HOME\' + UserName
if UserName = 'SUPERVISOR' then HomeDir = 'SYS:SYSTEM'
if not ExistDir(HomeDir) then HomeDir = 'SYS:PUBLIC\UTIL'
Comment
========================================================
Here we calulate the the name of the dos directory that matches the
version of dos we are running. The directory for DOS 5.0 would be
SYS:PUBLIC\DOSV5.00
========================================================
EndComment
DosDir = 'SYS:PUBLIC\DOSV' + DosVersionString
;----- DR DOS (NovOS)
if %OS% > ''
DosDir = 'SYS:PUBLIC\' + %OS% + %VER%
DrDos6 = Value(%VER%) >= 6
if DrDos6
Bat('SHARE.EXE')
endif
endif
if not ExistDir(DosDir) then DosDir = ''
Comment
========================================================
Here's where we map our drives. This does not set the search path.
You set that explicitly by writing to the PATH environment variable.
SYS:--+---PUBLIC---NSK
| |
| +------UTIL
| |
| +------DOSV5.00
| |
| +------DRDOS6.0
|
+---HOME-----MARC
| |
| +------VICKI
|
+---LOGIN
Drive map commands may contain server and volume referrences:
========================================================
EndComment
NovMapRoot ('H', HomeDir) ;Home Directory
NovMapRoot ('N','SYS:PUBLIC\NSK') ;Network Survival Kit
NovMapRoot ('O', DosDir) ;Dos Directory
NovMapRoot ('U','SYS:PUBLIC\UTIL') ;Utilities Directory
NovMapRoot ('P','SYS:PUBLIC') ;Public Directory
NovMapRoot ('L','SYS:LOGIN') ;Login Directory
Comment
========================================================
Here we set a different directory for a program depending on if we
have a color or monochrome monitor.
========================================================
EndComment
if VideoMode = Mono
SmartDir = 'SYS:PUBLIC\MSMART'
else
SmartDir = 'SYS:PUBLIC\CSMART'
endif
if ExistDir SmartDir
NovMapRoot ('S',SmartDir)
endif
Comment
========================================================
W: is a work drive. When an application needs an extra search path, I
move W: to that directory.
OnKey 'L'
|NovMapRoot('W','\PUBLIC\LOTUS')
Lotus
========================================================
EndComment
NovMapRoot('W','H:')
if NovConsoleOperator
NovMapRoot ('V','F:\SYSTEM') ;System Directory
endif
if MyServer = 'TYME'
;----- Here's where I log into a second server.
if PosInList('SHOW',Servers) > 0
NovLogin('SHOW/' + UserName,OldPass)
NovMapDrive('K','SHOW/SYS:')
endif
;----- Here's where I log into a third server.
if PosInList('TSS',Servers) > 0
NovLogin('TSS/' + UserName,OldPass)
NovMapDrive('J','TSS/SYS:')
endif
;----- Here's where I log into another server.
if PosInList('MARX',Servers) > 0
NovLogin('MARX/' + UserName,OldPass)
NovMapDrive('G','MARX/SYS:')
endif
endif
NovVolumes(Vols)
if PosInList('VOL1',Vols) > 0 then NovMapDrive ('I','VOL1:')
;----- Turbo Pascal 6
if ExistDir ('H:\BP7') then NovMapRoot ('T','H:\BP7\BIN')
;----- If no drive C then use home directory
if Floppies < 3 ;I'm using some 4 floppy machines
if not ExistDir ('C:\') then NovMapRoot('C'