posted this in Active Directory, Scripts on October 30th, 2010 Scripts to manage Active Directory Users
Appending a Multi-Valued Attribute Appending a Phone Number Adding a Route to the Dial-In Properties of a User Account Adding a User to Two Security Groups Appending Address Page Information for a User Account Appending a Home Phone Number to a User Account Assigning a Published Certificate to a . . . → Read More: useful active directory scripts
posted this in Linux, O/S on October 30th, 2010 Useful Linux Commands (Red Hat)
(http://www.cse.buffalo.edu/~eisner/DLW) Revised 3/1/2000
Getting information man commandname display the manual page for a particular command named commandname man -S sectionnumber commandname display the manual page under a specific section numbered sectionnumber for the command named commandname. Sometimes the same command will exist in more than one section. man alone will . . . → Read More: Red Hat Linux cheat sheet commands examples RHEL
posted this in Windows on October 1st, 2010 Need to print a windows directory?
Here’s how: 1. Open up notepad 2. paste this text in
|
|
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\printdir] @="Print Directory" [HKEY_CLASSES_ROOT\Directory\shell\printdir\command] @=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,70,00,72,00,69,\ 00,6e,00,74,00,64,00,69,00,72,00,2e,00,62,00,61,00,74,00,20,00,22,00,25,00,\ 31,00,22,00,00,00 |
3. Save file as printdir.reg 4. Open up a new notepad window 5. paste this in:
|
|
@echo off dir %1 /-p /o:gn /S > "%temp%\Listing" start /w notepad "%temp%\Listing" del "%temp%\Listing" exit |
If you prefer to sort by file size use this instead:
|
|
@echo off dir %1 /-p /o:-s /S > "%temp%\Listing" start /w notepad "%temp%\Listing" del "%temp%\Listing" exit |
6. save file as printdir.bat 7. copy printdir.bat . . . → Read More: How to Print a Windows Directory
posted this in MSSQL, Software, Windows on September 30th, 2010 How to resolve this error:
|
|
[Mercury][SQLServer JDBC Driver][SQLServer]SELECT permission denied on object 'USERS', database 'qcsiteadmin_db', owner 'dbo'.; Stack Trace: java.sql.SQLException: [Mercury][SQLServer JDBC Driver][SQLServer]SELECT permission denied on object 'USERS', database 'qcsiteadmin_db', owner 'dbo'. at com.mercury.jdbc.base.BaseExceptions.createException(Unknown Source) at com.mercury.jdbc.base.BaseExceptions.getException(Unknown Source) |
The reason this error is occurring is because user td does not have rights to the tables in your qc admin table. This table is sometimes labeled ‘MercuryQC_SA_DB’.
Depending on your database you may need to replace the name right after “Use”:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
use MercuryQC_SA_DB GRANT ALL ON td.LOGIN_SESSIONS to td GRANT ALL ON td.PARAMS to td GRANT ALL ON td.PROJECT_SESSIONS to td GRANT ALL ON td.PROJECTS to td GRANT ALL ON td.SEQUENCES to td GRANT ALL ON td.SESSION_LICENSE to td GRANT ALL ON td.SESSIONS_HISTORY to td GRANT ALL ON td.SESSION_LICENSE_HISTORY to td GRANT ALL ON td.APPSERVERS to td GRANT ALL ON td.USERS to td GRANT ALL ON td.CACHE to td GRANT ALL ON td.USERS_PROJECTS to td GRANT ALL ON td.USERS_PROJECTS_TEMP to td GRANT ALL ON td.MESSAGES to td GRANT ALL ON td.GROUPS to td GRANT ALL ON td.REPOSITORY to td GRANT ALL ON td.ROLES to td GRANT ALL ON td.USERS_GROUPS to td GRANT ALL ON td.USERS_ROLES to td GRANT ALL ON td.CLUSTERED_RESOURCE to td GRANT ALL ON td.ADMIN to td GRANT ALL ON td.AUDIT_LOG to td GRANT ALL ON td.AUDIT_PROPERTIES to td GRANT ALL ON td.DBSERVERS to td GRANT ALL ON td.DOMAINS to td GRANT ALL ON td.LOCKS to td GO |
And How did we get all . . . → Read More: SELECT permission denied on object ‘USERS’, database ‘qcsiteadmin_db’, owner ‘dbo’
posted this in Mac, Software, Windows on September 23rd, 2010 Howto: Compare two files using freeware or open source
Diffmerge is my favorite program (open source at least) that I use to compare files.
From their website:
DiffMerge is an application to visually compare and merge files for Windows, Mac OS X and Linux.
DiffMerge in Vault
DiffMerge was developed as the internal compare/merge tool . . . → Read More: compare two files freeware
posted this in Defense, Scripts, Security, Windows on September 20th, 2010 List local/remote socket and PID for all TCP connections in “Established” state:
|
|
netstat -ano | find /i "established" |
List local/remote socket for all TCP connections in “Established” state (sometimes you get more than above):
|
|
netstat -an | find /i "established" |
List connections over time (netstat_check_connections.bat):
|
|
@echo off for /L %%X in (1,1,4) do (netstat -b >> C:\connections.txt)&(PING 127.0.0.1 -n 1 -w %5 2>NUL | FIND "TTL=" >NUL) |
For other great command line kung foo check out synjunkie
posted this in Scripts, Windows on September 20th, 2010 I cam across two amazing article the other day detailing how to do some great stuff from the windows command line.
synjunkie knows his shit:
Command-Line-Ninjitsu Command-Line Kung Fu
I stumbled upon it because I was about to format a server but wanted to retain this information:
All local groups/users and their respective permissions for . . . → Read More: Howto: Back up Server 2003 Users Groups Shares Permissions Program Names Network Settings
posted this in Jenkins-Hudson, Software, Windows on August 16th, 2010 I am assuming you have installed hudson as a service in windows and that hudson lives in C:\hudson
Use a tool called Portecle to import your valid cert and export it as a java keystore file (.jks). Remember to use THE SAME PASSWORD FOR ALL PROMPTS IN THAT PROGRAM (or you will run in to . . . → Read More: Howto: Make Hudson HTTPS (Windows)
posted this in Active Directory on July 23rd, 2010 from command prompt run this:
|
|
sync time domain controller |
posted this in IIS, Software, Windows on July 14th, 2010 First you need to install the IIS 6.0 Migration Tool
|
|
For each Web site and virtual directory on the source server, you must create a corresponding Web site and virtual directory on the target server. Later in the migration process, you will copy the content into these Web sites and virtual directories. Create the Web sites and virtual directories by completing the following steps: 1. Create the Web sites and home directories on the target server. 2. Create the virtual directories. |
Now let’s create a .bat file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
cd .. cd .. cd \ cd .. c: cd "Program Files (x86)" cd "IIS Resources" cd "IIS 6.0 Migration Tool" iismt.exe server-name w3svc/1 /serverbindings 127.0.0.1:80:dev-site2.example.com /siteid 1 /configonly iismt.exe server-name w3svc/2 /serverbindings 127.0.0.1:80:qa-site2.example.com /siteid 2 /configonly iismt.exe server-name w3svc/3 /serverbindings 127.0.0.1:80:stage-site2.example.com /siteid 3 /configonly iismt.exe server-name w3svc/4 /serverbindings 127.0.0.1:80:site2.example.com /siteid 4 /configonly iismt.exe server-name w3svc/5 /serverbindings 127.0.0.1:80:loadtest2.example.com /siteid 5 /configonly cd .. cd .. cd \ cd usr cd netsite-docs Adsutil2.vbs append w3svc/1/serverbindings "127.0.0.1:80:dev-site.example.com" Adsutil2.vbs append w3svc/2/serverbindings "127.0.0.1:80:qa-site.example.com" Adsutil2.vbs append w3svc/3/serverbindings "127.0.0.1:80:stage-site.example.com" Adsutil2.vbs append w3svc/4/serverbindings "127.0.0.1:80:site.example.com" Adsutil2.vbs append w3svc/5/serverbindings "127.0.0.1:80:loadtest.example.com" Adsutil2.vbs append w3svc/1/serverbindings "127.0.0.1:80:dev-site.preview.example.com" Adsutil2.vbs append w3svc/2/serverbindings "127.0.0.1:80:qa-site.preview.example.com" Adsutil2.vbs append w3svc/3/serverbindings "127.0.0.1:80:stage-site.preview.example.com" Adsutil2.vbs append w3svc/4/serverbindings "127.0.0.1:80:site.preview.example.com" Adsutil2.vbs append w3svc/5/serverbindings "127.0.0.1:80:loadtest.preview.example.com" Adsutil2.vbs append w3svc/4/serverbindings "127.0.0.1:80:site.asp.example.com" Adsutil2.vbs append w3svc/5/serverbindings "127.0.0.1:80:cms.preview.example.com" pause |
You will need to replace 127.0.0.1 with the ip of the server you want to copy the config settings to. The second part using adsutil2.vbs is used to add addtional host headers to site names
. . . → Read More: Howto: Migrate IIS Sites to Another Server
|
|