Active Directory (AD) : Tips and Tricks To Keep AD Healthy and Secure
Active Directory (AD) : Tips and Tricks To Keep AD Healthy and Secure
1. Regular Backups
Weak passwords are easy to guess and can let hackers access our system.
Enforce a password policy that requires complex passwords (mix of letters,
numbers, and symbols). Make sure passwords expire regularly so users change
them often.
3. Monitor AD Activity
Not everyone needs full access to everything. Limiting permissions reduces the
risk of accidental or malicious damage. Give users only the permissions they
need for their tasks. Review permissions regularly to ensure they stay
appropriate.
Admin accounts have the highest level of access, so they are prime targets for
attackers. Create separate accounts for admin tasks and day-to-day activities.
Use Multi-Factor Authentication (MFA) to add an extra layer of security. Don’t
use admin accounts for regular tasks like checking email.
Group Policies help us control what users can and cannot do on their computers,
making AD more secure and easier to manage. Use Group Policy Objects
(GPOs) to apply consistent security settings, like disabling weak encryption or
locking screens after inactivity.
Over time, AD can become cluttered with old accounts, groups, and
permissions, which increases security risks. Periodically review and clean up old
or unused user accounts and security groups. Disable or delete accounts of users
who no longer work for the organization.
Domain Controllers (DCs) are the heart of AD, and if they are compromised, out
entire AD is at risk. Limit access to DCs to only trusted admins, ensure DCs are
secured with firewalls, and regularly monitor them for suspicious activity.
Protect physical access to servers as well.
This ensures that users have only the access they need based on their role.
Create roles for different levels of users (like HR, IT, Sales) and assign
Many security threats come from users accidentally making mistakes, like
clicking on phishing links. Educate users regularly about security best practices,
such as avoiding suspicious links, reporting phishing emails, and using strong
passwords.
Hackers may try to guess passwords by repeatedly entering them (called brute-
force attacks). Set up an account lockout policy that temporarily locks accounts
after several failed login attempts. This slows down attackers and prevents them
from guessing passwords.
Logs provide a history of actions taken in AD, while alerts help notify us of
potential issues right away. Enable logging for key actions like login attempts
and changes to sensitive information. Set up alerts to notify us if there are
repeated failed logins or if a user suddenly gains elevated privileges.
Not every user or group in our organization needs the same password policy. For
example, admins might need stricter rules. Use Fine-Grained Password Policies to
apply different password policies for different groups, such as requiring longer or
more complex passwords for privileged users.
Managing service accounts manually can be difficult and prone to errors like
password mismanagement. Use gMSAs, which automatically manage passwords
for services that run across multiple servers, improving security and ease of
management.
Limiting the time frame when accounts can be used adds another security layer.
Use Time-Based Group Membership to temporarily elevate user privileges for a
specific task and automatically revoke access after a set period.
It helps detect and respond to advanced threats targeting Active Directory. Use
Windows Defender for Identity to identify suspicious activities such as lateral
movement, brute-force attacks, and privilege escalation within our AD environment.
Older authentication protocols like NTLM are less secure and can be exploited by
attackers. Audit your network for the use of legacy protocols, such as NTLM or
older versions of SMB. Disable or replace these with modern, secure alternatives
like Kerberos and SMBv3.
Keeping Domain Controllers (DCs) isolated reduces the chance of them being
compromised in case of a broader attack. Place DCs in a separate, secured network
segment with limited access to reduce the attack surface. Restrict who can access
these servers and monitor their traffic closely.
Testing your AD environment for weaknesses ensures you stay ahead of potential
security threats. Conduct regular penetration testing to find vulnerabilities that an
attacker might exploit. Focus on areas like user accounts, permissions, and
authentication methods.
Certificates provide a stronger, more secure way to verify identities than passwords.
Deploy certificate-based authentication for critical systems and services, especially
for sensitive accounts like admins. This makes it harder for attackers to impersonate
users.
Accidental deletions of user accounts or OUs can happen and cause a lot of
disruption. Enable the AD Recycle Bin feature, which allows us to recover deleted
objects (like users or groups) easily without the need for a full restore. This is a
quick way to undo mistakes.
______๑♡๑______
Tips and tics to keep AD healthy and secure Page 6 of 7
Tips and tics to keep AD healthy and secure Page 7 of 7
Changing Dynamic IP to Static, Computer Name, and Time Zone
in a Local Server
1. Open Local Server: Go to the Local Server option from the server dashboard.
2. Access Ethernet Properties:
o Locate the Ethernet connection under Properties.
o Right-click on Ethernet and select Properties.
3. Configure TCP/IP Settings:
o Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
o In the IP Address field, enter 192.168.0.110.
o For Subnet Mask, use 255.255.255.0.
o For Default Gateway, enter 192.168.0.1.
4. Set DNS Server:
o In the Preferred DNS server, enter 192.168.0.110.
o Optionally, you can set the Alternate DNS server as 8.8.8.8.
5. Save Changes: Click OK to save the changes.
1. Open the Service: Click on the service showing the red status.
2. Disable Automatic Delayed Start:
o Uncheck the box for Automatic (Delayed Start) instead of multiple
o Ensure Automatic is selected instead.
3. Save Changes: Click OK to apply the settings.
This documentation should guide users through changing a server's dynamic IP to static,
renaming the computer, adjusting the time zone, and managing red-marked services
efficiently.
~~>_<~~
After successfully installing the DHCP server, follow these steps to configure it:
This step-by-step documentation will guide users through setting up and configuring a
DHCP server, ensuring proper setup for managing IP addresses within the network.
{{{(>_<)}}}
Follow these steps to install Active Directory Domain Services (AD DS) on a
Windows Server:
3. Installation Type:
o Click Next.
4. Server Selection:
o If you want to configure DNS as well, check the DNS Server box.
9. Confirmation:
o Click Install.
1. Open Notifications:
o Click Next.
o Click Next.
4. DNS Options:
o Click Next.
o You can leave the default paths for the database, log files, and
SYSVOL. Click Next.
7. Prerequisites Check:
o Once you see the green checkmarks indicating success, click Install.
8. Auto-Restart:
3. Completion
You can now manage users, computers, and other resources within your new
domain.
༼ つ ◕_◕༽ つ
Before configuring the DNS zones, ensure that the DNS server is installed. Follow
the steps in Documentation No. 3 to install and configure the DNS Server as part
of the Active Directory Domain Services (AD DS).
o Click Next.
4. Replication Scope:
o Click Next.
5. Select IP Version:
o Click Next.
6. Network ID:
o Click Next.
7. Dynamic Updates:
o Click Browse.
Windows DNS Server Zone Page 2 of 4
o In the Browse window, navigate to your server-name > Forward
Lookup Zones > kibria.local.
o Click OK.
o The IP address associated with the Host (A) record will be displayed.
Confirm this IP and click OK to create the PTR record.
o You should see the IP address 192.168.0.110 returned for the domain
kibria.local.
o You should now see kibria.local as the response, confirming that the
reverse lookup is working.
7. Completion
Your DNS server is now fully configured with both forward and reverse lookup
zones. You can use nslookup commands to test and verify both name resolution and
reverse DNS resolution.
¯\_(ツ)_/¯
Creating an OU Page 1 of 2
2. Deleting an Organizational Unit (OU)
3. Completion
Your Organizational Unit (OU) has now been successfully created and deleted.
This documentation outlines the simple steps to create and delete OUs in Active
Directory, providing clear instructions for protecting against accidental deletion and
managing features.
¯ \_(ツ)_/¯
Creating an OU Page 2 of 2
Creating a User Account with Active Directory (AD)
3. Completion
The user account has now been successfully created under the Domain Users OU. You
can manage this account or create additional users as needed.
¯\_(ツ)_/¯
This guide explains how to search for objects like users and computers within Active
Directory (AD) and use advanced search features, including wildcard searches.
By default, the search results will not display the full path of the object in the AD
structure. To find where the object is located:
1. In Active Directory Users and Computers, click View from the top
navigation bar.
2. Select Advanced Features to enable it.
1. Click the Search icon located below the View text (located in the second row
under the File menu).
2. Type the object name you want to find (e.g., username or computer name) and
click Find Now.
3. Right-click the desired object from the search results and select Properties.
4. In the Properties window, go to the Object tab.
5. Here, you can view the Object Path showing the exact location of the user,
group, or computer within the AD structure.
Wildcard search allows you to search for objects using partial names.
1. In Active Directory Users and Computers, click the Find button (located in
the second row under the File menu).
2. Under Find, select Computers from the dropdown.
3. Under In, select your domain (e.g., kibria.local).
4. In the Computer Name field, type a wildcard search term. For example:
o *WS* (This will search for all computer names containing the letters
"WS" anywhere in the name).
5. Click Find Now to see the results.
Completion
This documentation outlines the steps to search for objects, find their location, and use
wildcard searches within Active Directory. It provides a clear guide for both basic and
advanced search features and object management.
¯ \_(ツ)_/¯
This guide explains how to reset a user password and unlock a user account within
Active Directory (AD).
1. In the Active Directory Users and Computers window, click the Find
Objects icon located in the second row (search icon).
2. Enter the name of the user who lost their password in the search field.
3. Click Find Now to search for the user.
1. In the search results, right-click the user’s name and select Properties.
2. Go to the Account tab.
3. Verify the user’s name to ensure the correct account is selected.
4. Click Cancel to exit.
If the user account is locked and a password reset is not required, you can unlock the
account using the following steps:
1. In the Active Directory Users and Computers window, click the Find
Objects icon located in the second row (search icon).
2. Enter the name of the locked user in the search field.
3. Click Find Now to search for the user.
1. In the search results, right-click the user’s name and select Properties.
2. Go to the Account tab.
3. Check the box labeled Unlock Account (this option is only visible if the
account is locked).
4. Click Apply, then click OK.
¯ \_(ツ)_/¯
This guide covers how to create a new security group, add members to the group, and
manage group memberships in Active Directory (AD). It also explains the difference
between the Members and Member Of tabs.
1. In the Active Directory Users and Computers window, expand the domain
name (e.g., kibria.local).
2. Expand the OU (Organizational Unit) we created earlier (e.g., instructorpaul)
1. In the Enter the object names to select field, type the name of the user you
want to add (this user was created in the previous documentation).
2. Click Check Names to ensure the correct user is selected.
3. Click OK. The user will now be listed as a member of the Sales group.
4. Click OK to confirm.
3. Deleting a Group
Members Tab: This tab is used to add individual members (users, computers)
directly to the group. It shows all the users who are part of this specific group.
Member Of Tab: This tab shows which groups a particular user (or group)
belongs to. You can also add the group itself as a member of another group here.
For example, if you want the Sales group members to also be members of the
Customer Service group, you can:
1. Open the Sales group properties.
2. Go to the Member Of tab.
3. Click Add, and type the name of the Customer Service group.
4. Click Check Names, and click OK. Now, the Sales group will also be
part of the Customer Service group.
Completion
This documentation explains how to create and manage security groups, add members
to groups, and understand group membership within Active Directory, ensuring an
easy-to-follow process for anyone managing AD groups.
¯ \_(ツ)_/¯
This guide provides step-by-step instructions for creating an Organizational Unit (OU)
for disabled user accounts, how to disable user accounts, and how to re-enable and
move them back to their original OU in Active Directory (AD).
1. In the Active Directory Users and Computers window, expand the domain
name (e.g., kibria.local).
2. Expand the OU that you created earlier (e.g., InstructorPaul).
3. Right-click the OU name that contains Domain Computers and Domain Users
OUs.
1. After enabling the account, drag and drop the user account from the Disabled
Users OU back to the Domain Users OU (or whichever OU the user originally
belonged to).
2. Press F5 to refresh, and you should now see the user back in the Domain Users
OU.
Completion
This documentation provides clear steps on how to disable, move, re-enable, and
relocate user accounts within Active Directory. It is useful for managing inactive or
disabled users while ensuring they can be re-enabled and placed back into their correct
OU when necessary.
¯\_(ツ)_/¯
This documentation explains how to create, link, and delete Group Policy Objects
(GPOs) in Active Directory using two methods. It also includes a scenario where we
apply the GPO to domain users and computers.
1. In the Group Policy Objects section (found under the domain), expand it to see
the TestGPO.
2. Right-click TestGPO and select Delete.
In this scenario, we apply TestGPO to the Domain Users and Domain Computers
Organizational Units (OUs).
After creating and linking the GPO, you can explore its settings to understand its
behavior:
Conclusion
This documentation provides a clear step-by-step guide for creating, linking, and
managing Group Policy Objects (GPOs) in Active Directory. By following these
instructions, you can easily apply policies to different OUs and manage your domain
efficiently.
¯ \_(ツ)_/¯
This documentation explains how to edit a Group Policy Object (GPO) and modify
specific settings, such as disabling certain security policies. The instructions use a
practical example involving disabling the "Prevent local guests group from accessing
application log" policy.
Conclusion
This documentation provides a clear step-by-step guide for editing Group Policy
Objects (GPOs) in Active Directory. By following these instructions, you can modify
specific policies, such as security settings, and ensure the changes are reflected
properly in your domain’s policy settings.
¯ \_(ツ)_/¯
1. Verify Non-Inheritance
o Open Active Directory Users and Computers.
o Check the Non Inheriting OU.
o Ensure that the Administrator or any moved user does not show any
inheritance errors or issues.
2. Restore Active Desktop Setting
o Return to Group Policy Management.
o Edit the TestGPO.
o Navigate to User Configuration > Policies > Administrative
Templates > Desktop.
o Set Disable Active Desktop to Not Configured.
o Click Apply, then OK.
3. Move User Back
o In Active Directory Users and Computers, locate the Non Inheriting
OU.
o Drag and drop the Administrator user (or any other user) into the Users
container at the bottom-left side.
o Click Yes in the pop-up confirmation window.
Conclusion: This documentation outlines the process for creating and configuring a
non-inheriting Organizational Unit (OU) in Active Directory, including setting up and
managing Group Policy Objects (GPOs). By following these steps, you can effectively
manage user policies and settings in your domain.
¯\_(ツ)_/¯
This guide explains how to deploy a desktop background for users across multiple
PCs within the same network by sharing the image and applying the configuration
using Group Policy.
o Paste the desired background image (e.g., bg.jpg) into this folder.
o Click Permissions.
Click Add.
Now the folder is shared, and other PCs on the same network can access it.
o Press Enter.
o You should see the Desktop Background folder displayed in the File
Explorer under the Network section.
Forest
Domains
kibria.local
o Click OK.
User Configuration
Policies
Administrative Templates
Desktop
Desktop
o Set it to Enabled.
o In the Wallpaper Name field, type the full path of the shared
wallpaper, such as C:\Desktop Background\bg.jpg.
gpupdate /force
gpresult /r
o Log out from the Admin PC where the policy was configured.
Conclusion
By following these steps, you can successfully deploy a desktop background across
multiple PCs on the same network using Group Policy in Active Directory. This
method allows for centralized control of user desktops, ensuring consistency across
the organization.
¯\_(ツ)_/¯
o Forest
o Domains
o kibria.local
4. Click OK.
o Computer Configuration
o Windows Settings
o Security Settings
o Local Policies
o Security Options
o In the text field, type Warning (or any title you want to display).
o Click OK.
o In the text field, type the message you want to display, such as Hello,
thank you for using this system.
o Click OK.
gpupdate /force
2. Log Off:
o After logging off, press Ctrl + Alt + Delete on the login screen.
o You should now see the Warning title and the Hello, thank you
message displayed on the logon screen.
Conclusion
By following these steps, you have successfully set up an interactive logon banner
that will display a custom message whenever users attempt to log on. This can be
used to show important warnings or messages for all users across the domain.
¯\_(ツ)_/¯
o Paste the 7-Zip MSI file (or any software in MSI format) inside this
folder.
o Click Apply, then OK, and close the advanced sharing settings.
Computer Configuration
Policies
Software Settings
o In the Open window, type the network path to the shared folder you
created (e.g., \\IPDC01\Software).
o In the Deploy Software dialog box, select Assigned, then click OK.
shutdown -r -t 0
1. Log In as Admin:
Important Notes:
Conclusion
By following these steps, you have successfully deployed the 7-Zip software to all
computers in the domain using Group Policy. This method ensures centralized and
Deploying Software with Group Policy Page 3 of 4
automated software deployment across multiple machines, saving time and effort in
manual installations.
¯\_(ツ)_/¯
This guide provides step-by-step instructions to configure roaming profiles for user
accounts in a domain. Roaming profiles allow user settings and files to move with the
user across different machines within the network.
\\IPDC01\Profiles$\paul.hill
By following these steps, you have successfully configured roaming profiles for your
domain users. This allows users' settings, documents, and profiles to follow them
regardless of which computer they log into within the network, ensuring a consistent
user experience across devices.
I'm just going to call this profiles and I'm going to add the dollar sign by hitting shift.
And the number four. Now what this does is it makes the folder hidden so that it's not
easily viewable by people who are just browsing this share path right here.
A non inheriting OU means that the organizational unit is not going to inherit any
group policy objects that are not directly linked to the organizational unit except for
those group policy objects that are enforced.
¯ \_(ツ)_/¯
This guide demonstrates how to create network shares for different user groups and
map these shares to user accounts automatically using Group Policy. Additionally, it
outlines how to restrict access between different groups so that users in one group
cannot access the shared drive of another group.
By setting permissions only for GroupA on the GroupA share and GroupB on
the GroupB share, the access between groups is restricted automatically. Users
from GroupA cannot access GroupB's share, and vice versa.
bash
Copy code
gpupdate /force
Conclusion
By following these steps, you've successfully created network shares for different user
groups and mapped them automatically using Group Policy. Access to each network
share is restricted to members of the respective group, ensuring that GroupA cannot
access GroupB's shared drive and vice versa. This setup streamlines resource
management and enhances security across the domain.
¯ \_(ツ)_/¯
This guide outlines how to configure domain password and account lockout policies
using Group Policy in Active Directory. The goal is to enforce secure password
practices and prevent users from using weak or insecure passwords, as well as ensure
account lockout measures are in place to prevent unauthorized access attempts.
1. Password History:
By setting Enforce Password History to 24, users will not be able to reuse
their last 24 passwords. This encourages users to use new and secure passwords.
2. Password Age:
Setting the Minimum Password Age to 0 allows users to reset their password
immediately if necessary, but still enforces the complexity and history rules.
3. Reversible Encryption:
Always disable Store Passwords Using Reversible Encryption. Storing
passwords this way is a security risk equivalent to having passwords stored in
plain text.
4. Account Lockout:
Account lockouts protect against brute force attacks. However, setting the
lockout duration too long or the threshold too low could inconvenience users, so
strike a balance between security and usability.
Conclusion:
By following these steps, you have enforced secure password policies and account
lockout measures in your domain. This setup ensures that users cannot use weak
passwords, must reset passwords regularly, and are locked out after a set number of
failed login attempts. These measures strengthen domain security and protect against
unauthorized access.
1. Open PowerShell:
o Launch PowerShell with administrative privileges.
2. Import Active Directory Module:
o Run the following command to import the Active Directory module:
powershell
Copy code
Import-Module ActiveDirectory
o This command will display the password expiration date for the user
Paul.
Conclusion:
¯ \_(ツ)_/¯
This guide outlines the steps to configure Windows Firewall rules using Group Policy.
You will create a new Group Policy Object (GPO) to define an inbound rule for a
specific port and then apply the policy to domain computers. Finally, you will verify
the policy application using gpupdate and rsop.msc (Resultant Set of Policy).
gpupdate /force
Conclusion:
By following this guide, you have successfully created and applied a Windows Firewall
inbound rule using Group Policy. This allows you to manage firewall settings centrally
across domain computers. The rule was verified using both gpupdate /force and the
rsop.msc tool to ensure it is correctly applied.
¯ \_(ツ)_/¯
This guide explains how to configure a Windows registry setting using Group Policy to
allow users to right-click on any file in File Explorer and open it with Notepad. This
can be useful for quickly viewing or editing non-text files such as images or DLLs.
However, be cautious when editing the registry, as improper changes may cause system
instability.
By following this guide, you have successfully created and deployed a Group Policy
Object (GPO) to modify the Windows registry. This GPO adds a useful option to right-
click any file in File Explorer and open it with Notepad. As always, ensure you
understand the implications of registry edits before applying them widely in a
production environment.
¯ \_(ツ)_/¯
Here’s how you can set up and enforce Windows Hello for Business in your Windows
Server environment:
Objective: Configure and enforce Windows Hello for Business to allow users to log in
with a PIN instead of a traditional password.
Conclusion:
By following these steps, you can configure Windows Hello for Business to enforce the
use of PINs for user authentication in your Windows Server environment. This setup
enhances security by utilizing modern authentication methods and reduces reliance on
traditional passwords.
¯\_(ツ)_/¯
Objective: Configure separate wallpapers for the lock screen on user PCs within an
Active Directory environment. First create a share folder that contain the background
image, you already learned it.
4. Verification:
Notes:
File Paths: Ensure that the file paths for both wallpapers are accessible to all
users. You may need to use a UNC path if the images are stored on a network
share.
Image Formats: The images should be in a format supported by Windows (e.g.,
JPEG, PNG).
Permissions: Ensure that users have appropriate permissions to read the
wallpaper files from the network share or local path.
Testing: Always test the GPO in a controlled environment before rolling it out
to all users to ensure that the settings apply as expected.
By following these steps, you can set different wallpapers for the desktop and lock
screen for users within your Active Directory environment.
¯ \_(ツ)_/¯
This step-by-step guide will walk you through creating a System State Backup in an
Active Directory environment using Windows Server Backup.
Prerequisites
Step-by-Step Guide:
1. Create a Folder:
o Go to your C: Drive or any other preferred location.
o Create a new folder called Backup.
2. Share the Backup Folder:
o Right-click the Backup folder and select Properties.
o Go to the Sharing tab and click Advanced Sharing.
Additional Notes:
This documentation should help you set up and configure a System State Backup for an
Active Directory environment.
¯ \_(ツ)_/¯
This guide will walk you through the process of deleting an Organizational Unit (OU)
in Active Directory and then restoring it using a System State Backup. This method
helps recover lost AD objects like users, groups, or computers if accidental deletion
occurs.
Prerequisites
Windows Server Backup must already be installed, and a recent System State
Backup should be available. (See the previous documentatino for more details
on how to create a backup).
Administrative access to the server.
A good understanding of the impact of deleting OUs.
Step-by-Step Guide
Part 2: Restoring the Deleted Organizational Unit Using System State Backup
o Wait for a list of backups to appear. Look for the version identifier of
the backup you want to restore (e.g., March 31, 2024).
Important Notes:
This concludes the documentation for restoring an OU using System State Backup in
Active Directory. If further issues arise, please consult your network administrator or
support team.
¯ \_(ツ)_/¯