Passed Certified Ethical Hacker Practical Certification :Some tips to exam takers !

0 comments
Dear All ,

I feel immense pleasure that I have cleared the CEH Practical exam . Here are some tips for the exam takers to help them with their preparation . 

  1. What is the CEH Practical Exam format ? = >  Refer to this link : https://www.eccouncil.org/programs/certified-ethical-hacker-ceh-practical/
  2. How tough is this exam ? How can I prepare for it ? => Exam is tough if you don't have any experience with Cyber Security Field .  I would suggest to purchase iLabs Cyber Range from EC Council to practice the CEH Labs in simulated environment (Although I do NOT Endorse any course here - Its just a personal experience) 
  3. I cant purchase CEH iLabs Simulated training - Its too costly - How can I prepare ? => I read few of the blogs - many people suggested various resources such as Hack the Box , Vuln Hub , DVWA etc , Doing Labs of CEH may also help 

NOTE : Do NOT take this exam very casually like you might have did with CEH (Theory) .. It needs preparation of at least 10-20 Days from various authentic resources .  Depending on the candidate previous exposure to various technologies and skill sets it may increase . 

VMWare Converter V2V migration : Permission to perform this operation was denied

0 comments


It is very common error while performing V2V migration of live Windows server 2012 machine from KVM ,

The fix to this is as follows :

Workaround for Permission to perform this operation was denied

  1. Log into the server you’re trying to convert to a virtual machine.
  2. Open Local Security Policy (open run dialog and type secpol.msc).
  3. Go to: Local Policies > Security Options.
  4. Change “User Access Control: Run all Administrators in Admin Approval Mode” from Enabled to Disabled.

    1. Restart the server to make the changes take effect.
    2. You should now be able perform the P2V without issue.
    After making the above change we was able to successfully P2V the server without any further issues:
  5. Once you confirm the P2V is successful I would recommend changing User Access Control: Run all Administrators in Admin Approval Mode back to Enabled from Disabled.

Automated health checks of Domain controllers using powershell script with reports

0 comments
We all face many errors related to replication of multiple windows servers placed at different geographic locations  , the solution is to take pre-emptive measures is to put a automated script which will keep running health checks on all our domain controllers on regular basis to keep emailing us the graphical report so that we will know errors if any and we could be able to rectify it so long before disaster happens ! ;)
after some googling we found out very brilliant powershell script [I will post link with due credits to blog once i found who the original author is ] we modified it according to our needs .

An automated PowerShell script [ ADHealthCheck.ps1] was been created / customized by me and added to windows task scheduler to run all DC health checks periodically and to send a status report over mail as attachment on Monday and Friday at 10 am to sysadmin@example.com 

Its information set in Windows Task Scheduler is as follows :

ADHealthCheck  run at 9.55 AM every Monday , Friday of Every Week 

sendEmail          will run at 10.00 AM every Monday , Friday of Every Week .

script was as follows :


#############################################################################
#   
#   
#       Date:
#       Satus: Ping,Netlogon,NTDS,DNS,DCdiag Test(Replication,sysvol,Services)
#       Update: Added Advertising
#       Description: AD Health Status
#############################################################################
###########################Define Variables##################################

$reportpath = ".\ADReport.htm"

if((test-path $reportpath) -like $false)
{
new-item $reportpath -type file
}
$smtphost = "smtp.example.com"
$from = "sysadmin@example.com"
$email1 = "user@example.com"
$timeout = "60"

###############################HTml Report Content############################
$report = $reportpath

Clear-Content $report
Add-Content $report "<html>"
Add-Content $report "<head>"
Add-Content $report "<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>"
Add-Content $report '<title>AD Status Report for XYZ Domain </title>'
add-content $report '<STYLE TYPE="text/css">'
add-content $report  "<!--"
add-content $report  "td {"
add-content $report  "font-family: Tahoma;"
add-content $report  "font-size: 11px;"
add-content $report  "border-top: 1px solid #999999;"
add-content $report  "border-right: 1px solid #999999;"
add-content $report  "border-bottom: 1px solid #999999;"
add-content $report  "border-left: 1px solid #999999;"
add-content $report  "padding-top: 0px;"
add-content $report  "padding-right: 0px;"
add-content $report  "padding-bottom: 0px;"
add-content $report  "padding-left: 0px;"
add-content $report  "}"
add-content $report  "body {"
add-content $report  "margin-left: 5px;"
add-content $report  "margin-top: 5px;"
add-content $report  "margin-right: 0px;"
add-content $report  "margin-bottom: 10px;"
add-content $report  ""
add-content $report  "table {"
add-content $report  "border: thin solid #000000;"
add-content $report  "}"
add-content $report  "-->"
add-content $report  "</style>"
Add-Content $report "</head>"
Add-Content $report "<body>"
add-content $report  "<table width='100%'>"
add-content $report  "<tr bgcolor='Lavender'>"
add-content $report  "<td colspan='7' height='25' align='center'>"
add-content $report  "<font face='tahoma' color='#003399' size='4'><strong>Active Directory Health Check for CDACMUMBAI Domain by ITSS </strong></font>"
add-content $report  "</td>"
add-content $report  "</tr>"
add-content $report  "</table>"

add-content $report  "<table width='100%'>"
Add-Content $report  "<tr bgcolor='IndianRed'>"
Add-Content $report  "<td width='5%' align='center'><B>Identity</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>PingSTatus</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>NetlogonService</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>NTDSService</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>DNSServiceStatus</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>NetlogonsTest</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>ReplicationTest</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>ServicesTest</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>AdvertisingTest</B></td>"
Add-Content $report  "<td width='10%' align='center'><B>FSMOCheckTest</B></td>"

Add-Content $report "</tr>"

#####################################Get ALL DC Servers#################################
$getForest = [system.directoryservices.activedirectory.Forest]::GetCurrentForest()

$DCServers = $getForest.domains | ForEach-Object {$_.DomainControllers} | ForEach-Object {$_.Name}


################Ping Test######

foreach ($DC in $DCServers){
$Identity = $DC
                Add-Content $report "<tr>"
if ( Test-Connection -ComputerName $DC -Count 1 -ErrorAction SilentlyContinue ) {
Write-Host $DC `t $DC `t Ping Success -ForegroundColor Green

        Add-Content $report "<td bgcolor= 'GainsBoro' align=center>  <B> $Identity</B></td>"
                Add-Content $report "<td bgcolor= 'Aquamarine' align=center>  <B>Success</B></td>"

                ##############Netlogon Service Status################
        $serviceStatus = start-job -scriptblock {get-service -ComputerName $($args[0]) -Name "Netlogon" -ErrorAction SilentlyContinue} -ArgumentList $DC
                wait-job $serviceStatus -timeout $timeout
                if($serviceStatus.state -like "Running")
                {
                 Write-Host $DC `t Netlogon Service TimeOut -ForegroundColor Yellow
                 Add-Content $report "<td bgcolor= 'Yellow' align=center><B>NetlogonTimeout</B></td>"
                 stop-job $serviceStatus
                }
                else
                {
                $serviceStatus1 = Receive-job $serviceStatus
                 if ($serviceStatus1.status -eq "Running") {
            Write-Host $DC `t $serviceStatus1.name `t $serviceStatus1.status -ForegroundColor Green
                $svcName = $serviceStatus1.name
                $svcState = $serviceStatus1.status        
                Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>$svcState</B></td>"
                  }
                 else
                  {
                 Write-Host $DC `t $serviceStatus1.name `t $serviceStatus1.status -ForegroundColor Red
               $svcName = $serviceStatus1.name
               $svcState = $serviceStatus1.status        
               Add-Content $report "<td bgcolor= 'Red' align=center><B>$svcState</B></td>"
                  }
                }
               ######################################################
                ##############NTDS Service Status################
        $serviceStatus = start-job -scriptblock {get-service -ComputerName $($args[0]) -Name "NTDS" -ErrorAction SilentlyContinue} -ArgumentList $DC
                wait-job $serviceStatus -timeout $timeout
                if($serviceStatus.state -like "Running")
                {
                 Write-Host $DC `t NTDS Service TimeOut -ForegroundColor Yellow
                 Add-Content $report "<td bgcolor= 'Yellow' align=center><B>NTDSTimeout</B></td>"
                 stop-job $serviceStatus
                }
                else
                {
                $serviceStatus1 = Receive-job $serviceStatus
                 if ($serviceStatus1.status -eq "Running") {
            Write-Host $DC `t $serviceStatus1.name `t $serviceStatus1.status -ForegroundColor Green
                $svcName = $serviceStatus1.name
                $svcState = $serviceStatus1.status        
                Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>$svcState</B></td>"
                  }
                 else
                  {
                 Write-Host $DC `t $serviceStatus1.name `t $serviceStatus1.status -ForegroundColor Red
               $svcName = $serviceStatus1.name
               $svcState = $serviceStatus1.status        
               Add-Content $report "<td bgcolor= 'Red' align=center><B>$svcState</B></td>"
                  }
                }
               ######################################################
                ##############DNS Service Status################
        $serviceStatus = start-job -scriptblock {get-service -ComputerName $($args[0]) -Name "DNS" -ErrorAction SilentlyContinue} -ArgumentList $DC
                wait-job $serviceStatus -timeout $timeout
                if($serviceStatus.state -like "Running")
                {
                 Write-Host $DC `t DNS Server Service TimeOut -ForegroundColor Yellow
                 Add-Content $report "<td bgcolor= 'Yellow' align=center><B>DNSTimeout</B></td>"
                 stop-job $serviceStatus
                }
                else
                {
                $serviceStatus1 = Receive-job $serviceStatus
                 if ($serviceStatus1.status -eq "Running") {
            Write-Host $DC `t $serviceStatus1.name `t $serviceStatus1.status -ForegroundColor Green
                $svcName = $serviceStatus1.name
                $svcState = $serviceStatus1.status        
                Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>$svcState</B></td>"
                  }
                 else
                  {
                 Write-Host $DC `t $serviceStatus1.name `t $serviceStatus1.status -ForegroundColor Red
               $svcName = $serviceStatus1.name
               $svcState = $serviceStatus1.status        
               Add-Content $report "<td bgcolor= 'Red' align=center><B>$svcState</B></td>"
                  }
                }
               ######################################################

               ####################Netlogons status##################
               add-type -AssemblyName microsoft.visualbasic
               $cmp = "microsoft.visualbasic.strings" -as [type]
               $sysvol = start-job -scriptblock {dcdiag /test:netlogons /s:$($args[0])} -ArgumentList $DC
               wait-job $sysvol -timeout $timeout
               if($sysvol.state -like "Running")
               {
               Write-Host $DC `t Netlogons Test TimeOut -ForegroundColor Yellow
               Add-Content $report "<td bgcolor= 'Yellow' align=center><B>NetlogonsTimeout</B></td>"
               stop-job $sysvol
               }
               else
               {
               $sysvol1 = Receive-job $sysvol
               if($cmp::instr($sysvol1, "passed test NetLogons"))
                  {
                  Write-Host $DC `t Netlogons Test passed -ForegroundColor Green
                  Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>NetlogonsPassed</B></td>"
                  }
               else
                  {
                  Write-Host $DC `t Netlogons Test Failed -ForegroundColor Red
                  Add-Content $report "<td bgcolor= 'Red' align=center><B>NetlogonsFail</B></td>"
                  }
                }
               ########################################################
               ####################Replications status##################
               add-type -AssemblyName microsoft.visualbasic
               $cmp = "microsoft.visualbasic.strings" -as [type]
               $sysvol = start-job -scriptblock {dcdiag /test:Replications /s:$($args[0])} -ArgumentList $DC
               wait-job $sysvol -timeout $timeout
               if($sysvol.state -like "Running")
               {
               Write-Host $DC `t Replications Test TimeOut -ForegroundColor Yellow
               Add-Content $report "<td bgcolor= 'Yellow' align=center><B>ReplicationsTimeout</B></td>"
               stop-job $sysvol
               }
               else
               {
               $sysvol1 = Receive-job $sysvol
               if($cmp::instr($sysvol1, "passed test Replications"))
                  {
                  Write-Host $DC `t Replications Test passed -ForegroundColor Green
                  Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>ReplicationsPassed</B></td>"
                  }
               else
                  {
                  Write-Host $DC `t Replications Test Failed -ForegroundColor Red
                  Add-Content $report "<td bgcolor= 'Red' align=center><B>ReplicationsFail</B></td>"
                  }
                }
               ########################################################
           ####################Services status##################
               add-type -AssemblyName microsoft.visualbasic
               $cmp = "microsoft.visualbasic.strings" -as [type]
               $sysvol = start-job -scriptblock {dcdiag /test:Services /s:$($args[0])} -ArgumentList $DC
               wait-job $sysvol -timeout $timeout
               if($sysvol.state -like "Running")
               {
               Write-Host $DC `t Services Test TimeOut -ForegroundColor Yellow
               Add-Content $report "<td bgcolor= 'Yellow' align=center><B>ServicesTimeout</B></td>"
               stop-job $sysvol
               }
               else
               {
               $sysvol1 = Receive-job $sysvol
               if($cmp::instr($sysvol1, "passed test Services"))
                  {
                  Write-Host $DC `t Services Test passed -ForegroundColor Green
                  Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>ServicesPassed</B></td>"
                  }
               else
                  {
                  Write-Host $DC `t Services Test Failed -ForegroundColor Red
                  Add-Content $report "<td bgcolor= 'Red' align=center><B>ServicesFail</B></td>"
                  }
                }
               ########################################################
           ####################Advertising status##################
               add-type -AssemblyName microsoft.visualbasic
               $cmp = "microsoft.visualbasic.strings" -as [type]
               $sysvol = start-job -scriptblock {dcdiag /test:Advertising /s:$($args[0])} -ArgumentList $DC
               wait-job $sysvol -timeout $timeout
               if($sysvol.state -like "Running")
               {
               Write-Host $DC `t Advertising Test TimeOut -ForegroundColor Yellow
               Add-Content $report "<td bgcolor= 'Yellow' align=center><B>AdvertisingTimeout</B></td>"
               stop-job $sysvol
               }
               else
               {
               $sysvol1 = Receive-job $sysvol
               if($cmp::instr($sysvol1, "passed test Advertising"))
                  {
                  Write-Host $DC `t Advertising Test passed -ForegroundColor Green
                  Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>AdvertisingPassed</B></td>"
                  }
               else
                  {
                  Write-Host $DC `t Advertising Test Failed -ForegroundColor Red
                  Add-Content $report "<td bgcolor= 'Red' align=center><B>AdvertisingFail</B></td>"
                  }
                }
               ########################################################
           ####################FSMOCheck status##################
               add-type -AssemblyName microsoft.visualbasic
               $cmp = "microsoft.visualbasic.strings" -as [type]
               $sysvol = start-job -scriptblock {dcdiag /test:FSMOCheck /s:$($args[0])} -ArgumentList $DC
               wait-job $sysvol -timeout $timeout
               if($sysvol.state -like "Running")
               {
               Write-Host $DC `t FSMOCheck Test TimeOut -ForegroundColor Yellow
               Add-Content $report "<td bgcolor= 'Yellow' align=center><B>FSMOCheckTimeout</B></td>"
               stop-job $sysvol
               }
               else
               {
               $sysvol1 = Receive-job $sysvol
               if($cmp::instr($sysvol1, "passed test FsmoCheck"))
                  {
                  Write-Host $DC `t FSMOCheck Test passed -ForegroundColor Green
                  Add-Content $report "<td bgcolor= 'Aquamarine' align=center><B>FSMOCheckPassed</B></td>"
                  }
               else
                  {
                  Write-Host $DC `t FSMOCheck Test Failed -ForegroundColor Red
                  Add-Content $report "<td bgcolor= 'Red' align=center><B>FSMOCheckFail</B></td>"
                  }
                }
               ########################################################
               
}
else
              {
Write-Host $DC `t $DC `t Ping Fail -ForegroundColor Red
        Add-Content $report "<td bgcolor= 'GainsBoro' align=center>  <B> $Identity</B></td>"
                Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
        Add-Content $report "<td bgcolor= 'Red' align=center>  <B>Ping Fail</B></td>"
}        
      
}

Add-Content $report "</tr>"
############################################Close HTMl Tables###########################


Add-content $report  "</table>"
Add-Content $report "</body>"
Add-Content $report "</html>"


########################################################################################
#############################################Send Email#################################


$subject = "Active Directory Health Monitor"
$body = Get-Content ".\ADreport.htm"
$smtp= New-Object System.Net.Mail.SmtpClient $smtphost
$msg = New-Object System.Net.Mail.MailMessage
$msg.To.Add($email1)
$msg.from = $from
$msg.subject = $subject
$msg.body = $body
$msg.isBodyhtml = $true
$smtp.send($msg)

########################################################################################

########################################################################################

           
        

Linux boot process for technical interviews

0 comments
    1. 6 Stages of Linux Boot Process (Startup Sequence)

    2. Press the power button on your system, and after few moments you see the Linux login prompt.
    3. Have you ever wondered what happens behind the scenes from the time you press the power button until the Linux login prompt appears?
    4. The following are the 6 high level stages of a typical Linux boot process.

1. BIOS

  • BIOS stands for Basic Input/Output System
  • Performs some system integrity checks
  • Searches, loads, and executes the boot loader program.
  • It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key (typically F12 of F2, but it depends on your system) during the BIOS startup to change the boot sequence.
  • Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.
  • So, in simple terms BIOS loads and executes the MBR boot loader.

2. MBR

  • MBR stands for Master Boot Record.
  • It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda
  • MBR is less than 512 bytes in size. This has three components 1) primary boot loader info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check in last 2 bytes.
  • It contains information about GRUB (or LILO in old systems).
  • So, in simple terms MBR loads and executes the GRUB boot loader.

3. GRUB

  • GRUB stands for Grand Unified Bootloader.
  • If you have multiple kernel images installed on your system, you can choose which one to be executed.
  • GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file.
  • GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem).
  • Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The following is sample grub.conf of CentOS.
    1. #boot=/dev/sda
    2. default=0
    3. timeout=5
    4. splashimage=(hd0,0)/boot/grub/splash.xpm.gz
    5. hiddenmenu
    6. title CentOS (2.6.18-194.el5PAE)
    7.          root (hd0,0)
    8.          kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/
  •          initrd /boot/initrd-2.6.18-194.el5PAE.img
  • As you notice from the above info, it contains kernel and initrd image.
  • So, in simple terms GRUB just loads and executes Kernel and initrd images.

4. Kernel

  • Mounts the root file system as specified in the “root=” in grub.conf
  • Kernel executes the /sbin/init program
  • Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
  • initrd stands for Initial RAM Disk.
  • initrd is used by kernel as temporary root file system until kernel is booted and the real root file system is mounted. It also contains necessary drivers compiled inside, which helps it to access the hard drive partitions, and other hardware.

5. Init

  • Looks at the /etc/inittab file to decide the Linux run level.
  • Following are the available run levels
    • 0 – halt
    • 1 – Single user mode
    • 2 – Multiuser, without NFS
    • 3 – Full multiuser mode
    • 4 – unused
    • 5 – X11
    • 6 – reboot
  • Init identifies the default initlevel from /etc/inittab and uses that to load all appropriate program.
  • Execute ‘grep initdefault /etc/inittab’ on your system to identify the default run level
  • If you want to get into trouble, you can set the default run level to 0 or 6. Since you know what 0 and 6 means, probably you might not do that.
  • Typically you would set the default run level to either 3 or 5.

6. Runlevel programs

  • When the Linux system is booting up, you might see various services getting started. For example, it might say “starting sendmail …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
  • Depending on your default init level setting, the system will execute the programs from one of the following directories.
    • Run level 0 – /etc/rc.d/rc0.d/
    • Run level 1 – /etc/rc.d/rc1.d/
    • Run level 2 – /etc/rc.d/rc2.d/
    • Run level 3 – /etc/rc.d/rc3.d/
    • Run level 4 – /etc/rc.d/rc4.d/
    • Run level 5 – /etc/rc.d/rc5.d/
    • Run level 6 – /etc/rc.d/rc6.d/
  • Please note that there are also symbolic links available for these directory under /etc directly. So, /etc/rc0.d is linked to /etc/rc.d/rc0.d.
  • Under the /etc/rc.d/rc*.d/ directories, you would see programs that start with S and K.
  • Programs starts with S are used during startup. S for startup.
  • Programs starts with K are used during shutdown. K for kill.
  • There are numbers right next to S and K in the program names. Those are the sequence number in which the programs should be started or killed.
  • For example, S12syslog is to start the syslog deamon, which has the sequence number of 12. S80sendmail is to start the sendmail daemon, which has the sequence number of 80. So, syslog program will be started before sendmail.
There you have it. That is what happens during the Linux boot process.

Article was with due credits from : https://practice.geeksforgeeks.org/problems/what-is-booting-process-of-linux-operating-system

Gitlab LDAP Integration

0 comments
Gitlab : GitLab is a single application for the entire software development lifecycle. From project planning and source code management to CI/CD, monitoring, and security.
  • GitLab is the first single application built from the ground up for all stages of the DevOps lifecycle for Product, Development, QA, Security, and Operations teams to work concurrently on the same project. 
  • GitLab enables teams to collaborate and work from a single conversation, instead of managing multiple threads across disparate tools. 
  • GitLab provides teams a single data store, one user interface, and one permission model across the DevOps lifecycle allowing teams to collaborate, significantly reducing cycle time and focus exclusively on building great software quickly.
  • GitLab’s Kubernetes integration makes it easy to create and configure clusters. With Auto DevOps, GitLab automatically configures CI/CD pipelines to build, test, verify, and deploy applications to Kubernetes. 
HOST IP : 10.0.0.1 (VM On ESXi )
RAM : 4 Gb
HDD : 20 Gb
OS : Cent OS 7 64 Bit
Username : root
Standard User for WebGUI : root password : welcome

Installation of GITLAB on Centos 7 :

1. Install and configure the necessary dependencies:

On CentOS 7 (and RedHat/Oracle/Scientific Linux 7), the commands below will also    open HTTP and SSH access in the system firewall.
i)sudo yum install -y curl policycoreutils-python openssh-server
ii)sudo systemctl enable sshd
iii)sudo systemctl start sshd
iv)sudo firewall-cmd --permanent --add-service=http
v)sudo systemctl reload firewalld

Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.
i)sudo yum install postfix
ii)sudo systemctl enable postfix
iii)sudo systemctl start postfix
         During Postfix installation a configuration screen may appear. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

Next, install the GitLab package. Change https://gitlab.example.com to the URL at which you want to access(http://gitlab.mumbai.cdac.in) your GitLab instance. Installation will automatically configure and start GitLab at that URL.

sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee

3. Browse to the hostname and login

         On your first visit, you'll be redirected to a password reset screen. Provide the password for the initial administrator account and you will be redirected back to the login screen. Use the default account's username root to login.



TO INTEGRATE GITLAB TO CDAC MUMBAI LDAP Use following settings :

  1. Create one user ‘gitlab’ with default password ‘Password@123’ for authentication with Active Directory .
  2. Edit file /etc/gitlab/gitlab.rb
  3. On line no 278 onwards add the following configuration in LDAP configuration :
    278 gitlab_rails['ldap_enabled'] = true
    279 gitlab_rails['ldap_servers'] = {
    280  'main' => {
    281                 'label' => 'MY LDAP',
    282                 'host' => '<insert your hostname of Domain controller >',
    283                 'port' => '389',
    284                 'uid' => 'sAMAccountName',
    285                 'encryption' => 'plain',
    286                 'verify_certificates' => 'false',
    287                 'bind_dn' => 'cn=gitlab,ou=ldap_test, DC = <domain name>, DC= com',
    288                 'password'=> 'Password@123',
    289                 'active_directory' => true,
    290                 'base' =>'ou=Staff,ou=User Accounts, dc=<domain name >,dc=com',
           291        'block_auto_created_users' => 'true',
    292                 'tls-ca-file' => "/home/certs/"
    293
    294           }
    295
    296 }

  1. Command to use after configurations
  • sudo  gitlab-ctl reconfigure
  • sudo service gitlab-runsvdir restart

  1. To check LDAP Configuration use command

gitlab-rake gitlab:ldap:check

  • After successful configuration you will be able to see your login by using CDACs webmail credentials


  • Reference : https://about.gitlab.com/
Copyright 2014 http://techcontrolz.blogspot.in/ .
Blogger Template by Rohan Choudhari. . Creative Commons License