Thursday, June 30, 2011

INSTALLATION OF Oracle Directory Server Enterprise Edition (11.1.1.5.0)

INSTALLATION OF Oracle Directory Server Enterprise Edition (11.1.1.5.0)

Check prerequesites post below before this.
http://tummypain.blogspot.com/2011/06/pre-requesites-for-oracle-directory.html

(1) Download Oracle Directory Server Enterprise Edition (11.1.1.5.0) from the below
this is also called DSEE 7 or 11g.

http://www.oracle.com/technetwork/middleware/downloads/oid-11g-161194.html

(2) I installed a W2k8 x86 Standard Server on a VM.

(3) I installed GlassFish 3.1 and JDK6. Check Pre-requesites.

(4) unzip ofm_odsee_win_11.1.1.5.0.zip

(5) idsktune -> is a Server precheck/tuning application. It only checks and recomends. IT does not modify any thing. I had couple of errors about unsupported OS, but may be because I am using msdn build.

(6) Install the VC++ redistributable that is included if not already installed on the server. Update with required windows patches and restart if necessary.

(7) unzip dsee7 and move all the folders to c:\Sun\

(8) Modify registry as below if you are not using a LocalAdmin user
HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\EnableInstallerDetection
HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System\\EnableLUA

(9) Follow the steps below in Command prompt with Admin privileges
**********************
C:\Windows\system32>cd C:\Sun\dsee7\bin

C:\Sun\dsee7\bin>dsccsetup war-file-create
DSCC registry must be created first using the following command:
        dsccsetup ads-create
(REMEMBER THE PASSWORD BELOW)
C:\Sun\dsee7\bin>dsccsetup ads-create
Choose password for Directory Service Manager: xxxxx
Confirm password for Directory Service Manager: xxxxx
Creating DSCC registry...
DSCC Registry has been created successfully

C:\Sun\dsee7\bin>dsccsetup war-file-create
Created C:\Sun\dsee7\var\dscc7.war

C:\Sun\dsee7\bin>dsccsetup cacao-reg
Configuring Cacao...
Cacao will listen on port 21162
Cacao has been successfully configured.
Registering DSCC Agent in Cacao...
Checking Cacao status...
Starting Cacao...
DSCC agent has been successfully registered in Cacao.

C:\Sun\dsee7\bin>

**********************

(10) Append the below lines in glassfish server.policy file

C:\glassfish3\glassfish\domains\domain1\config\server.policy
//**********************
// Permissions for Directory Service Control Center
grant codeBase "file:${com.sun.aas.instanceRoot}/applications/j2ee-modules/dscc7/-"
{
        permission java.security.AllPermission;
};
//**********************


(11) Browse to glassfish console
http://localhost:4848/common/index.jsf

Go to Applications -> Deploy -> "Local Packaged File or Directory That Is Accessible from GlassFish Server" -> Browse -> C:\Sun\dsee7\var\dscc7.war -> click OK.

(12) Select dscc7 -> Enable -> Launch to start Directory Service Control Center

http://localhost:8080/dscc7/dcc7Module/DCC

(14) If you are unable to login then try the below

**********************
C:\>
C:\>C:/Sun/dsee7/bin/dsccsetup.exe status
***
DSCC Agent is registered in Cacao
Cacao is down. Start it using:
        C:/Sun/dsee7/ext/cacao_2/bin/cacaoadm.bat start
Cacao uses a custom port number (21162)
***
DSCC Registry has been created
Path of DSCC registry is C:/Sun/dsee7/var/dcc/ads
Port of DSCC registry is 3998
DSCC registry is not running. You may start it using:
         C:/Sun/dsee7/bin/dsadm.exe start C:/Sun/dsee7/var/dcc/ads
***

C:\>C:/Sun/dsee7/bin/dsadm.exe start C:/Sun/dsee7/var/dcc/ads
Directory Server instance 'C:/Sun/dsee7/var/dcc/ads' started: pid=3448

C:\>

**********************

Pre-requesites for Oracle Directory Server Enterprise Edition 11g (11.1.1.5.0) or DSEE version 7

Pre-requesites for ODSEE 11g

I am trying to install Siteminder r12SP3 on a VM. Before that I need to get Oracle Directory Server Enterprise Edition 11g.

Below are the pre-req for ODSEE

a- A Windows 2008 Server x86 Standard Version. Production needs 4GB of RAM, but my for test I used 1.5GB. I am performing all installs using an ID with Local Admin permissions on the server. Make sure the server is fully updated with latest patches.

b- JDK 6. install jdk6 from the below link
http://www.oracle.com/technetwork/java/javase/downloads/index.html

c- Download and install an application server like glassfish, tomcat etc. I installed Glassfish. Pretty straight forward installation.
http://glassfish.java.net/downloads/3.1-final.html

d- Once glassfish is installed, start the application Server if not automatically started. It should be present in the Start-> Programs->Glassfish-> StartServer.
Or it can be started using the below in cmd prompt
"C:\glassfish3\glassfish\bin\asadmin.bat start-domain domain1"

e- Access GlassFish Console using the below link, make sure everything is working.
http://localhost:4848/common/index.jsf
**********************

Friday, June 24, 2011

Script to Search list of Servers with Local Administrator Privileges

I had a need for checking all servers in a list to which my AD Group has access. The list was around 3000 Windows servers and there is no way I could do it manually. So I did a Google search and found a nice script written by Brian Desmond at this link which shows all the users who are added as Local Administrators.

_briandesmond.com/blog/script-to-collect-local-administrators-membership-from-list-of-machines/

Thanks Brian.
--

I did a small modification so that it just prints out the names of the servers to which my AD group has access and also print out server names which I am unable to ping. The script is pretty raw and takes lot of time to check each server, but this is the only one I have for now.

->Save the below script as localadminFile.vbs
->create localadminfiles.bat with the below line
wscript localadminFile.vbs
-> place localadminfiles.bat in scheduler and let it run. Keep checking for the completed.
-> also you will find 'wscript' in taskmanager if you want to kill of the running script.

Modify it according to your need.

**************************
Option Explicit
Const LogFile = "G:\temp\LogFile.log"
Const resultFile = "G:\temp\LocalAdmin.csv"
Const inputFile = "G:\temp\serverList.txt"
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim shl
Set shl = WScript.CreateObject("WScript.Shell")
Dim fil
Set fil = fso.OpenTextFile(inputFile)
Dim results
Set results = fso.CreateTextFile(resultFile, True)
WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
'On Error Resume Next
Dim grp
Dim line
Dim exec
Dim pingResults
Dim member
While Not fil.AtEndOfStream
line = fil.ReadLine

Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
  pingResults = LCase(exec.StdOut.ReadAll)
If InStr(pingResults, "reply from") Then
'WriteToLog line & " responded to ping"
On Error Resume Next
Set grp = GetObject("WinNT://" & line & "/Administrators")
'results.WriteLine line & ",Administrators,"
For Each member In grp.Members
If member.name = "AdminGroup AD" Then
WriteToLog line & "--> Server is supported by Team"
results.WriteLine ",," & member.Name
End If
Next
Else
WriteToLog line & "did not respond to ping"
End If
Wend
WriteToLog line & "-->Script END - COMPLETED.."
results.Close

Sub WriteToLog(LogData)
On Error Resume Next
       Dim fil
'8 = ForAppending
Set fil = fso.OpenTextFile(LogFile, 8, True)
fil.WriteLine(LogData)
fil.Close
Set fil = Nothing
End Sub
**************************