Re: [Samba] limiting netlogon scripts to a subnet?-will this work?

2005-07-04 Thread Robert Schetterer

John H. schrieb:


Would this work?  The problem is, I do not have
roaming profiles in use(As it is not practical for us,
as users tend to use the same computers).  I want only
users with IP from 192.168.1.x to load the databases.

The loaddatabases.cmd file in question would contain

rem Grab IP address and dump to a file
ipconfig %userprofile%\ipconfig.txt
echo Checking for your location

findstr 192.168.1 %userprofile%\ipconfig.txt
if errorlevel 1 goto notLoading
echo Loading Databases 
rd /S /Q C:\Access\Databases
xcopy /C /Y /K /F /Z /Q /E /H Q:\Access\FrontEnds
C:\Access\Databases\
goto end

:notLoading
echo Not loading Databases
goto :end

:end

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 


hi,
time ago i wrote a netlogon script
that checks the ip of the inloging client
to match a vpn net and do not install printers drivers , this was for
win 2000 german version, it isnt what you looking for but may help to 
setup equal

jobs

@echo off
REM we look if the login is from vpn range

ipconfig |FIND IP |FIND .  %temp%.\$
for /F tokens=2 delims=: %%I in (%temp%.\$) do set IP=%%I
del %temp%.\$
set IP=%IP:~1%
echo IP=%IP%

REM 10.10.3.0 is a login via vpn pptpd net ip

Set | Find IP=10.10.3.  NUL
If ErrorLevel 1 GoTo Check
GoTo End

REM now we will see if the loging machine matches our office, cause we 
have different printer autoinstalls for different offices, which are 
reflected by the clients name


:Check
Echo COMPUTERNAME=%COMPUTERNAME%

Set | Find COMPUTERNAME=LAPRD  NUL

If ErrorLevel 1 GoTo Next
GoTo FOUND


:Next
Echo COMPUTERNAME=%COMPUTERNAME%

Set | Find COMPUTERNAME=WSRD  NUL

If ErrorLevel 1 GoTo Next2
GoTo FOUND

:Next2
REM Echo match not found
REM pause
GoTo End

:FOUND
REM Ok the logged in machine belongs to our office, check if the user 
belongs to our office

ifmember /v /l DOMAINAME\rdusers
REM ok the machine matches our office , the user matches our office lets 
give him the printers

if errorlevel 1 call rdprinstall.bat


GoTo End

:End

Best Regards
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] limiting netlogon scripts to a subnet?

2005-07-02 Thread Ilia Chipitsine

I have a vpn running, and the netlogon scripts go very
slow on the other side of it.

Can I limit scripts to 192.168.1.x?


You can customize logon scripts on per-user (ldapsam and tdbsam backends) 
and on per-computer basis:


if %COMPUTERNAME% == PO-9 goto label1
if %COMPUTERNAME% == TERMINAL goto label2


:label1



:label2




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] limiting netlogon scripts to a subnet?

2005-07-02 Thread John H.
your response was blank.

--- Ilia Chipitsine [EMAIL PROTECTED] wrote:

 




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] limiting netlogon scripts to a subnet?-will this work?

2005-07-02 Thread John H.
Would this work?  The problem is, I do not have
roaming profiles in use(As it is not practical for us,
as users tend to use the same computers).  I want only
users with IP from 192.168.1.x to load the databases.

The loaddatabases.cmd file in question would contain

rem Grab IP address and dump to a file
ipconfig %userprofile%\ipconfig.txt
echo Checking for your location

findstr 192.168.1 %userprofile%\ipconfig.txt
if errorlevel 1 goto notLoading
echo Loading Databases 
rd /S /Q C:\Access\Databases
xcopy /C /Y /K /F /Z /Q /E /H Q:\Access\FrontEnds
C:\Access\Databases\
goto end

:notLoading
echo Not loading Databases
goto :end

:end

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba