SSH with Duo MFA and Active Directory

Duo has thorough documentation for adding MFA to your SSH sessions, but there are a couple additional steps needed to also integrate with Active Directory. This post will go through the installation for both Duo and Active Directory for Ubuntu 16.04. For other Linux distros, the Duo documentation linked above has you covered. \ System components: Ubuntu 16.04 server Duo MFA account Duo Unix package Centify Express for Active Directory integration \ Duo Installation: Install OpenSSL development headers and libraries: ...

August 30, 2017 · 3 min · Daniel Kuchenski

Active Directory Powershell

Using this page to keep track of all the useful powershell “mini-scripts” I’ve used: Copy users from one security group to another security group Add-ADGroupMember -Identity destination-group-name -Members (Get-ADGroupMember -Identity source-group-name -Recursive) Add enabled users from an OU to a security group Get-ADUser -SearchBase 'OU=Your-OU,DC=corp,DC=company,DC=com' -Filter {Enabled -eq $true} | ForEach-Object {Add-ADGroupMember -Identity 'your-group-name' -Members $_ } Add users from a CSV file to a security group (username column is called “name”) ...

August 4, 2017 · 1 min · Daniel Kuchenski

Active Directory Transfer Roles

If you need to transfer the Active Directory FSMO roles to a new server, these simple steps were easy to follow. Took about 5 minutes. http://www.techieshelp.com/how-to-transfer-fsmo-roles-graphical-and-command-line/

December 10, 2015 · 1 min · Daniel Kuchenski

Windows SSL Certificate Installation

The Digicert cert utility for Windows make the process so much easier: To generate the CSR: https://www.digicert.com/util/csr-creation-microsoft-active-directory-ldap-2012-digicert-utility.htm To install the Cert: https://www.digicert.com/ssl-certificate-installation-microsoft-active-directory-ldap-2012.htm For LDAPS on a domain controller, I did not have to import the cert file into the AD DS personal store.

December 1, 2015 · 1 min · Daniel Kuchenski

Active Directory Health Check

Migrated a DC and wanted to do some basic AD health checks. From the cmd prompt (domain joined pc with sufficient privileges or on the DC): Replication Info: repadmin /replsummary repadmin /showrepl Query FSMO role holders, which should confirm that they are online: netdom query fsmo General Server Diagnosis: dcdiag /a /s:<DC server name> If you want the DC’s to force sync and see if there are any issues: repadmin /syncall

July 23, 2015 · 1 min · Daniel Kuchenski

Export User List of AD Security Group

If you need to get a list of all members in an AD Security Group, open up powershell and try the following commands from a DC: This command will list all the members and the OU structure they below to: dsquery group -name "GroupName" | dsget group -members Add this to the command to only get the display name of the users: dsquery group -name "GroupName" | dsget group -members | dsget user -display Update: I have posted more recently with updated/additional commands: https://thenetworkstack.com/active-directory-powershell/

March 6, 2015 · 1 min · Daniel Kuchenski

Active Directory Delegating Permissions

I needed to delegate permissions to helpdesk (instead of making them domain admins) to create and modify users, and modify group membership. This is slightly different from some of the built in permission groups, since we didn’t want helpdesk to delete users. Permissions are delegated at the OU level, and remember that permissions are pushed down and inherited. This is what I used to delegate these permissions: Right click the OU, and select “Delegate Control” and click “Next” Add your Security Group (I called mine Delegated Helpdesk) Click “Modify the membership of a group”, then “Next” and “Finish” First section done! Go through steps 1 and 2 again Select the button “Create a custom task to delegate” and click “Next” Select the button “Only the following objects in the folder:” and select “User objects” Click “Create selected objects in this folder” and click “Next” Click the following permissions: Read All Properties Write All Properties Read and write general information Read and write logon information Read and write phone and mail options Read and write web information Change password Reset password Click “Next” and then “Finish” You are now finished. Users in the Delegated Helpdesk group should be able to create and modify users, and group membership. If you ever need to revert your changes, click on Properties -> Security (requires advanced view) for the OU, and remove the permissions.

October 1, 2014 · 2 min · Daniel Kuchenski

Palo Alto Firewall AD Group Mapping

These commands will help troubleshoot and resolve issues with Active Directory groups on your PAN firewall. 1. Shows every AD group added to the PAN firewall: show user group list 2. Shows the user and IP address mapping (or specific user): show user ip-user-mapping all 3. Gives more detailed statistics of the command above: show user group-mapping state all 4. Shows the user members of the group specified: show user group name "group_name" 5. Re-pulls the user-to-group mapping from AD: ...

September 29, 2014 · 1 min · Daniel Kuchenski