Does anyone know how to use ifmember.exe with NT4? I downloaded it from the Microsoft website. Do I just need to install the program on server or can I place the executable in the import\scripts directory?
You place it in the scripts/import folder and in your login script you have defined local or global groups, then if the are a member then they will have access to those shares, IFMEMBER of the the group you have permission to go there.
I suggested this to "Sunnybyfleet" " NT Logon Scripts and Groups: Give it a try
Remember that IFMEMBER needs to be in the same directory as the scripts
Example Login Script
@echo off
set DUMPFILE=c:\mtplogon.dmp
set GLOBALDRIVE=p:
set GLOBALSHARE=\\sys\directory1
set group1=Accounts
if %OS% == Windows_NT goto winnt >nul
:win
echo Syntax Error is expected if running Windows 3.11, 95 or 98
cls
echo.
echo Welcome to the My Domain. Please wait while your logon is processed...
echo.
echo Removing Previously Used Connections
echo.
if exist x: net use x: /delete >nul
if exist y: net use y: /delete >nul
if exist z: net use z: /delete >nul
echo.
echo Now Adding Network Drives
echo.
if not exist x: net use x: \\sysx\directory2
if not exist y: net use y: \\sysx\forms
if not exist z: net use z: \\sysx\home$
echo.
echo Setting Time with PDC
echo.
echo y | net time \\sysz /SET /Y
echo.
rem Special fix for Windows logon script end bugs
if exist c:\windows\*.* echo . >c:\windows\lmscript.$$$
if exist c:\win95\*.* echo . >c:\windows\lmscript.$$$
rem End of Logon Script
echo --- LOGON SCRIPT END $Revision: 2 $ ---
if not "%DUMPFILE%"=="" net use >%DUMPFILE%
if not "%DUMPFILE%"=="" set >>%DUMPFILE%
goto end
:winnt
echo.
echo Welcome to the MyDomain. Please wait while your logon is processed...
echo.
ifmember QuitLogon
if not errorlevel 1 goto NOGROUPS1
exit
:NOGROUPS1
echo.
echo Removing Previously Used Connections
echo.
if exist x: net use x: /delete >nul
if exist y: net use y: /delete >nul
if exist z: net use z: /delete >nul
echo.
echo Now Adding Network Drives
echo.
if not exist x: net use x: \\sysx\directory2 /persistent:no
if not exist y: net use y: \\sysx\forms /persistent:no
if not exist z: net use z: \\sysx\%username%$ /persistent:no
echo.
rem MAPPING Accounts USERS TO GLOBAL DRIVE
rem WIN9X CLIENTS HAVE TO PASS ON THIS SECTION
if "%GLOBALDRIVE%"=="" goto NOGROUPS
if exist %GLOBALDRIVE%*.* net use %GLOBALDRIVE% /delete
ifmember %GROUP1%
if not errorlevel 1 goto NOGROUPS
echo --- Mapping %GLOBALDRIVE% to %GLOBALSHARE%
net use %GLOBALDRIVE% %GLOBALSHARE% /persistent:no
:NOGROUPS
echo.
echo
set GLOBALDRIVE2=l:
set GLOBALSHARE2=\\sysy\dir3
set group2=Data
echo ....Mapping APL
if "%GLOBALDRIVE2%"=="" goto NOGROUPS2
if exist %GLOBALDRIVE2%*.* net use %GLOBALDRIVE2% /delete
ifmember %GROUP2%
if not errorlevel 1 goto NOGROUPS2
echo --- Mapping %GLOBALDRIVE2% to %GLOBALSHARE2%
net use %GLOBALDRIVE2% %GLOBALSHARE2% /persistent:no
:NOGOURPS2
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.