@ECHO OFF
REM GRNTSTA.BAT
REM Automated GRANT comparison test for MARS NWE.
REM
REM Direct mode:
REM   OUT     = Novell baseline using \NPUBLIC\GRANT
REM   PUBOUT  = our implementation using \PUBLIC\GRANT
REM
REM User-context mode:
REM   GRANT is run as SUPERVISOR against NOPASSUSER.
REM   DLYSTRT starts C:\GRNTTMP\GRNTC.BAT after this script exits.
REM   GRNTC logs in as NOPASSUSER and captures effective RIGHTS output.
REM
REM Optional automatic user-context mode requires:
REM   SET LGNTPWD=your-supervisor-password

IF "%1"=="" GOTO PART1
IF "%1"=="PART2" GOTO PART2
IF "%1"=="part2" GOTO PART2
IF "%1"=="Part2" GOTO PART2
ECHO Usage: GRNTSTA [PART2]
GOTO END

:PART1
F:
CD \

REM --- Clean generated test/result directories. ---
IF EXIST GRNTEST\*.* DELTREE /Y GRNTEST
IF EXIST GRNTCMP\*.* DELTREE /Y GRNTCMP
IF EXIST C:\GRNTTMP\*.* DELTREE /Y C:\GRNTTMP

IF NOT EXIST GRNTEST MD GRNTEST
IF NOT EXIST GRNTCMP MD GRNTCMP
IF NOT EXIST GRNTCMP\OUT MD GRNTCMP\OUT
IF NOT EXIST GRNTCMP\PUBOUT MD GRNTCMP\PUBOUT
IF NOT EXIST GRNTCMP\SETUP MD GRNTCMP\SETUP
IF NOT EXIST C:\GRNTTMP MD C:\GRNTTMP
IF NOT EXIST C:\GRNTTMP\UNOV MD C:\GRNTTMP\UNOV
IF NOT EXIST C:\GRNTTMP\UPUB MD C:\GRNTTMP\UPUB
IF NOT EXIST C:\GRNTTMP\USETUP MD C:\GRNTTMP\USETUP

ECHO GRNTSTA GRANT comparison test > F:\GRNTCMP\RUN.LOG
ECHO OUT     = Novell baseline with \NPUBLIC\GRANT >> F:\GRNTCMP\RUN.LOG
ECHO PUBOUT  = our implementation with \PUBLIC\GRANT >> F:\GRNTCMP\RUN.LOG
ECHO User-context target: NOPASSUSER >> F:\GRNTCMP\RUN.LOG
ECHO. >> F:\GRNTCMP\RUN.LOG

ECHO Starting D01_HELP...
\NPUBLIC\GRANT /? > F:\GRNTCMP\OUT\D01_HELP.OUT
\PUBLIC\GRANT /? > F:\GRNTCMP\PUBOUT\D01_HELP.OUT
ECHO Starting D02_NOAR...
\NPUBLIC\GRANT > F:\GRNTCMP\OUT\D02_NOAR.OUT
\PUBLIC\GRANT > F:\GRNTCMP\PUBOUT\D02_NOAR.OUT

REM --- Setup matrix directories/files. ---
IF NOT EXIST GRNTEST\G10 MD GRNTEST\G10
ECHO G10_R > F:\GRNTEST\G10\TEST.TXT
IF NOT EXIST GRNTEST\G11 MD GRNTEST\G11
ECHO G11_W > F:\GRNTEST\G11\TEST.TXT
IF NOT EXIST GRNTEST\G12 MD GRNTEST\G12
ECHO G12_C > F:\GRNTEST\G12\TEST.TXT
IF NOT EXIST GRNTEST\G13 MD GRNTEST\G13
ECHO G13_E > F:\GRNTEST\G13\TEST.TXT
IF NOT EXIST GRNTEST\G14 MD GRNTEST\G14
ECHO G14_M > F:\GRNTEST\G14\TEST.TXT
IF NOT EXIST GRNTEST\G15 MD GRNTEST\G15
ECHO G15_F > F:\GRNTEST\G15\TEST.TXT
IF NOT EXIST GRNTEST\G16 MD GRNTEST\G16
ECHO G16_A > F:\GRNTEST\G16\TEST.TXT
IF NOT EXIST GRNTEST\G17 MD GRNTEST\G17
ECHO G17_S > F:\GRNTEST\G17\TEST.TXT
IF NOT EXIST GRNTEST\G20 MD GRNTEST\G20
ECHO G20_RF > F:\GRNTEST\G20\TEST.TXT
IF NOT EXIST GRNTEST\G21 MD GRNTEST\G21
ECHO G21_RW > F:\GRNTEST\G21\TEST.TXT
IF NOT EXIST GRNTEST\G22 MD GRNTEST\G22
ECHO G22_RWC > F:\GRNTEST\G22\TEST.TXT
IF NOT EXIST GRNTEST\G23 MD GRNTEST\G23
ECHO G23_RWCE > F:\GRNTEST\G23\TEST.TXT
IF NOT EXIST GRNTEST\G24 MD GRNTEST\G24
ECHO G24_RAL > F:\GRNTEST\G24\TEST.TXT
IF NOT EXIST GRNTEST\G25 MD GRNTEST\G25
ECHO G25_SAL > F:\GRNTEST\G25\TEST.TXT
IF NOT EXIST GRNTEST\G26 MD GRNTEST\G26
ECHO G26_ALL > F:\GRNTEST\G26\TEST.TXT
IF NOT EXIST GRNTEST\G27 MD GRNTEST\G27
ECHO G27_N > F:\GRNTEST\G27\TEST.TXT
IF NOT EXIST GRNTEST\G30 MD GRNTEST\G30
ECHO G30_RE > F:\GRNTEST\G30\TEST.TXT
IF NOT EXIST GRNTEST\G31 MD GRNTEST\G31
ECHO G31_RWF > F:\GRNTEST\G31\TEST.TXT
IF NOT EXIST GRNTEST\G32 MD GRNTEST\G32
ECHO G32_RCM > F:\GRNTEST\G32\TEST.TXT
IF NOT EXIST GRNTEST\G33 MD GRNTEST\G33
ECHO G33_RFA > F:\GRNTEST\G33\TEST.TXT
IF NOT EXIST GRNTEST\G34 MD GRNTEST\G34
ECHO G34_WCM > F:\GRNTEST\G34\TEST.TXT
IF NOT EXIST GRNTEST\G35 MD GRNTEST\G35
ECHO G35_EMF > F:\GRNTEST\G35\TEST.TXT
IF NOT EXIST GRNTEST\G36 MD GRNTEST\G36
ECHO G36_RMF > F:\GRNTEST\G36\TEST.TXT
IF NOT EXIST GRNTEST\G37 MD GRNTEST\G37
ECHO G37_REMA > F:\GRNTEST\G37\TEST.TXT
IF NOT EXIST GRNTEST\G38 MD GRNTEST\G38
ECHO G38_SR > F:\GRNTEST\G38\TEST.TXT
IF NOT EXIST GRNTEST\G39 MD GRNTEST\G39
ECHO G39_SRF > F:\GRNTEST\G39\TEST.TXT
IF NOT EXIST GRNTEST\G40 MD GRNTEST\G40
ECHO G40_SWCM > F:\GRNTEST\G40\TEST.TXT
IF NOT EXIST GRNTEST\F10 MD GRNTEST\F10
ECHO F10_R > F:\GRNTEST\F10\T.TXT
IF NOT EXIST GRNTEST\F11 MD GRNTEST\F11
ECHO F11_RF > F:\GRNTEST\F11\T.TXT
IF NOT EXIST GRNTEST\F12 MD GRNTEST\F12
ECHO F12_RAL > F:\GRNTEST\F12\T.TXT
IF NOT EXIST GRNTEST\F13 MD GRNTEST\F13
ECHO F13_ALL > F:\GRNTEST\F13\T.TXT
IF NOT EXIST GRNTEST\F14 MD GRNTEST\F14
ECHO F14_N > F:\GRNTEST\F14\T.TXT
IF NOT EXIST GRNTEST\F15 MD GRNTEST\F15
ECHO F15_S > F:\GRNTEST\F15\T.TXT
IF NOT EXIST GRNTEST\F16 MD GRNTEST\F16
ECHO F16_SAL > F:\GRNTEST\F16\T.TXT
IF NOT EXIST GRNTEST\S10 MD GRNTEST\S10
IF NOT EXIST GRNTEST\S10\S1 MD GRNTEST\S10\S1
IF NOT EXIST GRNTEST\S10\S2 MD GRNTEST\S10\S2
ECHO S10_R > F:\GRNTEST\S10\S1\T.TXT
IF NOT EXIST GRNTEST\S11 MD GRNTEST\S11
IF NOT EXIST GRNTEST\S11\S1 MD GRNTEST\S11\S1
IF NOT EXIST GRNTEST\S11\S2 MD GRNTEST\S11\S2
ECHO S11_RWC > F:\GRNTEST\S11\S1\T.TXT
IF NOT EXIST GRNTEST\S12 MD GRNTEST\S12
IF NOT EXIST GRNTEST\S12\S1 MD GRNTEST\S12\S1
IF NOT EXIST GRNTEST\S12\S2 MD GRNTEST\S12\S2
ECHO S12_ALL > F:\GRNTEST\S12\S1\T.TXT

REM --- Direct GRANT output compare and leave PUBLIC state for user-context readback. ---
ECHO Starting G10_R directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G10 > F:\GRNTCMP\SETUP\G10_RNREM.OUT
\NPUBLIC\GRANT R FOR F:\GRNTEST\G10 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G10_R.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G10 > F:\GRNTCMP\SETUP\G10_RPREM.OUT
\PUBLIC\GRANT R FOR F:\GRNTEST\G10 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G10_R.OUT
ECHO Starting G11_W directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G11 > F:\GRNTCMP\SETUP\G11_WNREM.OUT
\NPUBLIC\GRANT W FOR F:\GRNTEST\G11 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G11_W.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G11 > F:\GRNTCMP\SETUP\G11_WPREM.OUT
\PUBLIC\GRANT W FOR F:\GRNTEST\G11 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G11_W.OUT
ECHO Starting G12_C directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G12 > F:\GRNTCMP\SETUP\G12_CNREM.OUT
\NPUBLIC\GRANT C FOR F:\GRNTEST\G12 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G12_C.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G12 > F:\GRNTCMP\SETUP\G12_CPREM.OUT
\PUBLIC\GRANT C FOR F:\GRNTEST\G12 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G12_C.OUT
ECHO Starting G13_E directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G13 > F:\GRNTCMP\SETUP\G13_ENREM.OUT
\NPUBLIC\GRANT E FOR F:\GRNTEST\G13 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G13_E.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G13 > F:\GRNTCMP\SETUP\G13_EPREM.OUT
\PUBLIC\GRANT E FOR F:\GRNTEST\G13 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G13_E.OUT
ECHO Starting G14_M directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G14 > F:\GRNTCMP\SETUP\G14_MNREM.OUT
\NPUBLIC\GRANT M FOR F:\GRNTEST\G14 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G14_M.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G14 > F:\GRNTCMP\SETUP\G14_MPREM.OUT
\PUBLIC\GRANT M FOR F:\GRNTEST\G14 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G14_M.OUT
ECHO Starting G15_F directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G15 > F:\GRNTCMP\SETUP\G15_FNREM.OUT
\NPUBLIC\GRANT F FOR F:\GRNTEST\G15 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G15_F.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G15 > F:\GRNTCMP\SETUP\G15_FPREM.OUT
\PUBLIC\GRANT F FOR F:\GRNTEST\G15 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G15_F.OUT
ECHO Starting G16_A directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G16 > F:\GRNTCMP\SETUP\G16_ANREM.OUT
\NPUBLIC\GRANT A FOR F:\GRNTEST\G16 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G16_A.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G16 > F:\GRNTCMP\SETUP\G16_APREM.OUT
\PUBLIC\GRANT A FOR F:\GRNTEST\G16 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G16_A.OUT
ECHO Starting G17_S directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G17 > F:\GRNTCMP\SETUP\G17_SNREM.OUT
\NPUBLIC\GRANT S FOR F:\GRNTEST\G17 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G17_S.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G17 > F:\GRNTCMP\SETUP\G17_SPREM.OUT
\PUBLIC\GRANT S FOR F:\GRNTEST\G17 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G17_S.OUT
ECHO Starting G20_RF directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G20 > F:\GRNTCMP\SETUP\G20_RFNREM.OUT
\NPUBLIC\GRANT R F FOR F:\GRNTEST\G20 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G20_RF.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G20 > F:\GRNTCMP\SETUP\G20_RFPREM.OUT
\PUBLIC\GRANT R F FOR F:\GRNTEST\G20 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G20_RF.OUT
ECHO Starting G21_RW directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G21 > F:\GRNTCMP\SETUP\G21_RWNREM.OUT
\NPUBLIC\GRANT R W FOR F:\GRNTEST\G21 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G21_RW.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G21 > F:\GRNTCMP\SETUP\G21_RWPREM.OUT
\PUBLIC\GRANT R W FOR F:\GRNTEST\G21 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G21_RW.OUT
ECHO Starting G22_RWC directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G22 > F:\GRNTCMP\SETUP\G22_RWCNREM.OUT
\NPUBLIC\GRANT R W C FOR F:\GRNTEST\G22 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G22_RWC.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G22 > F:\GRNTCMP\SETUP\G22_RWCPREM.OUT
\PUBLIC\GRANT R W C FOR F:\GRNTEST\G22 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G22_RWC.OUT
ECHO Starting G23_RWCE directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G23 > F:\GRNTCMP\SETUP\G23_RWCENREM.OUT
\NPUBLIC\GRANT R W C E FOR F:\GRNTEST\G23 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G23_RWCE.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G23 > F:\GRNTCMP\SETUP\G23_RWCEPREM.OUT
\PUBLIC\GRANT R W C E FOR F:\GRNTEST\G23 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G23_RWCE.OUT
ECHO Starting G24_RAL directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G24 > F:\GRNTCMP\SETUP\G24_RALNREM.OUT
\NPUBLIC\GRANT R W C E M F A FOR F:\GRNTEST\G24 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G24_RAL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G24 > F:\GRNTCMP\SETUP\G24_RALPREM.OUT
\PUBLIC\GRANT R W C E M F A FOR F:\GRNTEST\G24 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G24_RAL.OUT
ECHO Starting G25_SAL directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G25 > F:\GRNTCMP\SETUP\G25_SALNREM.OUT
\NPUBLIC\GRANT S R W C E M F A FOR F:\GRNTEST\G25 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G25_SAL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G25 > F:\GRNTCMP\SETUP\G25_SALPREM.OUT
\PUBLIC\GRANT S R W C E M F A FOR F:\GRNTEST\G25 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G25_SAL.OUT
ECHO Starting G26_ALL directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G26 > F:\GRNTCMP\SETUP\G26_ALLNREM.OUT
\NPUBLIC\GRANT ALL FOR F:\GRNTEST\G26 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G26_ALL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G26 > F:\GRNTCMP\SETUP\G26_ALLPREM.OUT
\PUBLIC\GRANT ALL FOR F:\GRNTEST\G26 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G26_ALL.OUT
ECHO Starting G27_N directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G27 > F:\GRNTCMP\SETUP\G27_NNREM.OUT
\NPUBLIC\GRANT N FOR F:\GRNTEST\G27 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G27_N.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G27 > F:\GRNTCMP\SETUP\G27_NPREM.OUT
\PUBLIC\GRANT N FOR F:\GRNTEST\G27 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G27_N.OUT
ECHO Starting G30_RE directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G30 > F:\GRNTCMP\SETUP\G30_RENREM.OUT
\NPUBLIC\GRANT R E FOR F:\GRNTEST\G30 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G30_RE.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G30 > F:\GRNTCMP\SETUP\G30_REPREM.OUT
\PUBLIC\GRANT R E FOR F:\GRNTEST\G30 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G30_RE.OUT
ECHO Starting G31_RWF directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G31 > F:\GRNTCMP\SETUP\G31_RWFNREM.OUT
\NPUBLIC\GRANT R W F FOR F:\GRNTEST\G31 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G31_RWF.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G31 > F:\GRNTCMP\SETUP\G31_RWFPREM.OUT
\PUBLIC\GRANT R W F FOR F:\GRNTEST\G31 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G31_RWF.OUT
ECHO Starting G32_RCM directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G32 > F:\GRNTCMP\SETUP\G32_RCMNREM.OUT
\NPUBLIC\GRANT R C M FOR F:\GRNTEST\G32 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G32_RCM.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G32 > F:\GRNTCMP\SETUP\G32_RCMPREM.OUT
\PUBLIC\GRANT R C M FOR F:\GRNTEST\G32 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G32_RCM.OUT
ECHO Starting G33_RFA directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G33 > F:\GRNTCMP\SETUP\G33_RFANREM.OUT
\NPUBLIC\GRANT R F A FOR F:\GRNTEST\G33 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G33_RFA.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G33 > F:\GRNTCMP\SETUP\G33_RFAPREM.OUT
\PUBLIC\GRANT R F A FOR F:\GRNTEST\G33 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G33_RFA.OUT
ECHO Starting G34_WCM directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G34 > F:\GRNTCMP\SETUP\G34_WCMNREM.OUT
\NPUBLIC\GRANT W C M FOR F:\GRNTEST\G34 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G34_WCM.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G34 > F:\GRNTCMP\SETUP\G34_WCMPREM.OUT
\PUBLIC\GRANT W C M FOR F:\GRNTEST\G34 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G34_WCM.OUT
ECHO Starting G35_EMF directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G35 > F:\GRNTCMP\SETUP\G35_EMFNREM.OUT
\NPUBLIC\GRANT E M F FOR F:\GRNTEST\G35 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G35_EMF.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G35 > F:\GRNTCMP\SETUP\G35_EMFPREM.OUT
\PUBLIC\GRANT E M F FOR F:\GRNTEST\G35 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G35_EMF.OUT
ECHO Starting G36_RMF directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G36 > F:\GRNTCMP\SETUP\G36_RMFNREM.OUT
\NPUBLIC\GRANT R W C M F FOR F:\GRNTEST\G36 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G36_RMF.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G36 > F:\GRNTCMP\SETUP\G36_RMFPREM.OUT
\PUBLIC\GRANT R W C M F FOR F:\GRNTEST\G36 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G36_RMF.OUT
ECHO Starting G37_REMA directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G37 > F:\GRNTCMP\SETUP\G37_REMANREM.OUT
\NPUBLIC\GRANT R E M A FOR F:\GRNTEST\G37 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G37_REMA.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G37 > F:\GRNTCMP\SETUP\G37_REMAPREM.OUT
\PUBLIC\GRANT R E M A FOR F:\GRNTEST\G37 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G37_REMA.OUT
ECHO Starting G38_SR directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G38 > F:\GRNTCMP\SETUP\G38_SRNREM.OUT
\NPUBLIC\GRANT S R FOR F:\GRNTEST\G38 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G38_SR.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G38 > F:\GRNTCMP\SETUP\G38_SRPREM.OUT
\PUBLIC\GRANT S R FOR F:\GRNTEST\G38 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G38_SR.OUT
ECHO Starting G39_SRF directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G39 > F:\GRNTCMP\SETUP\G39_SRFNREM.OUT
\NPUBLIC\GRANT S R F FOR F:\GRNTEST\G39 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G39_SRF.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G39 > F:\GRNTCMP\SETUP\G39_SRFPREM.OUT
\PUBLIC\GRANT S R F FOR F:\GRNTEST\G39 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G39_SRF.OUT
ECHO Starting G40_SWCM directory grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G40 > F:\GRNTCMP\SETUP\G40_SWCMNREM.OUT
\NPUBLIC\GRANT S W C M FOR F:\GRNTEST\G40 TO USER NOPASSUSER > F:\GRNTCMP\OUT\G40_SWCM.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\G40 > F:\GRNTCMP\SETUP\G40_SWCMPREM.OUT
\PUBLIC\GRANT S W C M FOR F:\GRNTEST\G40 TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\G40_SWCM.OUT
ECHO Starting F10_R file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F10\T.TXT /FILES > F:\GRNTCMP\SETUP\F10_RNREM.OUT
\NPUBLIC\GRANT R FOR F:\GRNTEST\F10\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F10_R.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F10\T.TXT /FILES > F:\GRNTCMP\SETUP\F10_RPREM.OUT
\PUBLIC\GRANT R FOR F:\GRNTEST\F10\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F10_R.OUT
ECHO Starting F11_RF file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F11\T.TXT /FILES > F:\GRNTCMP\SETUP\F11_RFNREM.OUT
\NPUBLIC\GRANT R F FOR F:\GRNTEST\F11\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F11_RF.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F11\T.TXT /FILES > F:\GRNTCMP\SETUP\F11_RFPREM.OUT
\PUBLIC\GRANT R F FOR F:\GRNTEST\F11\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F11_RF.OUT
ECHO Starting F12_RAL file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F12\T.TXT /FILES > F:\GRNTCMP\SETUP\F12_RALNREM.OUT
\NPUBLIC\GRANT R W C E M F A FOR F:\GRNTEST\F12\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F12_RAL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F12\T.TXT /FILES > F:\GRNTCMP\SETUP\F12_RALPREM.OUT
\PUBLIC\GRANT R W C E M F A FOR F:\GRNTEST\F12\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F12_RAL.OUT
ECHO Starting F13_ALL file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F13\T.TXT /FILES > F:\GRNTCMP\SETUP\F13_ALLNREM.OUT
\NPUBLIC\GRANT ALL FOR F:\GRNTEST\F13\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F13_ALL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F13\T.TXT /FILES > F:\GRNTCMP\SETUP\F13_ALLPREM.OUT
\PUBLIC\GRANT ALL FOR F:\GRNTEST\F13\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F13_ALL.OUT
ECHO Starting F14_N file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F14\T.TXT /FILES > F:\GRNTCMP\SETUP\F14_NNREM.OUT
\NPUBLIC\GRANT N FOR F:\GRNTEST\F14\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F14_N.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F14\T.TXT /FILES > F:\GRNTCMP\SETUP\F14_NPREM.OUT
\PUBLIC\GRANT N FOR F:\GRNTEST\F14\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F14_N.OUT
ECHO Starting F15_S file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F15\T.TXT /FILES > F:\GRNTCMP\SETUP\F15_SNREM.OUT
\NPUBLIC\GRANT S FOR F:\GRNTEST\F15\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F15_S.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F15\T.TXT /FILES > F:\GRNTCMP\SETUP\F15_SPREM.OUT
\PUBLIC\GRANT S FOR F:\GRNTEST\F15\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F15_S.OUT
ECHO Starting F16_SAL file grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F16\T.TXT /FILES > F:\GRNTCMP\SETUP\F16_SALNREM.OUT
\NPUBLIC\GRANT S R W C E M F A FOR F:\GRNTEST\F16\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\OUT\F16_SAL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\F16\T.TXT /FILES > F:\GRNTCMP\SETUP\F16_SALPREM.OUT
\PUBLIC\GRANT S R W C E M F A FOR F:\GRNTEST\F16\T.TXT TO USER NOPASSUSER /FILES > F:\GRNTCMP\PUBOUT\F16_SAL.OUT
ECHO Starting S10_R subdir grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\S10 /SUBDIRS > F:\GRNTCMP\SETUP\S10_RNREM.OUT
\NPUBLIC\GRANT R FOR F:\GRNTEST\S10 TO USER NOPASSUSER /SUBDIRECTORIES > F:\GRNTCMP\OUT\S10_R.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\S10 /SUBDIRS > F:\GRNTCMP\SETUP\S10_RPREM.OUT
\PUBLIC\GRANT R FOR F:\GRNTEST\S10 TO USER NOPASSUSER /SUBDIRECTORIES > F:\GRNTCMP\PUBOUT\S10_R.OUT
ECHO Starting S11_RWC subdir grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\S11 /SUBDIRS > F:\GRNTCMP\SETUP\S11_RWCNREM.OUT
\NPUBLIC\GRANT R W C FOR F:\GRNTEST\S11 TO USER NOPASSUSER /SUBDIRECTORIES > F:\GRNTCMP\OUT\S11_RWC.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\S11 /SUBDIRS > F:\GRNTCMP\SETUP\S11_RWCPREM.OUT
\PUBLIC\GRANT R W C FOR F:\GRNTEST\S11 TO USER NOPASSUSER /SUBDIRECTORIES > F:\GRNTCMP\PUBOUT\S11_RWC.OUT
ECHO Starting S12_ALL subdir grant...
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\S12 /SUBDIRS > F:\GRNTCMP\SETUP\S12_ALLNREM.OUT
\NPUBLIC\GRANT ALL FOR F:\GRNTEST\S12 TO USER NOPASSUSER /SUBDIRECTORIES > F:\GRNTCMP\OUT\S12_ALL.OUT
\NPUBLIC\REMOVE USER NOPASSUSER FROM F:\GRNTEST\S12 /SUBDIRS > F:\GRNTCMP\SETUP\S12_ALLPREM.OUT
\PUBLIC\GRANT ALL FOR F:\GRNTEST\S12 TO USER NOPASSUSER /SUBDIRECTORIES > F:\GRNTCMP\PUBOUT\S12_ALL.OUT

ECHO Starting D90_BADR...
\NPUBLIC\GRANT BADRIGHT FOR F:\GRNTEST TO USER NOPASSUSER > F:\GRNTCMP\OUT\D90_BADR.OUT
\PUBLIC\GRANT BADRIGHT FOR F:\GRNTEST TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\D90_BADR.OUT
ECHO Starting D91_MISU...
\NPUBLIC\GRANT R F FOR F:\GRNTEST TO USER NO_SUCH_USER > F:\GRNTCMP\OUT\D91_MISU.OUT
\PUBLIC\GRANT R F FOR F:\GRNTEST TO USER NO_SUCH_USER > F:\GRNTCMP\PUBOUT\D91_MISU.OUT
ECHO Starting D92_MISP...
\NPUBLIC\GRANT R F FOR F:\GRNTEST\MISSING TO USER NOPASSUSER > F:\GRNTCMP\OUT\D92_MISP.OUT
\PUBLIC\GRANT R F FOR F:\GRNTEST\MISSING TO USER NOPASSUSER > F:\GRNTCMP\PUBOUT\D92_MISP.OUT
ECHO Starting D93_GRAM...
\NPUBLIC\GRANT R F FOR F:\GRNTEST NOPASSUSER > F:\GRNTCMP\OUT\D93_GRAM.OUT
\PUBLIC\GRANT R F FOR F:\GRNTEST NOPASSUSER > F:\GRNTCMP\PUBOUT\D93_GRAM.OUT

ECHO === COMPARE NOVELL OUT AGAINST PUBLIC OUT === > F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\D01_HELP.OUT F:\GRNTCMP\PUBOUT\D01_HELP.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\D02_NOAR.OUT F:\GRNTCMP\PUBOUT\D02_NOAR.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G10_R.OUT F:\GRNTCMP\PUBOUT\G10_R.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G11_W.OUT F:\GRNTCMP\PUBOUT\G11_W.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G12_C.OUT F:\GRNTCMP\PUBOUT\G12_C.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G13_E.OUT F:\GRNTCMP\PUBOUT\G13_E.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G14_M.OUT F:\GRNTCMP\PUBOUT\G14_M.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G15_F.OUT F:\GRNTCMP\PUBOUT\G15_F.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G16_A.OUT F:\GRNTCMP\PUBOUT\G16_A.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G17_S.OUT F:\GRNTCMP\PUBOUT\G17_S.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G20_RF.OUT F:\GRNTCMP\PUBOUT\G20_RF.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G21_RW.OUT F:\GRNTCMP\PUBOUT\G21_RW.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G22_RWC.OUT F:\GRNTCMP\PUBOUT\G22_RWC.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G23_RWCE.OUT F:\GRNTCMP\PUBOUT\G23_RWCE.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G24_RAL.OUT F:\GRNTCMP\PUBOUT\G24_RAL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G25_SAL.OUT F:\GRNTCMP\PUBOUT\G25_SAL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G26_ALL.OUT F:\GRNTCMP\PUBOUT\G26_ALL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G27_N.OUT F:\GRNTCMP\PUBOUT\G27_N.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G30_RE.OUT F:\GRNTCMP\PUBOUT\G30_RE.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G31_RWF.OUT F:\GRNTCMP\PUBOUT\G31_RWF.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G32_RCM.OUT F:\GRNTCMP\PUBOUT\G32_RCM.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G33_RFA.OUT F:\GRNTCMP\PUBOUT\G33_RFA.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G34_WCM.OUT F:\GRNTCMP\PUBOUT\G34_WCM.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G35_EMF.OUT F:\GRNTCMP\PUBOUT\G35_EMF.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G36_RMF.OUT F:\GRNTCMP\PUBOUT\G36_RMF.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G37_REMA.OUT F:\GRNTCMP\PUBOUT\G37_REMA.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G38_SR.OUT F:\GRNTCMP\PUBOUT\G38_SR.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G39_SRF.OUT F:\GRNTCMP\PUBOUT\G39_SRF.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\G40_SWCM.OUT F:\GRNTCMP\PUBOUT\G40_SWCM.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F10_R.OUT F:\GRNTCMP\PUBOUT\F10_R.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F11_RF.OUT F:\GRNTCMP\PUBOUT\F11_RF.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F12_RAL.OUT F:\GRNTCMP\PUBOUT\F12_RAL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F13_ALL.OUT F:\GRNTCMP\PUBOUT\F13_ALL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F14_N.OUT F:\GRNTCMP\PUBOUT\F14_N.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F15_S.OUT F:\GRNTCMP\PUBOUT\F15_S.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\F16_SAL.OUT F:\GRNTCMP\PUBOUT\F16_SAL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\S10_R.OUT F:\GRNTCMP\PUBOUT\S10_R.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\S11_RWC.OUT F:\GRNTCMP\PUBOUT\S11_RWC.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\S12_ALL.OUT F:\GRNTCMP\PUBOUT\S12_ALL.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\D90_BADR.OUT F:\GRNTCMP\PUBOUT\D90_BADR.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\D91_MISU.OUT F:\GRNTCMP\PUBOUT\D91_MISU.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\D92_MISP.OUT F:\GRNTCMP\PUBOUT\D92_MISP.OUT >> F:\GRNTCMP\COMPARE.LOG
FC F:\GRNTCMP\OUT\D93_GRAM.OUT F:\GRNTCMP\PUBOUT\D93_GRAM.OUT >> F:\GRNTCMP\COMPARE.LOG

IF "%LGNTPWD%"=="" GOTO NOUSER
IF NOT EXIST \PUBLIC\DLYSTRT.EXE GOTO NODLY

COPY \PUBLIC\DLYSTRT.EXE C:\GRNTTMP > NUL
COPY F:\GRNTC.BAT C:\GRNTTMP\GRNTC.BAT > NUL
C:
CD \GRNTTMP
DLYSTRT /T:2 GRNTC.BAT
GOTO STARTED

:NOUSER
ECHO LGNTPWD is not set. User-context part skipped. >> F:\GRNTCMP\RUN.LOG
ECHO.
ECHO LGNTPWD ist nicht gesetzt. User-context part skipped.
ECHO Fuer User-Kontext zuerst setzen:
ECHO   SET LGNTPWD=dein-supervisor-passwort
GOTO SUMMARY

:NODLY
ECHO \PUBLIC\DLYSTRT.EXE not found. User-context part skipped. >> F:\GRNTCMP\RUN.LOG
ECHO.
ECHO \PUBLIC\DLYSTRT.EXE nicht gefunden. User-context part skipped.
GOTO SUMMARY

:STARTED
ECHO GRNTC queued via DLYSTRT. >> F:\GRNTCMP\RUN.LOG
ECHO.
ECHO GRNTC wurde via DLYSTRT gestartet.
ECHO Nach automatischem Re-Login wird GRNTSTA PART2 gestartet.
GOTO END

:SUMMARY
ECHO === SUMMARY === > F:\GRNTCMP\SUMMARY.TXT
ECHO GRNTSTA GRANT direct comparison finished. >> F:\GRNTCMP\SUMMARY.TXT
ECHO User-context part was skipped. >> F:\GRNTCMP\SUMMARY.TXT
ECHO Optional: GRNTZIP ausfuehren. >> F:\GRNTCMP\SUMMARY.TXT
ECHO GRNTSTA direct part finished.
ECHO Optional: GRNTZIP ausfuehren.
GOTO END

:PART2
F:
CD \
IF NOT EXIST GRNTCMP MD GRNTCMP
IF NOT EXIST GRNTCMP\UNOV MD GRNTCMP\UNOV
IF NOT EXIST GRNTCMP\UPUB MD GRNTCMP\UPUB
IF NOT EXIST GRNTCMP\USETUP MD GRNTCMP\USETUP

COPY C:\GRNTTMP\UNOV\*.OUT F:\GRNTCMP\UNOV > NUL
COPY C:\GRNTTMP\UPUB\*.OUT F:\GRNTCMP\UPUB > NUL
COPY C:\GRNTTMP\USETUP\*.OUT F:\GRNTCMP\USETUP > NUL
IF EXIST C:\GRNTTMP\HELPER.TXT COPY C:\GRNTTMP\HELPER.TXT F:\GRNTCMP\HELPER.TXT > NUL
IF EXIST C:\GRNTTMP\ULOG1.OUT COPY C:\GRNTTMP\ULOG1.OUT F:\GRNTCMP\ULOG1.OUT > NUL
IF EXIST C:\GRNTTMP\ULOGIN.OUT COPY C:\GRNTTMP\ULOGIN.OUT F:\GRNTCMP\ULOGIN.OUT > NUL
IF EXIST C:\GRNTTMP\ULOG2.OUT COPY C:\GRNTTMP\ULOG2.OUT F:\GRNTCMP\ULOG2.OUT > NUL
IF EXIST C:\GRNTTMP\ULGSUP.OUT COPY C:\GRNTTMP\ULGSUP.OUT F:\GRNTCMP\ULGSUP.OUT > NUL

ECHO === COMPARE NOPASSUSER NOVELL RIGHTS AGAINST PUBLIC RIGHTS === > F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G10_R.OUT F:\GRNTCMP\UPUB\G10_R.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G11_W.OUT F:\GRNTCMP\UPUB\G11_W.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G12_C.OUT F:\GRNTCMP\UPUB\G12_C.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G13_E.OUT F:\GRNTCMP\UPUB\G13_E.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G14_M.OUT F:\GRNTCMP\UPUB\G14_M.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G15_F.OUT F:\GRNTCMP\UPUB\G15_F.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G16_A.OUT F:\GRNTCMP\UPUB\G16_A.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G17_S.OUT F:\GRNTCMP\UPUB\G17_S.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G20_RF.OUT F:\GRNTCMP\UPUB\G20_RF.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G21_RW.OUT F:\GRNTCMP\UPUB\G21_RW.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G22_RWC.OUT F:\GRNTCMP\UPUB\G22_RWC.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G23_RWCE.OUT F:\GRNTCMP\UPUB\G23_RWCE.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G24_RAL.OUT F:\GRNTCMP\UPUB\G24_RAL.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G25_SAL.OUT F:\GRNTCMP\UPUB\G25_SAL.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G26_ALL.OUT F:\GRNTCMP\UPUB\G26_ALL.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G27_N.OUT F:\GRNTCMP\UPUB\G27_N.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G30_RE.OUT F:\GRNTCMP\UPUB\G30_RE.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G31_RWF.OUT F:\GRNTCMP\UPUB\G31_RWF.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G32_RCM.OUT F:\GRNTCMP\UPUB\G32_RCM.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G33_RFA.OUT F:\GRNTCMP\UPUB\G33_RFA.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G34_WCM.OUT F:\GRNTCMP\UPUB\G34_WCM.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G35_EMF.OUT F:\GRNTCMP\UPUB\G35_EMF.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G36_RMF.OUT F:\GRNTCMP\UPUB\G36_RMF.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G37_REMA.OUT F:\GRNTCMP\UPUB\G37_REMA.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G38_SR.OUT F:\GRNTCMP\UPUB\G38_SR.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G39_SRF.OUT F:\GRNTCMP\UPUB\G39_SRF.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\G40_SWCM.OUT F:\GRNTCMP\UPUB\G40_SWCM.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F10_R.OUT F:\GRNTCMP\UPUB\F10_R.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F11_RF.OUT F:\GRNTCMP\UPUB\F11_RF.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F12_RAL.OUT F:\GRNTCMP\UPUB\F12_RAL.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F13_ALL.OUT F:\GRNTCMP\UPUB\F13_ALL.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F14_N.OUT F:\GRNTCMP\UPUB\F14_N.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F15_S.OUT F:\GRNTCMP\UPUB\F15_S.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\F16_SAL.OUT F:\GRNTCMP\UPUB\F16_SAL.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\S10_R.OUT F:\GRNTCMP\UPUB\S10_R.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\S11_RWC.OUT F:\GRNTCMP\UPUB\S11_RWC.OUT >> F:\GRNTCMP\UCOMP.LOG
FC F:\GRNTCMP\UNOV\S12_ALL.OUT F:\GRNTCMP\UPUB\S12_ALL.OUT >> F:\GRNTCMP\UCOMP.LOG

ECHO === SUMMARY === > F:\GRNTCMP\SUMMARY.TXT
ECHO GRNTSTA GRANT comparison finished. >> F:\GRNTCMP\SUMMARY.TXT
ECHO. >> F:\GRNTCMP\SUMMARY.TXT
ECHO Direct mode: OUT vs PUBOUT compares GRANT output. >> F:\GRNTCMP\SUMMARY.TXT
ECHO User mode: UNOV vs UPUB compares effective RIGHTS as NOPASSUSER. >> F:\GRNTCMP\SUMMARY.TXT
ECHO. >> F:\GRNTCMP\SUMMARY.TXT
ECHO Optional: GRNTZIP ausfuehren. >> F:\GRNTCMP\SUMMARY.TXT

ECHO GRNTSTA PART2 fertig.
ECHO Optional: GRNTZIP ausfuehren.
GOTO END

:END
