Does Active Directory Work With Linux?


In this article I’m going to be covering what Active Directory is, how it is used, features, and more. Active Directory (AD) is a directory service developed by Microsoft for Windows domain.A domain is an organized collection of users, groups, computers, and accounts that fall under a hierarchy.

Yes, Windows Active Directory does work with a Linux operating system. There are a couple ways to do this depending on your computing needs, one is to add your Linux machine to a Windows Domain and the other way is to setup a Windows virutal machine on the Linux box. I will cover how to do both in this article.

How To Setup Active Directory on a Linux Machine

To set up Active Directory on a Linux machine, you will need to install and configure a software package called Samba. Samba is a free and open-source software suite that allows Linux and Unix-based systems to participate in a Windows Active Directory environment.

You can install Samba on your Linux machine by using the package manager for your specific distribution. For example, on Ubuntu and Debian, you can use the command “sudo apt-get install samba”. Once Samba is installed, you will need to configure it by editing the smb.conf file, which is typically located in the /etc/samba directory.

 In this file, you will need to specify the details of your Active Directory environment, such as the domain name and the IP address of your AD server. You will also need to join your Linux machine to the Active Directory domain using the net ads join command, and configure Kerberos authentication.

Please make sure to check the samba documentation for more information and detailed steps.

How to Setup Windows Active Directory (AD) on a Virtual Machine (VM) in a Linux Environment

To set up a Windows Active Directory (AD) on a virtual machine (VM) in a Linux environment, you will need to do the following:

  • Create a new virtual machine and install a Windows operating system (OS) on it. The OS should be a version that supports AD, such as Windows Server.
  • Once the Windows OS is installed, set up the network settings for the virtual machine to allow communication with your Linux host and other machines on your network.
  • Install the Active Directory Domain Services role on the Windows VM. This can be done through the Server Manager or by using PowerShell commands.
  • Promote the Windows VM to be a domain controller. This can be done through the Server Manager or by using the dcpromo command.
  • Configure the AD environment, including creating users, groups, and organizational units.
  • If necessary, join other machines on your network to the AD domain by modifying their network settings and adding them to the domain through the System Properties.
  • Install a virtualization software such as VirtualBox or VMware on your Linux machine.

Please note that this is a high-level overview of the process and there are many steps and details that need to be considered for a successful setup. It’s highly recommended to consult the official Microsoft documentation for detailed instructions and best practices.


What is Active Directory and What Are It’s Security Features?

Here is a breakdown of what Active Directory is and how you can use it securely and effectively. Everything in a company’s domain falls under a collection of networks. It provides a hierarchical, domain-based structure for storing and managing information about network resources, including users, computers, and applications.

This allows organizations and agencies to centrally manage users, devices, policies, and much more under one umbrella.

This image has an empty alt attribute; its file name is 5vrz0flf0r8DM0yESDEmca3FFouG8D313tW9emYSTQkGtE934zFHZlIpWrEf3yNwlm3h1PvyGQprmbR6YSgGQB7Hklbmz5mQfxtIgCFo3ny0pF9LFP9uT6eSv-LeTg8e5Dlgq05Y7xiV1AuTTG05XDOsakIooivCDYqpUzQifUEoOiIYC_8xIt_Tm7JauQ

What are the main functions of Active Directory?

Active Directory offers many features for security, authentication, user creation, and more. AD is primarily used for:

  • Authentication: AD verifies the identity of users and computers that are attempting to access network resources.
  • Authorization: AD controls access to network resources based on the authenticated identity of the user or computer.
  • Organization: AD provides a framework for organizing and managing network resources, including users, computers, and applications, in a hierarchical structure.
  • Security: AD provides a centralized location for security information, including user and computer accounts, security policies, and access control lists (ACLs).

Permissions are a big part of AD as well. These basically allow certain access to files, folders, and network resources. Not all users in the domain will have the same permissions. Usually, the permissions are based on their role in the company and what they need to access for their job duties.

Permissions in AD are managed through the use of security principals, which are objects that represent users, computers, and groups. Each security principal has a unique security identifier (SID) *** that is used to identify it within AD. 

This image has an empty alt attribute; its file name is 6pQSlfpjKIekZB6w9lcGnH4mTYb4NFg6EpqPcrigBnpuSCyNfeWV4w8HVzF5sptxYIUkzuoOQMmeDtmKxo95jbONzo3qDxkWTgcgkzYR2oFdFYC4uJ6jf7cnkhoYAGRp0zVpaqb_qoPwIm0EquXMOgjduv6QzRB-40cs9GluqKtw9Qh7CBifsrNe6hz8sw

Windows administrators can assign permissions to security principals by using access control lists (ACLs), which specify the actions that can be performed on a particular resource.

See also  Is Github Really Secure for Private Projects?

Users and groups are the two primary types of security principals in AD. Users represent individuals who have been granted access to network resources, and groups are collections of users. Groups can be used to organize users and to assign permissions to a collection of users at once.

This is especially useful when you have a group of users that have the same job title and role. You would want these users to be in the same group(s) so their access stayed the same across the role.

Here’s what users and groups look like in the local users and groups configuration.

This image has an empty alt attribute; its file name is dMu3ERxP_p4hW35Xq7iVP60hOSBNqXNPxBlJv2FkDuNaJCqDA4HxcpKmz-wfzve6C_LNEBPrXDhSjtUuGZQ1aANXLPqz5mSYxXxJpE_tHedBgsClo_T9jaXYeN7McGmo464_oWVQ7PLVID_FMf0NSHe6Oa0b5TQ8G9LRDQTQl8TzajaEV90X_DDojHtW8g

How does Active Directory Handle Security?


Security in AD is primarily based on the use of authentication and authorization mechanisms. Authentication is the process of verifying the identity of a user or computer, and it is typically accomplished through the use of a password or a digital certificate. 

Authorization is the process of controlling access to network resources based on the authenticated identity of the user or computer.

AD uses a number of different protocols to communicate with clients and other directory services. The most important of these protocols are:

  • Lightweight Directory Access Protocol (LDAP): A standard protocol for accessing and maintaining directory information over a network which runs on port 389.

  • Kerberos: A network authentication protocol that is used to authenticate users and computers in AD. This protocol uses ports 88 and 464.

  • Simple Authentication and Security Layer (SASL): A framework for adding authentication support to connection-based protocols.

  • System Security Services Daemon (SSSD): A service that provides access to different identity and authentication providers, including AD.

  • Network File System (NFS) : A protocol that is used to access remote file systems over a network. NFS uses ports 111 and 2049.

  • Server Message Block (SMB) : A protocol that is used to access remote files, printers, and other resources over a network, it also utilizes ports 445, 137, 138, and 139.

Another huge and very important feature in AD is group policy. This is a feature of the Microsoft Windows operating system that allows administrators to centrally manage and configure settings for users and computers in an Active Directory environment. 

Group Policy Objects (GPOs) can be used to configure settings for Windows, Internet Explorer, and other Microsoft products.

This image has an empty alt attribute; its file name is IsgwiPOjxEPmuCTPLVrtwO-PF5u38kFSoWJp7icl47gxSwTTPIojTp0Vzy4Ou1QLKCmi7somG6ZLTZuLtZm_jYG3n0AlCo6s1vSp20l3yk9sdrjJeM4NwRV22IrmnKkVPHDfUyVhRJbAYz-3kBdsmBrKASx0stvQfy2vi-MlsjPM-sTPjgPmtNW70o5Olw

To find the GPO settings in a Windows Server, you can use the Group Policy Management Console (GPMC), which is a snap-in for the Microsoft Management Console (MMC). 

To open the GPMC, open the Start menu, type “gpmc.msc” and press Enter. The GPMC allows you to manage GPOs for the domain, organizational units, and sites.

To modify GPO settings, you can use the Group Policy Object Editor (GPOE), which is also a snap-in for the MMC. To open the GPOE, right-click a GPO in the GPMC and select “Edit.” 

The GPOE allows you to configure settings for the computer or user, and you can also import or export GPOs

Only Windows administrators or other experienced individuals should ever modify GPO’s. Configuring GPO’s without proper procedure could open your domain up to some serious security threats.

A Windows domain controller is a server that manages users, groups, security groups, distribution groups, forests, and domains in an Active Directory (AD) environment. 

  • Users: A user in AD is an individual who has been granted access to network resources. Users are created in AD and can be assigned to different groups and security groups.
  • Groups: A group in AD is a collection of users that can be managed as a single unit. Groups can be used to manage access to resources, such as file shares or printers. There are two types of groups: security groups and distribution groups.
This image has an empty alt attribute; its file name is hJJfZKso5d-uPgfbIXU3eWmcpv-KgCstCtHl0LNjuFwWA1PPFT59MjBzrwH9YBlcmtW5PGwmnLZCNtFu-bkNQ3eTvg7X2785F_FwBWmEtHBkDGde_ucGOrRS6fG8p6mXiYi9AOGWvIULfpnrvD84QhE4OaEmSWuJbGvUDQCY1DiapW_S9yaGqFtmy3-hPQ
  • Security Groups: Security groups are used to manage access to resources. Members of a security group are granted permissions to resources based on the group’s membership. Security groups can be nested and can contain other security groups.
This image has an empty alt attribute; its file name is 9-CTIcaymsVihYkKXwqDqCn16c_PE_BsBXz0nbXuNhjnUiLbHH5lRRMX5Ab9-HayuP9JF6lStx0LpZ0tA0_c44wFgNdwaHDCdGA7l8NzjsEwe3TkkF_eq1FAgZm4VT_OOlYN13oSoGeawtLecyQ56L3bjsHsFGhl5y-89okSR5G-nkZAYDHHH3Ws3YCVPA
  • Distribution Groups: Distribution groups are used to manage email distribution lists. Members of a distribution group receive email sent to the group’s email address. Distribution groups do not have permissions to resources.
This image has an empty alt attribute; its file name is zZn01TomQUMbKvvZj3BQMq0ounQHUA-SqWkpbwtOxXnw7FBAjmjxwLaZH5ERdXVTvda8d7KaKsJFcQ4fJvy2bYaImAgBb6pZ0nr7tvUm2xHmfCKVZfY8PpZlKUGzLRC6GzTAZ3JA7ln_wqzDhW5wKB6OQTDRM21A8ZDRatNP8kWx8Znajc4SWIFUtJ1Gnw
  • Forests: A forest in AD is a collection of domains that share a common schema and global catalog. A forest can contain multiple domains and can be used to manage a large, complex organization with multiple geographic locations.
  • Domains: A domain in AD is a logical grouping of users and resources. A domain can contain multiple OUs and can be used to manage a specific portion of an organization, such as a department or geographic location.

All these elements are managed by the domain controller. It is responsible for authenticating users and computers and providing access to network resources. 

See also  Can You Get Hacked Without Clicking a Link?

What’s a Domain Controller In Active Directory?

The Domain Controller or DC stores information about users, groups, computers, and other resources in the AD database, which can be searched and managed using AD management tools such as the Active Directory Users and Computers  snap-in. 

The domain controller also replicates the AD database to other domain controllers in the domain, ensuring that all domain controllers have the same information.

Interesting enough, there are different type of Domain Controllers, a writable DC that holds a writable copy of the Active Directory database, and a read-only DC that holds a read-only copy of the Active Directory database, the read-only DCs are introduced in Windows Server 2008 R2 and later versions.

Windows 10 uses a variety of services to function properly. A service performs a certain function such as providing IP addressing for the local machine or allowing a VPN to run.

Here is some information on a few of them:

  • DNS (Domain Name System) service: This service resolves domain names (e.g. www.example.com) to IP addresses. It is responsible for translating human-friendly domain names into the numerical IP addresses that computers use to identify each other on a network.
This image has an empty alt attribute; its file name is ie4-DDcb02tj0pmHK5kXGTa9n3ugj_6iCvUeb63DQy7Oed9Bg6lFqMmXCppprdt-YvpGEPxHeSQYnTNOTZfflwU3-pEMYVQYTiexLlu6WFaAuQHDilOatkb6m62ffqpA3RyVJLPGbmO4AVBYw77gYCtku5LneGhJTIijBprASyQUwUOXAUWYk8QjlVxbBg
  • UPNP (Universal Plug and Play) service: UPNP is a set of networking protocols that allows devices to discover each other on a network and automatically establish

functional network services. It is used to enable features like media streaming, network printing, and more.

This image has an empty alt attribute; its file name is wjlTH0VlE1bTJmvPj8G6EdGeoX4YV5Al5fOadnqLTyNmFadf0SfBaLqXSn22Wc2ZJ5VHNLU9rw1dyDSDDnBJeoxB97viEg7o5uxVX3_P44Ip3vNNFzLtvheCBPpCo6iNfc0Hfvike30DhMIgkHrYufiM8xkN4dZ07oQM-b-8MRCpwv6CI91_JJmaoXYrgw
  • svchost.exe: This is a process that runs multiple Windows services. Each instance of svchost.exe runs a group of services, which helps to keep the services organized and reduce the number of processes running on the system.
This image has an empty alt attribute; its file name is 3_Kcylh_GXb_e1Y77nCnR8VdL4qb-O2R9gv3Mi2dBevhlWarK0oi3NtNGLRzFaegiweDmcTD4BmJ_fwKhWMPhfZbpR70tPgXvaWmfz1iQAQE3G45ZFfFeT6klo5f7gyKm0uvUG8zBC_AfT8wot3eC37hi_hxftATmF9x4jy8HBgiwB8_7k5rMBUWLI4idw
  • LSASS (LSA Shell (Export Version)): This service is responsible for authenticating users who are trying to log in to the system. It also manages security policies and access control for the system.

These are just a few examples of the many services that Windows 10 uses to function properly. Other important services include the Windows Event Log service, which records system and application events, and the Task Scheduler service, which allows you to schedule tasks to run automatically.

This image has an empty alt attribute; its file name is kX9jIAHCT8dXftiM6YOUmEni-wqUmmcPiVWQeLTIyHRTeJekg45HSNvO3x8NWqS28FicqqPXekQe9YQolbYA08upajpK1orgllpLIhlJuVAiibWHXNnj7u7x_GXq09bzQhJ6rehzuzayE4Y1se4ZS8hhhjsXHyZ9zY4j1NWWv2zo6xEvHBpJIoCyO1xH-g



Does Windows Have a Firewall or Anti-Virus?

Yes, absolutely! Windows has both of these tools built into the operating system. Windows Firewall and Microsoft Defender are two security features that work together to protect your computer from potential threats.

Windows Firewall is a software component that controls incoming and outgoing network traffic. It monitors the network traffic and allows or blocks connections based on a set of rules and policies. It helps to prevent unauthorized access to your computer by blocking incoming connections from potentially malicious software and networks.

This image has an empty alt attribute; its file name is -EXaI83A-llwFstD4uRtZxVgJ6hJsgq4X4xWvLYkYEzXgqg9hqmQipfEQEcm70HX-iJZLAffnt6FBJJi5YOg94JYh1gfx2wcGkDu3kz4PA0Zd7Qn4MQtVaq6HERz484GfOY9K-wwY_2_nhW33QxB6lxsq2POv_lsI6rARauILr87Vf4yb-wdRRlkGQDaIw

Microsoft Defender, formerly known as Windows Defender, is an antivirus program that runs on your computer to detect and remove malware.

This image has an empty alt attribute; its file name is JI1UbuI9zMtqEB7QlpA1GANOdunPgsjqHvXqJRWK2MbQ_4aS222awbjWfWa2QJ455EGv5id_Fnme93uX5LJ3hh5yQWG8pQGGUagqi6-rcsbLoMSenLcbWZHsdcF7Tq5KC0BfvR3SlNVTnWnQdP0BI8i2y3jE629teR2-EuVRtKEmKEma32FNv7WTABC_lQ

 It uses a combination of real-time protection, cloud-based threat intelligence, and machine learning to detect and respond to malware and other malicious software. It also includes a feature called “Application Guard” that isolates untrusted websites and apps in a container to prevent malware from infecting your device.

This image has an empty alt attribute; its file name is 8l7ItOdsb60hMF4P_B8yrHIPO2scbcNkfhXWPEaxCRcUbGrgkIveyMD0aJi6Aa5DmJQYoTrVj3Lkx4G2-MXJ3GXoZGLrxK2px5YOmbRFrw9EQgN_lZpdvfw_ArXWw2lX3LLQtut8Qu4jykUwGnJ0uQAgYGz6HvRSMe-zqBABTNLGbaB3JpDJmEEbsgC0TQ

This is a sandbox feature meaning, the untrusted websites & malware is segregated in a safe zone until it can be scanned and quarantined. This allows your device to remain safe from harm.

When a threat is detected, Microsoft Defender will quarantine or remove it, and provide a notification to the user. It also provide the option to submit it to Microsoft for further analysis if necessary.

Both Windows Firewall and Microsoft Defender are designed to work together to provide multiple layers of security for your computer. Windows Firewall helps to block unauthorized access, while Microsoft Defender scans for and removes malware that may have bypassed the firewall. Together, they help to keep your computer safe from a wide range of potential threats, including viruses, spyware, and other malicious software.

How Does Windows Active Directory Log Events?

Windows uses the Windows Event Viewer to log detailed system information during security, application, and system events. It also allows you to view detailed information about system events and warnings, such as system crashes, security breaches, and hardware failures. The Event Viewer is divided into three logs: the System log, the Application log, and the Security log.

  1. The System log contains events generated by the operating system, such as system startup and shutdown, driver and service installations and removals, and hardware events.
  2. The Application log contains events generated by applications and services, such as application crashes and service failures.
  3. The Security log contains events related to security, such as successful and failed logons, privilege use, and system resource access.

Each event in the Event Viewer has a unique Event ID that can be used to identify the type of event. The Event ID is a numerical value that corresponds to a specific event or warning. For example, Event ID 6008 indicates an unexpected shutdown, Event ID 7023 indicates a service failure, and Event ID 4624*** indicates a successful logon.

See also  Does HTTPS Work Without a Certificate? A Simple Answer

This image has an empty alt attribute; its file name is image-15.png

It is always a good idea for admins and engineers to become familiar with the different event ID’s as they can run certain tools that search for those events quicker than by hand. 

This is especially true with security software like security information and event management/security orchestration, automation, and response (SIEM/SOAR) tools.

The Windows Registry is a hierarchical database that stores configuration settings and options for the operating system, applications, and users. It contains information such as the software and hardware installed on the computer, the settings for the operating system and applications, and the users and groups on the computer. 

The registry is used by the operating system and applications to store and retrieve configuration settings, and it is also used by system administrators to make changes to the system configuration.

This image has an empty alt attribute; its file name is f3SLSiXnXK8h5nvGmTF4S933seFRLQVxZBYikBVtkDumALHBd2oiD9er_SL2NPSPftS7iiqv6I-arouA4KUKO2AsNmw3W25w5JAP6u9QVQf2ynrNgjp9tUbCHKZGn49g4C5jg5ZC_8DpqLCzsT5WdxGVV3sdsYkyhwy7FUd_rP8mpZB98AsRWa7lsWJXDA

The registry is divided into several “hives” that contain different types of information. The most important hives include:

  1. HKEY_LOCAL_MACHINE: This hive contains configuration settings that apply to the entire computer, such as the software and hardware installed on the computer, the settings for the operating system and applications, and the users and groups on the computer.
  2. HKEY_CURRENT_USER: This hive contains configuration settings that apply to the currently logged-in user, such as the desktop background and the settings for the user’s applications.
  3. HKEY_USERS: This hive contains configuration settings for all users on the computer, including the default settings for new users.
  4. HKEY_CLASSES_ROOT: This hive contains information about file associations, OLE and COM objects, and registered applications.

The registry is a powerful tool, but it can be dangerous if not handled with care. Incorrectly editing the registry can cause serious problems, such as rendering the system unbootable. 

It is important to make a backup of the registry before making any changes, and to be familiar with the structure and contents of the registry before making any changes.

As a general rule, you should not modify the registry without first fully understanding your task and the risks involved with it. This is especially true if the registry you are looking at belongs to a system owned by a client or third-party.

Another security feature in Windows is user account control. *** User Account Control (UAC) helps to prevent unauthorized changes to the system. It is designed to prevent malware and other malicious software from making changes to the system without the user’s knowledge or consent.

When UAC is enabled, Windows will prompt the user for permission before allowing an application or process to make changes to the system. This helps to prevent malware and other malicious software from making changes to the system without the user’s knowledge or consent.

UAC works by dividing the user accounts on a Windows system into two levels: standard users and administrators. Standard users are limited in their ability to make changes to the system, and they are prompted for permission before making changes. Administrators, on the other hand, have full access to the system and can make changes without being prompted for permission.

This image has an empty alt attribute; its file name is LpOscRbgHUQBmg7FZBtvNPEJ5v8DapxuyFbaxC7BWUB9YuNQOZ1xcFCkCgzhqRSjCZUhzF7bV9E1oSnBFUrIfRErOQ70LrGXoS4nuKtEBfrfwuUpQGmkeyXig_v0Czsu57Ss33YPte_WCjAgSnO3BLuByrC4E5h-TgIJOHTmso8HpCGP3l224WM93HyZRA

UAC also includes a feature called “Admin Approval Mode” that require the user to confirm the execution of the app with admin rights. This feature helps to prevent malicious software from running on the system with admin rights, which can be used to make changes to the system that the user may not want or expect.

This image has an empty alt attribute; its file name is aSJKwFGYpIinWElkplQI-JyqhxVFnCmsLutIsLchPec2gdP6KtB7r3OObQVmjQOwdGAGjPwpIQbHXtiB2IcR7C_UU3wLC28hvoLBs9MzX69A0Ob506i5IT74HYBAamwWZ93eOOmFTAOj3qrxZ_JzmUzum8N3Ez4tD-8eAHFUHy1Sa4mtFhxJ9rJfSfpKmg

UAC is an important security feature that helps to prevent unauthorized changes to the system and protect the system from malware and other malicious software. By prompting the user for permission before allowing changes to be made, UAC helps to ensure that the user is aware of what is happening on the system and can take appropriate action if necessary. 

Additionally, the feature of “Admin Approval Mode” helps to prevent malicious software from running with administrator rights which is a great way to prevent any malicious operation from happening.

In summary, Active Directory can perform many tasks for an organization from account provisioning to authentication. Active Directory is an important component of a Windows network infrastructure and it provides a centralized location for storing and managing information about network resources, including users, computers, and applications.

It is a great feature in Windows Server. For anyone wanting to learn about Active Directory it would be beneficial to download a virtual machine of the evaluation version for free and practice your Windows skills!

Scroll to Top