14 October 2009
Logon Script To Attach To A Server Based On IP Address
Logon Script To Attach To A Server Based On IP Address
Info on both Kix and batch file commands to do things based on the IP address of the client.
Examples in case they get lost.
Kix:-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Establishes $location variable, determined by subnet
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:IPCHECK
$address = @IPADDRESS0
$subnet = SubStr($address,9,3)
$subnet1 = SubStr($address,13,3)
Select
Case $subnet = "xxx" And $subnet1 >= "xxx" And $subnet1 <= "xxx"
$location = servername-1
"net use d: \\" & $location &"\" & @username &" /persistent"
Case (($subnet = "xxx" And $subnet1 >= "xxx" And $subnet1 <= "xxx") $location = servername2
"net use d: \\" & $location &"\" & @username & " /persistent"
EndSelect
or something to that effect...
Normal batch commands:-
Thanks to bphilhower for the kix version and Witto for the batch commands.
Info on both Kix and batch file commands to do things based on the IP address of the client.
Examples in case they get lost.
Kix:-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Establishes $location variable, determined by subnet
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:IPCHECK
$address = @IPADDRESS0
$subnet = SubStr($address,9,3)
$subnet1 = SubStr($address,13,3)
Select
Case $subnet = "xxx" And $subnet1 >= "xxx" And $subnet1 <= "xxx"
$location = servername-1
"net use d: \\" & $location &"\" & @username &" /persistent"
Case (($subnet = "xxx" And $subnet1 >= "xxx" And $subnet1 <= "xxx") $location = servername2
"net use d: \\" & $location &"\" & @username & " /persistent"
EndSelect
or something to that effect...
Normal batch commands:-
@ECHO OFFOriginal page is on http://www.adminscripteditor.com in the forums.
IF EXIST Z: NET USE Z: /DELETE > NUL
IPCONFIG | FIND "10.76.128." > NUL
IF ERRORLEVEL 1 GOTO NotInNet1
NET USE Z: \\server1\%username% > NUL
:NotInNet1
IPCONFIG | FIND "10.76.129." > NUL
IF ERRORLEVEL 1 GOTO NotInNet2
NET USE Z: \\server2\%username% > NUL
:NotInNet2
Thanks to bphilhower for the kix version and Witto for the batch commands.
25 September 2009
Cybersecurity: It's our problem | IT Security | TechRepublic.com
Cybersecurity: It's our problem | IT Security | TechRepublic.com: "Cybersecurity: It's our problem"
An interesting idea on what future options exist for cyber law enforcement.
An interesting idea on what future options exist for cyber law enforcement.
02 September 2009
How to reduce spam: Writing Rules for SpamAssassin to Avoid Spam, a Primer
How to reduce spam: Writing Rules for SpamAssassin to Avoid Spam, a Primer: "A Guide to Writing your own Add-On Rules for SpamAssassin"
This is a very good introduction to writing rules for SpamAssassin. Especially simple ones to target short term SPAM patterns that may not spread to other geographic areas, or other businesses.
This is a very good introduction to writing rules for SpamAssassin. Especially simple ones to target short term SPAM patterns that may not spread to other geographic areas, or other businesses.
14 August 2009
A computer geek's guide to building a 64-bit server on a budget | Microsoft Windows | TechRepublic.com
A computer geek's guide to building a 64-bit server on a budget | Microsoft Windows | TechRepublic.com: "A computer geek's guide to building a 64-bit server on a budget"
A TechRepublic article I want to get back to when I have the time to read it properly.
A TechRepublic article I want to get back to when I have the time to read it properly.
12 August 2009
www.centos.org - Forums - CentOS 5 - General Support - yum update three systems with only one download?
www.centos.org - Forums - CentOS 5 - General Support - yum update three systems with only one download?:
"rsync --archive /var/cache/yum/ machine2:/var/cache/yum/"
Here's a simple way to use rsync to update the yum cache of machines from that of a previously updated machine prior to running yum update on the machine.
This can save up to a gig or more of download across 4 or more machines.
"rsync --archive /var/cache/yum/ machine2:/var/cache/yum/"
Here's a simple way to use rsync to update the yum cache of machines from that of a previously updated machine prior to running yum update on the machine.
This can save up to a gig or more of download across 4 or more machines.
05 August 2009
Windows Xp Registry Tips & Tweaks - www.hiren.info
Windows Xp Registry Tips & Tweaks - www.hiren.info: "Windows Xp Registry Tips & Tweaks"
This page has some interesting registry hacks for XP. (and possibly 2003/8 server?)
The "Command Prompt Here" tweak is something every command prompt user needs.
This page has some interesting registry hacks for XP. (and possibly 2003/8 server?)
The "Command Prompt Here" tweak is something every command prompt user needs.
Red Hat Magazine | A guide to GNUÂ Screen
Red Hat Magazine | A guide to GNU Screen: "A guide to GNU Screen"
A good article from the boys at Red Hat on the many uses of the screen command.
The shared screen session for teaching other people is something I didn't know about, but I'm likely to use.
A good article from the boys at Red Hat on the many uses of the screen command.
The shared screen session for teaching other people is something I didn't know about, but I'm likely to use.
23 July 2009
Performanceoptimizer malware hits www.defsounds.com - Spyware Sucks
Performanceoptimizer malware hits www.defsounds.com - Spyware Sucks: "Spyware Sucks"
Not the most recent entry in this Blog, but click on the "Home" link on the left to get to the latest.
How does malware get on your computer? This site can tell you not only how, but where, when, and who was involved in making it happen.
A most interesting and commendable pastime this Person has chosen.
Not the most recent entry in this Blog, but click on the "Home" link on the left to get to the latest.
How does malware get on your computer? This site can tell you not only how, but where, when, and who was involved in making it happen.
A most interesting and commendable pastime this Person has chosen.