NextCloud 12 Active Directory nested groups

Insert following query in editor:

(&(objectClass=organizationalPerson)(|(memberof:1.2.840.113556.1.4.1941:=CN=NextCloudUsers,OU=Groups,DC=domain,DC=com)(memberof:1.2.840.113556.1.4.1941:=CN=NextCloudAdmins,OU=Groups,DC=domain,DC=com)))

 

Test it:

 

root@nc:/home/user# ldapsearch     -x -h 10.40.aa.bbb     -D "user@domain.com"     -W     -b "dc=domain,dc=com"     -s sub "(&(objectClass=organizationalPerson)(|(memberof:1.2.840.113556.1.4.1941:=CN=NextCloudUsers,OU=Groups,DC=domain,DC=com)(memberof:1.2.840.113556.1.4.1941:=CN=NextCloudAdmins,OU=Groups,DC=domain,DC=com)))" cn mail sn

 

FC Adapter HBA Attributes

Get-WmiObject -class MSFC_FCAdapterHBAAttributes -computername localhost -namespace "root\WMI" | Select-Object DriverVersion, FirmwareVersion, Manufacturer, Model, SerialNumber, ModelDesc
ription, @{expression ={(($_.NodeWWN) | ForEach-Object {"{0:x}" -f $_}) -join ":"};label="WWN"} |Format-Table -AutoSize
Model SerialNumber ModelDescription WWN
----- ------------ ---------------- ---
AJ763B/AH403A 5CF644034W HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:f7:96:54
AJ763B/AH403A 5CF644034W HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:f7:96:55

All cluster’s WWN

Invoke-Command -ComputerName  cl2n1,cl2n2,cl2n3,cl2n4,cl2n5 -ScriptBlock {$env:computername;Get-WmiObject -class MSFC_FCAdapterHBAAttributes -computername localhost -namespace "root\WMI"
| Select-Object DriverVersion, FirmwareVersion, Manufacturer, Model, SerialNumber, ModelDescription, @{expression ={(($_.NodeWWN) | ForEach-Object {"{0:x}" -f $_}) -join ":"};label="WWN"} |Format-Table -AutoSize}
CL2N1

DriverVersion FirmwareVersion Manufacturer       Model         SerialNumber ModelDescription                     WWN
------------- --------------- ------------       -----         ------------ ----------------                     ---
11.0.247.8000 2.02X13         Emulex Corporation AJ763B/AH403A 5CF33602NS   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ
11.0.247.8000 2.02X13         Emulex Corporation AJ763B/AH403A 5CF33602NS   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ


CL2N5

DriverVersion FirmwareVersion Manufacturer       Model         SerialNumber ModelDescription                     WWN
------------- --------------- ------------       -----         ------------ ----------------                     ---
11.1.145.16   2.03X6          Emulex Corporation AJ763B/AH403A 5CF644034W   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ
11.1.145.16   2.03X6          Emulex Corporation AJ763B/AH403A 5CF644034W   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ


CL2N4

DriverVersion FirmwareVersion Manufacturer       Model         SerialNumber ModelDescription                     WWN
------------- --------------- ------------       -----         ------------ ----------------                     ---
11.1.145.16   2.03X6          Emulex Corporation AJ763B/AH403A 5CF644024S   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ
11.1.145.16   2.03X6          Emulex Corporation AJ763B/AH403A 5CF644024S   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ


CL2N3

DriverVersion FirmwareVersion Manufacturer       Model         SerialNumber ModelDescription                       WWN
------------- --------------- ------------       -----         ------------ ----------------                       ---
11.1.145.16   2.03X6          Emulex Corporation AJ762A/AH402A 5CF2120587   HP 8Gb Single Channel PCI-e 2.0 FC HBA 20:0:0:0:c9:XX:YY:ZZ
11.1.145.16   2.03X6          Emulex Corporation AJ762A/AH402A 5CF2120583   HP 8Gb Single Channel PCI-e 2.0 FC HBA 20:0:0:0:c9:XX:YY:ZZ


CL2N2

DriverVersion FirmwareVersion Manufacturer       Model         SerialNumber ModelDescription                     WWN
------------- --------------- ------------       -----         ------------ ----------------                     ---
11.1.145.16   2.03X6          Emulex Corporation AJ763B/AH403A 5CF33602P9   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ
11.1.145.16   2.03X6          Emulex Corporation AJ763B/AH403A 5CF33602P9   HP 8Gb Dual Channel PCI-e 2.0 FC HBA 20:0:0:90:fa:XX:YY:ZZ

 

Adaptive DDOS IDS firewall

We had a task to build a simple solution for DDOS protection on the learning phase of attack. Main goals were:

  1. To build it fast: We chose Ubuntu … as everything needed is compiled and build in.
  2. Minimum network intervention: We opted for L2/L3 bridge with iptables integration which we plugged between our autonomous system (AS) and internet.
  3. Auto learning offenders: Using honeypot service to distinguish non-legitimate connections. Log source IP address and drop packet with iptables. Using suricata ids to additionally analyze client requests.
  4. Auto block offenders: Using fail2ban to pars logs generated by iptables and suricata and temporary disable all connections from offending sources.
  5. Have some connection limit capabilities: Again we used iptables with connlimit and conntrack modules activated.

Continue reading “Adaptive DDOS IDS firewall”

How to remove duplicated VMs in VMM console

  1.  Move machine to another hyper-v host via Failover Cluster Manager Console
  2.  Get ID of duplicated VM
    Get-SCVirtualMachine -Name "VMName" |fl id,vmid, virtualmachinestate, hostname
  3. Double check working and duplicated machine
    get-vm   -id "ID" | fl id,vmid, virtualmachinestate, hostname
  4. Delete duplicated VM configuration
    get-vm   -id "ID" |Remove-SCVirtualMachine -Force

    Note the -Force option! You are risking to delete your data If you do NOT put -Force.

Exchange mailbox statistics in MB

Get-Mailbox -ignoredefaultscope|Get-MailboxStatistics| select DisplayName,MailboxGuid, Database, StorageLimitStatus,itemcount,LastLogonTime , @{expression = {$_.TotalItemSize.Value.ToMB()}; label="TotalItemSizeMB"},@{expression = {$_.TotalDeletedItemSize.Value.ToMB()}; label="TotalDeletedItemSizeMB"}|export-csv C:\tmp\export.csv -encoding Unicode

 

exchange_stats

Installing Apache Ambri on Ubuntu 14.04

If you have error like this:

ERROR 2015-08-25 13:33:54,601 Controller.py:143 - Cannot register host with not supported os type, hostname=h2.hadoopxyz.abc, serverOsType=ubuntu14, agentOsType=ubuntu14

 

You have to edit :

mc -e  /usr/lib/ambari-server/lib/ambari_commons/resources/os_family.json
mc -e /usr/lib/ambari-agent/lib/ambari_commons/resources/os_family.json

 

And change version number:

  "ubuntu": {
    "distro": [
      "ubuntu",
      "debian"
    ],
    "versions": [
      14
    ]
  },

 

ambri_errd