Owncloud 4 and AD LDAP

I recently migrated from owncloud 3 to owncloud 4 for a few of the newest features (versioning, security, working ldap).

LDAP configuration
LDAP Basic
Host: IP or Resolvable DNS
Base: dc=DOMAIN,dc=TLD
Name: user@domain.tld
Password: password
User Login Filter: sAMAccountName=%uid
User List Filter: objectClass=user
Group Filter objectClass=group

Advanced
Port: 389
Case insensitive LDAP server checked
Display Name Field: sAMAccountName

Change Timezone Linux CLI

I had a security-onion box running and it defaults to UTC/GMT time.  This was fine for me as I could do the subtraction of time in my head, but for some in management they were questioning my findings due to the time being off.  So, to make my life easier, I decided to change the timezone.

The timezone under Linux is set by a symbolic link from /etc/localtime to a file in the /usr/share/zoneinfo directory that corresponds with what timezone you are in. For example, since I’m in Chicago, /etc/localtime is a symlink to /usr/share/zoneinfo/America/Chicago. To set this link, type:

ln -sf /usr/share/zoneinfo/your/zone /etc/localtime

http://www.linuxsa.org.au/tips/time.html

NPS Radius 2008 Cisco ASA VPN

I had IAS working on a 2003 server as a RADIUS server for authentication to a Cisco ASA for VPN connectivity.

1                     Create a RADIUS Client on the NPS

2                     Create a network Policy as follows;

  1. Right click network policies and click new
  2. Type a policy name accept the defaults and click next
  3. Add a condition (I used a windows group with my users in it), click next
  4. Make sure the access granted radio button is selected and hit next
  5. Select the “Unencrypted authentication (PAP, SPAP)” and unselect the rest
  6. Select NO on the annoying help box
  7. Finally select next then next and finish to complete.

3                     Configure your Cisco device for RADIUS as you would have with 2k3.

Migrate to new DHCP Server Microsoft

Export the DHCP database from Windows 2003:

1.                   On the Windows 2003 DHCP server, navigate to a command prompt

2.                   Type the following Command: netsh

3.                   Type the following Command: DHCP

4.                   Type the following Command: server <\\Name or IP Address>

5.                   Type the following Command: export c:\w2k3DHCPdb all

Note You must have local administrator permissions to export the data.

Import the DHCP database

1.       Copy the exported DHCP database file to the local hard disk of the Windows Server 2008-based computer.

2.       Install the DHCP Role on the server.

3.       Stop the DHCP server service on the server.  To do this, follow these steps:

a.       Log on to the target DHCP server by using an account that is a member of the local Administrators group.

b.      Click Start, click Run, type cmd in the Open box, and then click OK.

c.       At the command prompt, type net stop DHCPserver , and then press ENTER. You receive a “The Microsoft DHCP Server service is stopping. The Microsoft DHCP Server service was stopped successfully” message.

d.      Type exit, and then press ENTER.

4.       Delete the DHCP.mdb file under c:\windows\system32\DHCP folder.

5.       Start the DHCP server service.

6.       Right-click on the Command Prompt (cmd) and select run as administrator, to open the cmd prompt using elevated privileges.

Note You must have local administrator permissions to import the data.

7.       Type the following Command: netsh

8.       Type the following Command: DHCP

9.       Type the following Command: server <\\Name or IP Address>

10.   Type the following Command: import c:\w2k3DHCPdb

11.   Restart DHCP and verify the database has moved over properly.

Transfer FSMO Roles

Transfer the Schema Master Role

Use the Active Directory Schema Master snap-in to transfer the schema master role. Before you can use this snap-in, you must register the Schmmgmt.dll file.

Register Schmmgmt.dll

  1. Click Start, and then click Run.
  2. Type regsvr32 schmmgmt.dll in the Open box, and then click OK.
  3. Click OK when you receive the message that the operation succeeded.

Transfer the Schema Master Role

  1. Click Start, click Run, type mmc in the Open box, and then click OK.
  2. On the File, menu click Add/Remove Snap-in.
  3. Click Add.
  4. Click Active Directory Schema, click Add, click Close, and then click OK.
  5. In the console tree, right-click Active Directory Schema, and then click Change Domain Controller.
  6. Click Specify Name, type the name of the domain controller that will be the new role holder, and then click OK.
  7. In the console tree, right-click Active Directory Schema, and then click Operations Master.
  8. Click Change.
  9. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the Domain Naming Master Role

  1. Click Start, point to Administrative Tools, and then click Active Directory Domains and Trusts.
  2. Right-click Active Directory Domains and Trusts, and then click Connect to Domain Controller.

    NOTE: You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.

  3. Do one of the following:
    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

      -or-

    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  4. In the console tree, right-click Active Directory Domains and Trusts, and then click Operations Master.
  5. Click Change.
  6. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the RID Master, PDC Emulator, and Infrastructure Master Roles

  1. Click Start, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. Right-click Active Directory Users and Computers, and then click Connect to Domain Controller.

    NOTE: You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.

  3. Do one of the following:
    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

      -or-

    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  4. In the console tree, right-click Active Directory Users and Computers, point to All Tasks, and then click Operations Master.
  5. Click the appropriate tab for the role that you want to transfer (RID, PDC, or Infrastructure), and then click Change.
  6. Click OK to confirm that you want to transfer the role, and then click Close.

Windows Firewall Base Filtering Engine Services

Had a client computer that could no longer connect to the VPN. The end-user blamed IT for changing something as it “worked before your scheduled weekend updates”. Yeah.

Turns out this guy had a rootkit, a trojan, and some malware on his system. Shame on IT for not catching it sooner, but it didn’t spread anywhere else.

Combofix, malwarebytes, TDSS, and stinger later, I was convinced we got it off of his system. Unfortunately he could still not connect due to the Base Filtering Engine service and the Windows Firewall service being unable to start. Cisco’s anyconnect client requires these two services in order to perform the necessary handshaking for a secured VPN connection.

Found these two kick butt registry keys to fix the situation:
http://it.thelibrarie.com/utilities/firewall.reg.txt
http://it.thelibrarie.com/utilities/bfe.reg.txt

Obviously change them to .reg files and run. I generally edit them to see what they do before blindly installing registry keys from a random IT site.

Proxmox Syslog Errors

So I run proxmox 2.1 (pve-manager/2.1/f9b0f63a). I monitor the servers with Dell’s OpenManage 6.5 and Nagios. I started noticing the following in my syslog (/var/log/syslog)

Jun 26 07:35:21 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)
Jun 26 07:35:21 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)
Jun 26 07:35:51 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)
Jun 26 07:35:51 pveserver1 snmpd[2015]: error on subcontainer ‘ia_addr’ insert (-1)

Quick check online points me to SNMP issues – apparently there is a “bug” that was fixed, but is still technically present due to the default settings of snmpd.

Login as root
nano /etc/default/snmpd
Change the line with SNMPDOPTS to
SNMPDOPTS='-LS6d -Lf /dev/null -u snmp -g snmp -I -smux -p /var/run/snmpd.pid'
And the line with TRAPDOPTS to
TRAPDOPTS='-LS6d -p /var/run/snmptrapd.pid'
Save and Exit

Then restart SNMPD
/etc/init.d/snmpd restart

Watch the log file and see if you receive any more snmpd messages
watch tail -45 /var/log/syslog

Ramblings Of An IT Person