Batch, Bezpečnost, Skriptování

Automount TrueCrypt Volume using Batch

Script prompt for password and automatically mount encrypted file into free drive letter volume. By default truecrypt.exe is stored in %FlashDiskDrive%:\truecrypt\truecrypt.exe and encrypted file is on root.

echo off
 
set TrueCryptPath=\truecrypt\truecrypt.exe
set TrueCryptFile=\vault01.tc
 
for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
cd %%a: 1>> nul 2>&1
if errorlevel 1 (
set FreeDrive=%%a:
 )
)
 
Set Dir=%cd:~0%
Set Drive=%Dir:~0,2%
 
%Drive%%TrueCryptPath% /q /a /l%FreeDrive% /v %Drive%%TrueCryptFile%

Bezpečnost

PGP

HELP
gpg --help

Generování párů klíčů
gpg --gen-key

Export veřejného klíče
gpg --armor --export email@email.cz > mykey.asc

Export privátního klíče
gpg --export-secret-keys --armor email@email.cz > mykey.asc

Importování klíče
gpg --import key.asc

Mazání klíče
gpg --delte-keys ID_klice
ftp://ftp.gnupg.org/gcrypt/binary/gnupg-w32cli-1.4.10b.exe
http://www.softpedia.com/get/Security/Encrypting/GPGee.shtml
http://cs.wikipedia.org/wiki/Pretty_Good_Privacy

Windows

Windows Server 2003 LDAP administration limits

Change MaxPageSize value to 3000 (default 1000)
C:\Temp\x>type change.txt
dn: CN=Extended Timeout,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=X
changetype: add
instanceType: 4
lDAPAdminLimits: MaxPageSize=3000
objectClass: queryPolicy

C:\Temp\x>ldifde -i -f change.txt -v -c DC=X "DC=domena,DC=cz"
Connecting to "server1.domena.cz"
Logging in as current user using SSPI
Importing directory from file "change.txt"
Loading entries
1: CN=Extended Timeout,CN=Query-Policies,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=domena,DC=cz
 
Entry modified successfully.
 
 
1 entry modified successfully.
 
The command has completed successfully

http://support.microsoft.com/default.aspx?scid=kb;en-us;315071&sd=tech