<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Btastan</id>
	<title>ICO wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.itcollege.ee/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Btastan"/>
	<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php/Special:Contributions/Btastan"/>
	<updated>2026-06-20T10:12:21Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=126372</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=126372"/>
		<updated>2017-11-09T09:50:34Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Instructor: Belgin TAŞTAN&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
&lt;br /&gt;
How to Configure a Printer in Windows&lt;br /&gt;
&lt;br /&gt;
Setting up Printers via Group Policy&lt;br /&gt;
&lt;br /&gt;
Setting as a default printer&lt;br /&gt;
&lt;br /&gt;
How to use Group Policy settings to control printers in Active Directory&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
Configure VPN in Windows Server &lt;br /&gt;
&lt;br /&gt;
Configure DHCP Relay Agent&lt;br /&gt;
&lt;br /&gt;
Configure and Enable Routing and Remote Access&lt;br /&gt;
&lt;br /&gt;
Creating VPN Connection&lt;br /&gt;
&lt;br /&gt;
Client Connectivity Testing&lt;br /&gt;
&lt;br /&gt;
     4. Assignment;&lt;br /&gt;
     Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered by &lt;br /&gt;
     the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 24th of May at 24:00 Homework suppose &lt;br /&gt;
     to include screen capture and explanation with your own words in pdf format. Name_Surname.pdf format email it as an attachment &lt;br /&gt;
     to belgin.tastan@itcollege.ee&lt;br /&gt;
     Install and configure VPN in Windows Server and show client connectivity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Mimikatz &lt;br /&gt;
&lt;br /&gt;
One of the most interesting tools in a penetration tester’s arsenal is mimikatz. Mimikatz is a tool that scrapes the memory of the process responsible for Windows authentication(LSASS) and reveals cleartext passwords and NTLM hashes that an attacker can use to pivot around a network. From that point they escalate privilege either by authenticating with the clear text credentials or passing the hash. &lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122767</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122767"/>
		<updated>2017-05-24T12:27:33Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
&lt;br /&gt;
How to Configure a Printer in Windows&lt;br /&gt;
&lt;br /&gt;
Setting up Printers via Group Policy&lt;br /&gt;
&lt;br /&gt;
Setting as a default printer&lt;br /&gt;
&lt;br /&gt;
How to use Group Policy settings to control printers in Active Directory&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
Configure VPN in Windows Server &lt;br /&gt;
&lt;br /&gt;
Configure DHCP Relay Agent&lt;br /&gt;
&lt;br /&gt;
Configure and Enable Routing and Remote Access&lt;br /&gt;
&lt;br /&gt;
Creating VPN Connection&lt;br /&gt;
&lt;br /&gt;
Client Connectivity Testing&lt;br /&gt;
&lt;br /&gt;
     4. Assignment;&lt;br /&gt;
     Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered by &lt;br /&gt;
     the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 24th of May at 24:00 Homework suppose &lt;br /&gt;
     to include screen capture and explanation with your own words in pdf format. Name_Surname.pdf format email it as an attachment &lt;br /&gt;
     to belgin.tastan@itcollege.ee&lt;br /&gt;
     Install and configure VPN in Windows Server and show client connectivity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Mimikatz &lt;br /&gt;
&lt;br /&gt;
One of the most interesting tools in a penetration tester’s arsenal is mimikatz. Mimikatz is a tool that scrapes the memory of the process responsible for Windows authentication(LSASS) and reveals cleartext passwords and NTLM hashes that an attacker can use to pivot around a network. From that point they escalate privilege either by authenticating with the clear text credentials or passing the hash. &lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122563</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122563"/>
		<updated>2017-05-18T10:58:56Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
&lt;br /&gt;
How to Configure a Printer in Windows&lt;br /&gt;
&lt;br /&gt;
Setting up Printers via Group Policy&lt;br /&gt;
&lt;br /&gt;
Setting as a default printer&lt;br /&gt;
&lt;br /&gt;
How to use Group Policy settings to control printers in Active Directory&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
Configure VPN in Windows Server &lt;br /&gt;
&lt;br /&gt;
Configure DHCP Relay Agent&lt;br /&gt;
&lt;br /&gt;
Configure and Enable Routing and Remote Access&lt;br /&gt;
&lt;br /&gt;
Creating VPN Connection&lt;br /&gt;
&lt;br /&gt;
Client Connectivity Testing&lt;br /&gt;
&lt;br /&gt;
     4. Assignment;&lt;br /&gt;
     Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered by &lt;br /&gt;
     the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 24th of May at 24:00 Homework suppose &lt;br /&gt;
     to include screen capture and explanation with your own words in pdf format. Name_Surname.pdf format email it as an attachment &lt;br /&gt;
     to belgin.tastan@itcollege.ee&lt;br /&gt;
     Install and configure VPN in Windows Server and show client connectivity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122536</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122536"/>
		<updated>2017-05-15T08:35:13Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
&lt;br /&gt;
How to Configure a Printer in Windows&lt;br /&gt;
&lt;br /&gt;
Setting up Printers via Group Policy&lt;br /&gt;
&lt;br /&gt;
Setting as a default printer&lt;br /&gt;
&lt;br /&gt;
How to use Group Policy settings to control printers in Active Directory&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
Configure VPN in Windows Server &lt;br /&gt;
&lt;br /&gt;
Configure DHCP Relay Agent&lt;br /&gt;
&lt;br /&gt;
Configure and Enable Routing and Remote Access&lt;br /&gt;
&lt;br /&gt;
Creating VPN Connection&lt;br /&gt;
&lt;br /&gt;
Client Connectivity Testing&lt;br /&gt;
&lt;br /&gt;
     4. Assignment;&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122535</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122535"/>
		<updated>2017-05-15T08:34:21Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
&lt;br /&gt;
How to Configure a Printer in Windows&lt;br /&gt;
&lt;br /&gt;
Setting up Printers via Group Policy&lt;br /&gt;
&lt;br /&gt;
Setting as a default printer&lt;br /&gt;
&lt;br /&gt;
How to use Group Policy settings to control printers in Active Directory&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
Configure VPN in Windows Server &lt;br /&gt;
&lt;br /&gt;
Configure DHCP Relay Agent&lt;br /&gt;
&lt;br /&gt;
Configure and Enable Routing and Remote Access&lt;br /&gt;
&lt;br /&gt;
Creating VPN Connection&lt;br /&gt;
&lt;br /&gt;
Client Connectivity Testing&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122534</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122534"/>
		<updated>2017-05-15T08:30:05Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
&lt;br /&gt;
How to Configure a Printer in Windows&lt;br /&gt;
&lt;br /&gt;
Setting up Printers via Group Policy&lt;br /&gt;
&lt;br /&gt;
Setting as a default printer&lt;br /&gt;
&lt;br /&gt;
How to use Group Policy settings to control printers in Active Directory&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122533</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122533"/>
		<updated>2017-05-15T08:27:41Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
Storage Options &lt;br /&gt;
&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122532</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122532"/>
		<updated>2017-05-15T08:27:16Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
 Storage Options &lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122531</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122531"/>
		<updated>2017-05-15T08:26:34Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
 Exchange Server Installation&lt;br /&gt;
&lt;br /&gt;
 Configure Exchange Server to Send and Receive Outside Email&lt;br /&gt;
&lt;br /&gt;
 Configuring Outlook for Users&lt;br /&gt;
&lt;br /&gt;
 Edge Transport Server Role—Establishing Perimeter Security&lt;br /&gt;
&lt;br /&gt;
 Client Access Server Role—Providing User Connectivity&lt;br /&gt;
&lt;br /&gt;
 Hub Transport Servers—Routing the Mail&lt;br /&gt;
&lt;br /&gt;
 Unified Messaging Servers—Combining All the Data&lt;br /&gt;
&lt;br /&gt;
 Mailbox Servers—What It’s All About&lt;br /&gt;
&lt;br /&gt;
 Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
 Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
 Storage Options &lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122530</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122530"/>
		<updated>2017-05-15T08:19:29Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
 Mailbox High Availability &lt;br /&gt;
&lt;br /&gt;
 Disaster Recovery &lt;br /&gt;
&lt;br /&gt;
 Storage Options &lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122489</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=122489"/>
		<updated>2017-05-13T18:27:03Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Exchange Server&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121693</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121693"/>
		<updated>2017-05-09T06:14:24Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered   &lt;br /&gt;
&lt;br /&gt;
          by the deadline, the assignment is considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
          Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
          Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
          Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
          - Deployment Share folder is with student name.&lt;br /&gt;
          - Task Sequence ID is with student (ID) number.&lt;br /&gt;
          - Internet explorer name is with student blog-web name.&lt;br /&gt;
          - User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
          Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
          - OU name is with student name_OU&lt;br /&gt;
          - MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
          Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121692</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121692"/>
		<updated>2017-05-09T06:09:33Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment; &lt;br /&gt;
          Grading criteria for each assignment will be provided with the instructions for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
considered to be failed. Plagiarism is not allowed. Deadline is 15 th of May at 24:00&lt;br /&gt;
&lt;br /&gt;
Homework suppose to include screen capture and explanation with your own words in pdf format.&lt;br /&gt;
  &lt;br /&gt;
  Name_Surname.zip format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Deploy Windows 7 with Office 2010&lt;br /&gt;
&lt;br /&gt;
- Deployment Share folder is with student name.&lt;br /&gt;
- Task Sequence ID is with student (ID) number.&lt;br /&gt;
- Internet explorer name is with student blog-web name.&lt;br /&gt;
- User credentials is with student name.&lt;br /&gt;
&lt;br /&gt;
Deploy an MSI Package with GPO&lt;br /&gt;
&lt;br /&gt;
- OU name is with student name_OU&lt;br /&gt;
- MSI Package is 7 zip or winrar&lt;br /&gt;
&lt;br /&gt;
Total: Please add your both Windows 7 with Office 2010 and MSI Package file in to zip folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121395</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121395"/>
		<updated>2017-05-08T06:41:02Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages&lt;br /&gt;
 &lt;br /&gt;
          3. Assignment;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121393</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121393"/>
		<updated>2017-05-08T06:37:03Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
Installation and Configuration DHCP&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring WDS (Windows Deployment Services): Full Images Deployment&lt;br /&gt;
&lt;br /&gt;
*  Installing and Configuring Microsoft Deployment Toolkit (MDT): Deploying Windows 7 + Office 2010 &lt;br /&gt;
&lt;br /&gt;
*  Deploying Software Using Group Policy : MSI Packages &lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121390</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121390"/>
		<updated>2017-05-08T06:31:16Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
&lt;br /&gt;
Components of DHCP&lt;br /&gt;
&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
&lt;br /&gt;
DHCP message format&lt;br /&gt;
&lt;br /&gt;
DHCP procedures&lt;br /&gt;
&lt;br /&gt;
-allocating new address&lt;br /&gt;
&lt;br /&gt;
-lease renewal&lt;br /&gt;
&lt;br /&gt;
State machine&lt;br /&gt;
&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121389</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121389"/>
		<updated>2017-05-08T06:30:13Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*  DHCP: Dynamic Host Configuration Protocol&lt;br /&gt;
What is DHCP, and when &amp;amp; where is it used?&lt;br /&gt;
Components of DHCP&lt;br /&gt;
BOOTP and DHCP relation&lt;br /&gt;
DHCP message format&lt;br /&gt;
DHCP procedures&lt;br /&gt;
allocating new address&lt;br /&gt;
lease renewal&lt;br /&gt;
State machine&lt;br /&gt;
Questions &amp;amp; answers re. DHCP&lt;br /&gt;
Benefits of DHCP&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121288</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=121288"/>
		<updated>2017-05-07T15:05:21Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mendatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120398</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120398"/>
		<updated>2017-04-24T06:00:09Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mandatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operations Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120397</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120397"/>
		<updated>2017-04-24T05:56:30Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mandatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operationa Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller; Child domains can represent geographical entities (for example, the United States and Europe), administrative entities within the organization (for example, sales and marketing departments), or other organization-specific boundaries, according to the needs of the organization. Domains are created below the root domain to minimize Active Directory replication and to provide a means for creating domain names that do not change. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120396</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120396"/>
		<updated>2017-04-24T05:54:25Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mandatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
Groups; Global Groups, Universal Groups, Domain Local Groups.&lt;br /&gt;
&lt;br /&gt;
Organizational Units; Geographicall or Business Based.&lt;br /&gt;
&lt;br /&gt;
One way - Two way Trust.&lt;br /&gt;
&lt;br /&gt;
Sites&lt;br /&gt;
&lt;br /&gt;
Forest - wide operationa Master Roles (FSMO); Schema and Domain Naming Master Roles.&lt;br /&gt;
&lt;br /&gt;
Domain - wide Operations Master Roles; Primary Domain Controller (PDC), Relative ID (RID), Infrastructure master role.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
*  Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Additional Domain Controller&lt;br /&gt;
&lt;br /&gt;
*  Read Only Domain Controller; Read Only Active Directory Database and GC PASS, Only allowed user passwords are stored on RODC, Uniderectional Replication, Role Seperation.&lt;br /&gt;
Increase security for remote Domain Controllers where physical security cannot be guaranteed.&lt;br /&gt;
&lt;br /&gt;
*  Child Domain Controller&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120326</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120326"/>
		<updated>2017-04-18T09:56:39Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mandatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120325</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120325"/>
		<updated>2017-04-18T09:56:20Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mandatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120324</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120324"/>
		<updated>2017-04-18T09:56:04Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
Exam Dates:&lt;br /&gt;
&lt;br /&gt;
26 May 2017 Lab Exam %50 Mandatory&lt;br /&gt;
&lt;br /&gt;
29 May 2017 Lab Exam %50 People who failed previous examination &lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120172</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120172"/>
		<updated>2017-04-17T10:23:28Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu&lt;br /&gt;
   OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local &lt;br /&gt;
   Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings&lt;br /&gt;
   for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 &lt;br /&gt;
   characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of &lt;br /&gt;
   this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120171</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120171"/>
		<updated>2017-04-17T10:22:11Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment; Grading criteria for each assignment will be provided with the instructions&lt;br /&gt;
   for the assignment. If the assignment is not delivered by the deadline, the assignment is&lt;br /&gt;
   considered to be failed. Plagiarism is not allowed. Deadline is 24 th of April&lt;br /&gt;
   &lt;br /&gt;
   Name_Surname.pdf format email it as an attachment to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
   Active Directory runs on Windows Server 2012 R2, Domain Name suppose to be surname of student. There should be Central, Tartu and Parnu OUs. There should be at least 2 users in each OUs. There has to be at least one pc in this domain. Group Policy settings; Reset Local Administrator Password, Windows Firewall with Advanced Security for client machine. User Account Control (UAC), Password Policy settings for users. Password Policy; Central OU is with 13 characters and complex. Tartu OU is with 10 characters and complex. Parnu OU is with 8 characters and not complex. Users of Tartu and Parnu OUs should logon to their computers during work time which is 09:00-18:00 instead of this time users have to log off.&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120015</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120015"/>
		<updated>2017-04-11T10:26:37Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment;&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120014</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120014"/>
		<updated>2017-04-11T10:25:50Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
    Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
    Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a       Volume ).&lt;br /&gt;
&lt;br /&gt;
    Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
    Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment;&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120013</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120013"/>
		<updated>2017-04-11T10:24:23Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
    1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   2. Assignment;&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120012</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=120012"/>
		<updated>2017-04-11T10:21:59Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Installing and Configuring Active Directory on Server 2012 R2, Server 2016.&lt;br /&gt;
&lt;br /&gt;
- Creating Organizational Units and users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119802</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119802"/>
		<updated>2017-04-03T07:53:09Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
&lt;br /&gt;
- GPO Components&lt;br /&gt;
&lt;br /&gt;
- GPO Work Steps&lt;br /&gt;
&lt;br /&gt;
- Modifying Group Policy Processing&lt;br /&gt;
&lt;br /&gt;
- WMI Filter &lt;br /&gt;
&lt;br /&gt;
- Loopback Processing &lt;br /&gt;
&lt;br /&gt;
- Backup and Restore GPO&lt;br /&gt;
&lt;br /&gt;
- Fine-grained passwords&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119801</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119801"/>
		<updated>2017-04-03T07:21:17Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
- To join computers running Windows Server 2008 R2&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119799</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119799"/>
		<updated>2017-04-03T07:04:48Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
- Creating new user accounts&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119798</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=119798"/>
		<updated>2017-04-03T06:42:20Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
Resource Records and Records Types&lt;br /&gt;
&lt;br /&gt;
Forward and Reverse Lookup Zone&lt;br /&gt;
&lt;br /&gt;
DNS Replication&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
&lt;br /&gt;
- AD DS Physical Components&lt;br /&gt;
&lt;br /&gt;
Domain Controllers,&lt;br /&gt;
Global Catalog Servers,&lt;br /&gt;
Data Store,&lt;br /&gt;
Replication,&lt;br /&gt;
Sites. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- AD DS Logical Components&lt;br /&gt;
&lt;br /&gt;
AD DS Schema,&lt;br /&gt;
The Basics,&lt;br /&gt;
Trusts,&lt;br /&gt;
AD DS Objects.&lt;br /&gt;
&lt;br /&gt;
- Protocol&lt;br /&gt;
&lt;br /&gt;
- What is Authentication? &lt;br /&gt;
&lt;br /&gt;
- What is Authorization? &lt;br /&gt;
&lt;br /&gt;
- Why Deploy AD DS? &lt;br /&gt;
&lt;br /&gt;
- Centralized Network Management&lt;br /&gt;
&lt;br /&gt;
- Requirements for Installing AD DS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS and DNS&lt;br /&gt;
&lt;br /&gt;
- Overview of AD DS Components &lt;br /&gt;
&lt;br /&gt;
Installation and Management AD&lt;br /&gt;
&lt;br /&gt;
Observe the installation of AD DS&lt;br /&gt;
Active Directory Users and Computers&lt;br /&gt;
Active Directory Administrative Center&lt;br /&gt;
Active Directory Sites and Services&lt;br /&gt;
&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118916</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118916"/>
		<updated>2017-03-20T07:35:58Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components;&lt;br /&gt;
The name space,&lt;br /&gt;
The servers,&lt;br /&gt;
The resolvers.&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118915</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118915"/>
		<updated>2017-03-20T07:35:25Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
The name space&lt;br /&gt;
The servers&lt;br /&gt;
The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118914</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118914"/>
		<updated>2017-03-20T07:35:03Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
 The name space&lt;br /&gt;
 The servers&lt;br /&gt;
 The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118913</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118913"/>
		<updated>2017-03-20T07:34:41Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
  The name space&lt;br /&gt;
  The servers&lt;br /&gt;
  The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118912</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118912"/>
		<updated>2017-03-20T07:34:13Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
  The name space&lt;br /&gt;
  The servers&lt;br /&gt;
  The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118911</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118911"/>
		<updated>2017-03-20T07:33:52Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
  The name space&lt;br /&gt;
  The servers&lt;br /&gt;
  The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118910</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118910"/>
		<updated>2017-03-20T07:33:27Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
&lt;br /&gt;
  The name space&lt;br /&gt;
  The servers&lt;br /&gt;
  The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118909</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118909"/>
		<updated>2017-03-20T07:32:40Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
&lt;br /&gt;
- Understanding and Managing DNS&lt;br /&gt;
&lt;br /&gt;
- Introduction to the DNS&lt;br /&gt;
&lt;br /&gt;
- DNS Components&lt;br /&gt;
&lt;br /&gt;
  The name space&lt;br /&gt;
&lt;br /&gt;
  The servers&lt;br /&gt;
&lt;br /&gt;
  The resolvers&lt;br /&gt;
&lt;br /&gt;
- DNS Structure and Hierarchy&lt;br /&gt;
&lt;br /&gt;
- The DNS in Context&lt;br /&gt;
&lt;br /&gt;
NOTE: Everyone will bring an example of Amplification attacks to talk about.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118613</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118613"/>
		<updated>2017-03-17T09:38:19Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
- Firewall should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Defender should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Windows Update should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Smart Screen should disabled in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- User Account Control Settings should force to low level&lt;br /&gt;
&lt;br /&gt;
- IPV6 should force to Up and Running in Group Policy Object Editor&lt;br /&gt;
&lt;br /&gt;
- Audit Logs should force to disabled in Group Policy Object Editor &lt;br /&gt;
&lt;br /&gt;
- C$ Restriction. User Configuration &amp;gt; Administrative Templates &amp;gt; Windows Components &amp;gt; Windows Explorer - &amp;quot;Hide these specified drives in My Computer&amp;quot; and &amp;quot;Prevent access to drives from My Computer&amp;quot;. Both are set to &amp;quot;Enabled&amp;quot; with the option &amp;quot;Restrict C drive only&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118612</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118612"/>
		<updated>2017-03-17T09:26:28Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118611</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118611"/>
		<updated>2017-03-17T09:25:46Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 Instructions&lt;br /&gt;
From a computer :&lt;br /&gt;
&lt;br /&gt;
1.open Powershell as administrator&lt;br /&gt;
2.make sure that executionpolicy allow script execution&lt;br /&gt;
3.Type : resetlocalAdminpassword.ps1 -newpassword &amp;lt;password&amp;gt;&lt;br /&gt;
where &amp;lt;password&amp;gt; is the new value of your password&lt;br /&gt;
https://gallery.technet.microsoft.com/Reset-Local-Administrator-e3023c3a&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118610</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118610"/>
		<updated>2017-03-17T09:13:15Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
- Local Admin Password changing with PowerShell.exe&lt;br /&gt;
&lt;br /&gt;
 The syntax for the Reset-LocalAdminPassword.ps1 script is:&lt;br /&gt;
&lt;br /&gt;
Reset-LocalAdminPassword.ps1 [-ComputerName &amp;lt;String[]&amp;gt;]&lt;br /&gt;
  [-Password &amp;lt;SecureString&amp;gt;] [-Confirm] [-Verbose] [-WhatIf]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118559</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118559"/>
		<updated>2017-03-13T09:14:36Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
- RAID 00&lt;br /&gt;
&lt;br /&gt;
- RAID 50&lt;br /&gt;
&lt;br /&gt;
- RAID 60&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118558</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118558"/>
		<updated>2017-03-13T09:12:16Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118557</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118557"/>
		<updated>2017-03-13T09:11:32Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* Practice 13 March */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
	<entry>
		<id>https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118556</id>
		<title>Category:I804 Linux Windows administration</title>
		<link rel="alternate" type="text/html" href="https://wiki.itcollege.ee/index.php?title=Category:I804_Linux_Windows_administration&amp;diff=118556"/>
		<updated>2017-03-13T09:09:24Z</updated>

		<summary type="html">&lt;p&gt;Btastan: /* General information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Linux/Windows administration=&lt;br /&gt;
&lt;br /&gt;
==General information==&lt;br /&gt;
&lt;br /&gt;
In this course we will take a look at how Linux and Windows machines are administered.&lt;br /&gt;
&lt;br /&gt;
Assume that from previous courses there is familiarity with: basic virtualization, networks, partitions, filesystems, BIND9.&lt;br /&gt;
&lt;br /&gt;
sharing document: https://onedrive.live.com/?authkey=%21AFAxtpKI_r5cX6c&amp;amp;id=93040B43356F2D88%21116648&amp;amp;cid=93040B43356F2D88&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Windows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* IP Configuration &amp;amp; Subnetting&lt;br /&gt;
-IP Adresses and Classes&lt;br /&gt;
&lt;br /&gt;
-Subnet Mask&lt;br /&gt;
&lt;br /&gt;
-Subnetting&lt;br /&gt;
&lt;br /&gt;
-Loopback IP Adress&lt;br /&gt;
&lt;br /&gt;
-Public and Private IP Adresses&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Windows Client Configuration&lt;br /&gt;
-Introduction to Editions &amp;amp; Features&lt;br /&gt;
&lt;br /&gt;
-Create John, Elena and Steve users. John suppose to logon same computer Monday-Friday at 08:00-18:00, Elena Saturday-Sunday at 08:00-18:00, &lt;br /&gt;
Steve Monday-Friday at 18:00-02:00.&lt;br /&gt;
&lt;br /&gt;
-Group Policy Object Editor Examples; All users can&#039;t configure IP. Password Length must be 7 characters. &lt;br /&gt;
Password must meet complexity requirements. Internet home page must be www.itcollege.ee . No more USB drivers. No usage of Control Panel. No CMD.&lt;br /&gt;
I want to see as an Administrator who logged into my computer and when with different user credentials. No changes in system time. &lt;br /&gt;
&lt;br /&gt;
-Sharing Folder Examples; &lt;br /&gt;
Create a new folder name with &amp;quot;Sharing Folder&amp;quot; John and Elena Read Permission, Steve Read/Write Permission. Back Up Operating System chose target as &amp;quot;Sharing Folder&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
-Bitlocker to Go USB drive increption. &lt;br /&gt;
&lt;br /&gt;
-Bitdefender virus/malware protection configuration. &lt;br /&gt;
&lt;br /&gt;
-Powershell code examples; Get-Service, &lt;br /&gt;
Get-Process, Get-ExecutionPolicy, ping www.google.com , Get-Process | Format-List, Get-Job, Get-ScheduledJob, Get-Module –ListAvailable, Test-Connection localhost, Get-EventLog system, Clear-EventLog.&lt;br /&gt;
&lt;br /&gt;
-Direct Access Configuration.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Installing.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Windows Server Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction to Editions &amp;amp; Features ( 2008 R2, 2012 R2, 2016 )&lt;br /&gt;
&lt;br /&gt;
-Initial Configuration with Task Wizard ( Time, Name, IP, Update )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Hyper-V Configuration&lt;br /&gt;
&lt;br /&gt;
-Introduction of Hyper-V Manager ( Create New Machine, Import Virtual Machine, Edit Disk, Import Disk, Virtual Network Manager, Save&amp;amp;Pause States, Hyper-V Settings )&lt;br /&gt;
&lt;br /&gt;
-Live Migration Process&lt;br /&gt;
&lt;br /&gt;
-Fail over Cluster Manager ( Cluster Shared Volume, Cluster Storage )&lt;br /&gt;
&lt;br /&gt;
-Overview of System Center Virtual Machine Manager &lt;br /&gt;
&lt;br /&gt;
-Disk Configuration ( Fixed Size, Dynamically Expanding, Differencing )&lt;br /&gt;
&lt;br /&gt;
-PowerShell codes for managing Hyper-V objects, including VMs, network adapters and VHDs.&lt;br /&gt;
&lt;br /&gt;
-Hyper-V Replica&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Virtualization&lt;br /&gt;
&lt;br /&gt;
-Introduction to Server and Network Virtualization&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Disk Configuration&lt;br /&gt;
&lt;br /&gt;
-Disk Management ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume )&lt;br /&gt;
&lt;br /&gt;
1. Assignment; Windows Server 2008 R2 Disk Configuration and Hyper-V Configuration.&lt;br /&gt;
Implement Disk and Hyper-V Configurations with explanations and screen captures.&lt;br /&gt;
&lt;br /&gt;
Disk Configuration ( Dynamic Disk, Master Boot Record, GUID Partition Table, Spanned Volume, Stripped Volume, Mirrored Volume, RAID-5 Volume, Extending a Volume, Shrinking a Volume, Adding a Mirror to a Volume ).&lt;br /&gt;
&lt;br /&gt;
Hyper-V Configuration ( Cluster Shared Volumes, Live Migration )&lt;br /&gt;
&lt;br /&gt;
Email to belgin.tastan@itcollege.ee&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Server Back-up&lt;br /&gt;
&lt;br /&gt;
-Full Back Up&lt;br /&gt;
&lt;br /&gt;
-Incremental Backup&lt;br /&gt;
&lt;br /&gt;
-Differential Backup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
-Bare Metal&lt;br /&gt;
&lt;br /&gt;
-System State&lt;br /&gt;
&lt;br /&gt;
-Full&lt;br /&gt;
&lt;br /&gt;
-Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
-Files or Volumes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating Fail Over Cluster&lt;br /&gt;
&lt;br /&gt;
-Adding Disks to a Cluster&lt;br /&gt;
&lt;br /&gt;
-Creating a Cluster Shared Volume ( CSV )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Redundant Array of Independent Disks ( RAID ) Types&lt;br /&gt;
&lt;br /&gt;
- RAID 0&lt;br /&gt;
&lt;br /&gt;
- RAID 1&lt;br /&gt;
&lt;br /&gt;
- RAID 5&lt;br /&gt;
&lt;br /&gt;
- RAID 10 ( 1+0 )&lt;br /&gt;
&lt;br /&gt;
- RAID 6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Exercises&lt;br /&gt;
&lt;br /&gt;
-Adding 2 more disks and make it mirror disk. Take Bare Metal Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
-Adding 1 more disk and take Full Backup in to this location.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* DNS Configuration&lt;br /&gt;
* Active Directory&lt;br /&gt;
* Setting up GPO-s&lt;br /&gt;
* Remotely configuring workstations&lt;br /&gt;
* Virtual Private Network&lt;br /&gt;
* Printer Configuration&lt;br /&gt;
* Exchange Server&lt;br /&gt;
&lt;br /&gt;
https://www.itcollege.ee/tudengile/oppehoone/tehnika-kasutamine/#Microsoft&lt;br /&gt;
&lt;br /&gt;
==Practice 13 March==&lt;br /&gt;
(Added by Ender)&lt;br /&gt;
&lt;br /&gt;
- Add/remove features&lt;br /&gt;
- Add Windows backup&lt;br /&gt;
* Adding disks&lt;br /&gt;
- 2 more disk (Make it mirror). Take bare metal backup&lt;br /&gt;
* Add more disk&lt;br /&gt;
In D drive create &amp;quot;shared folders&amp;quot; take full backup&lt;br /&gt;
* Backup types:&lt;br /&gt;
&lt;br /&gt;
- Full backup&lt;br /&gt;
&lt;br /&gt;
- Incremental&lt;br /&gt;
&lt;br /&gt;
- Differential&lt;br /&gt;
&lt;br /&gt;
* Backup resources&lt;br /&gt;
&lt;br /&gt;
- Shared folders&lt;br /&gt;
&lt;br /&gt;
- Removable media&lt;br /&gt;
&lt;br /&gt;
- Internal hard disk&lt;br /&gt;
&lt;br /&gt;
- External hard disk&lt;br /&gt;
&lt;br /&gt;
* Items in Backup&lt;br /&gt;
&lt;br /&gt;
- Bare Mental&lt;br /&gt;
&lt;br /&gt;
- System state&lt;br /&gt;
&lt;br /&gt;
- Full&lt;br /&gt;
&lt;br /&gt;
- Individuals Volumes&lt;br /&gt;
&lt;br /&gt;
- Files or Volumes&lt;br /&gt;
&lt;br /&gt;
=Linux:=&lt;br /&gt;
&lt;br /&gt;
* Configuration management using Puppet&lt;br /&gt;
* Setting up fileserver using Samba, identity mapping&lt;br /&gt;
* Setting up Samba as domain controller and/or joining Samba to AD domain&lt;br /&gt;
* Using samba-tool to manage user accounts and DNS records on domain controller&lt;br /&gt;
* Interacting with domain controller using LDAP&lt;br /&gt;
* Configuring Postfix and Dovecot servers for sending e-mail via SMTP and receiving e-mail over IMAP&lt;br /&gt;
* Creating service accounts and authenticating network services (gogs, wiki, etc) with LDAP&lt;br /&gt;
* Guidelines for hardening Ubuntu installation&lt;br /&gt;
&lt;br /&gt;
==Linux==&lt;br /&gt;
&lt;br /&gt;
===Interacting with domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording of the lecture/lab here: https://echo360.e-ope.ee/ess/echo/presentation/a5a41d62-f6b3-4a6a-9a3b-6049dfbea5c9&lt;br /&gt;
&lt;br /&gt;
If you&#039;re attempting to run these commands on a blank Ubuntu box you need to install couple packages:&lt;br /&gt;
&lt;br /&gt;
  apt install nmap dnsutils krb5-user ldap-utils libsasl2-modules-gssapi-mit samba-common cifs-utils&lt;br /&gt;
  pip install pyldap&lt;br /&gt;
&lt;br /&gt;
Figure out what are the host name(s) of the domain controller(s) for INTRA.ITCOLLEGE.EE realm:&lt;br /&gt;
&lt;br /&gt;
  dig -t SRV _ldap._tcp.intra.itcollege.ee&lt;br /&gt;
&lt;br /&gt;
Figure out which ports are open on the domain controller?&lt;br /&gt;
&lt;br /&gt;
  nmap ...&lt;br /&gt;
&lt;br /&gt;
Attempt to query information about your user account from the domain controller.&lt;br /&gt;
Where is the e-mail being forwarded to?&lt;br /&gt;
What is the security identifier for the user?&lt;br /&gt;
What script is being executed when the user logs in to Windows workstation?&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -W -D your-username@itcollege.ee -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
Download and install Apache Directory Studio. Configure connection to the domain controller for browsing graphically.&lt;br /&gt;
&lt;br /&gt;
===Kerberos client commands===&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets:&lt;br /&gt;
&lt;br /&gt;
  klist&lt;br /&gt;
&lt;br /&gt;
Flush credentials:&lt;br /&gt;
&lt;br /&gt;
  kdestroy&lt;br /&gt;
&lt;br /&gt;
Obtain new credentials. What is the error message returned upon incorrect password? What tickets were initialized by the command? What is the lifetime of the tickets?&lt;br /&gt;
&lt;br /&gt;
  kinit your-username@INTRA.ITCOLLEGE.EE&lt;br /&gt;
&lt;br /&gt;
Try to renew:&lt;br /&gt;
&lt;br /&gt;
  krenew&lt;br /&gt;
&lt;br /&gt;
Attempt same LDAP queries as you did before but now with Kerberos credentials by substituing -W -D ... flags with -Y GSSAPI:&lt;br /&gt;
&lt;br /&gt;
  ldapsearch -H ldap://... -Y GSSAPI -b ... samaccountname=target-username&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed? Query the same information from another domain controller. What changed now?&lt;br /&gt;
&lt;br /&gt;
Attempt the same query using Python, make modifications as necessary:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import ldap, ldap.sasl&lt;br /&gt;
l = ldap.initialize(&#039;ldap://...&#039;)&lt;br /&gt;
l.set_option(ldap.OPT_REFERRALS, 0)&lt;br /&gt;
l.sasl_interactive_bind_s(&#039;&#039;, ldap.sasl.gssapi())            &lt;br /&gt;
filter = &#039;(&amp;amp;(objectClass=user)(objectCategory=person)(samaccountname=target-username))&#039;&lt;br /&gt;
r = l.search_s(&#039;dc=...,dc=...,dc=...&#039;,ldap.SCOPE_SUBTREE,filter,[&#039;cn&#039;,&#039;mail&#039;])&lt;br /&gt;
for dn,entry in r:&lt;br /&gt;
    if not dn: continue&lt;br /&gt;
    full_name, = entry[&amp;quot;cn&amp;quot;]&lt;br /&gt;
    mail, = entry[&amp;quot;mail&amp;quot;]&lt;br /&gt;
    print full_name, mail&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Browsing file shares===&lt;br /&gt;
&lt;br /&gt;
Using Samba client tools list filesystem shares from domain controller:&lt;br /&gt;
&lt;br /&gt;
 smbclient -k ... -L&lt;br /&gt;
&lt;br /&gt;
List Kerberos tickets again. What changed?&lt;br /&gt;
&lt;br /&gt;
List files in the NETLOGON share:&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c ls&lt;br /&gt;
&lt;br /&gt;
Download the login script whose filename was previously figured out with LDAP query.&lt;br /&gt;
&lt;br /&gt;
  smbclient -k //.../netlogon -c &amp;quot;get ...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What commands are executed when Windows workstation logs in?&lt;br /&gt;
&lt;br /&gt;
Attempt to browse shares from the fileserver using smbclient.&lt;br /&gt;
&lt;br /&gt;
Open graphical filesystem browser of Ubuntu (nautilus).&lt;br /&gt;
Press Ctrl-L to open up address bar.&lt;br /&gt;
Attemp to browse shares at domain controller using smb:// scheme at fileserver.&lt;br /&gt;
&lt;br /&gt;
===Setting up domain controller===&lt;br /&gt;
&lt;br /&gt;
Video recording available here: https://echo360.e-ope.ee/ess/echo/presentation/9c28f070-0aee-4d34-930b-b043938beca8?ec=true&lt;br /&gt;
&lt;br /&gt;
Samba 4.x is a software suite that provides functionality very close to Microsoft&#039;s Active Directory.&lt;br /&gt;
This allows you to centrally manage user accounts, DNS records and Windows workstations.&lt;br /&gt;
Samba is integral part of several Linux distributions such as [http://www.zentyal.org/ Zentyal], [https://www.univention.com/products/ucs/ Uninvention Corporate Server] which are specifically targeted to &lt;br /&gt;
small/medium sized enterprises.&lt;br /&gt;
&lt;br /&gt;
Samba can also be installed on any other Linux distribution in which case some manual configuration is necessary and this is what following is about.&lt;br /&gt;
&lt;br /&gt;
In this case domain controller is set up at dc1.mycorp.lan&lt;br /&gt;
Make sure /etc/hosts and /etc/hostname correspond to your setup.&lt;br /&gt;
Change arguments as necessary.&lt;br /&gt;
&lt;br /&gt;
Set up a blank Ubuntu 16.04 server machine.&lt;br /&gt;
&lt;br /&gt;
Install packages:&lt;br /&gt;
&lt;br /&gt;
  apt-get install samba samba-vfs-modules smbclient winbind krb5-user ldap-utils&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Provision domain controller using Samba, note that capitalization matters:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/samba/smb.conf&lt;br /&gt;
  samba-tool domain provision --server-role=dc --domain=MYCORP --realm=MYCORP.LAN&lt;br /&gt;
&lt;br /&gt;
Reconfigure Kerberos client configuration:&lt;br /&gt;
&lt;br /&gt;
  rm -fv /etc/krb5.conf&lt;br /&gt;
  ln -s /var/lib/samba/private/krb5.conf /etc/krb5.conf&lt;br /&gt;
&lt;br /&gt;
Set domain administrator account password:&lt;br /&gt;
&lt;br /&gt;
  samba-tool user setpassword administrator&lt;br /&gt;
&lt;br /&gt;
Reconfigure password expiration, in this case password expiration is disabled:&lt;br /&gt;
&lt;br /&gt;
  samba-tool domain passwordsettings set --max-pwd-age=0&lt;br /&gt;
  samba-tool domain passwordsettings set --min-pwd-age=0&lt;br /&gt;
&lt;br /&gt;
Open /etc/samba/smb.conf and in the [global] section specify upstream DNS server:&lt;br /&gt;
&lt;br /&gt;
  dns forwarder = 8.8.8.8&lt;br /&gt;
&lt;br /&gt;
Start services:&lt;br /&gt;
&lt;br /&gt;
  service smbd stop&lt;br /&gt;
  service nmbd stop&lt;br /&gt;
  service samba-ad-dc stop&lt;br /&gt;
  service samba-ad-dc start&lt;br /&gt;
&lt;br /&gt;
===Reconfiguring DHCP options===&lt;br /&gt;
&lt;br /&gt;
Now usually at this point you would reconfigure your router to serve:&lt;br /&gt;
&lt;br /&gt;
* the IP address of the domain controller as the DNS server (DHCP option 6)&lt;br /&gt;
* the correct domain suffix, which in this case is mycorp.lan (DHCP option 15)&lt;br /&gt;
* the correct search domain, again in this case mycorp.lan (DHCP option 119)&lt;br /&gt;
&lt;br /&gt;
When working with VirtualBox and not wanting to set up a whole virtual machine for routing you can use VirtualBox&#039;s NatNetwork feature with DHCP disabled and install DHCP server on the domain controller instead. In VirtualBox main menu click Preferences and create a new NATNetwork with DHCP disabled:&lt;br /&gt;
&lt;br /&gt;
[[File:Configure-virtualbox-as-router.png]]&lt;br /&gt;
&lt;br /&gt;
Configure a static IP address for the domain controller in /etc/network/interfaces and reboot the box:&lt;br /&gt;
&lt;br /&gt;
  auto lo&lt;br /&gt;
  iface lo inet loopback&lt;br /&gt;
  &lt;br /&gt;
  auto enp0s3&lt;br /&gt;
  iface enp0s3 inet static&lt;br /&gt;
    address 10.0.2.15&lt;br /&gt;
    netmask 255.255.255.0&lt;br /&gt;
    gateway 10.0.2.2&lt;br /&gt;
    dns-nameservers 127.0.0.1&lt;br /&gt;
    dns-domain mycorp.lan&lt;br /&gt;
    dns-search mycorp.lan&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the domain controller install ISC DHCP server package:&lt;br /&gt;
&lt;br /&gt;
  apt install isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
Remove existing configuration file:&lt;br /&gt;
&lt;br /&gt;
  rm /etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
In the same file configure the DHCP server:&lt;br /&gt;
&lt;br /&gt;
  subnet 10.0.2.0 netmask 255.255.255.0 {&lt;br /&gt;
    range 10.0.2.100 10.0.2.200;&lt;br /&gt;
    option domain-name &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-search &amp;quot;mycorp.lan&amp;quot;;&lt;br /&gt;
    option domain-name-servers 10.0.2.15;&lt;br /&gt;
    option routers 10.0.2.2;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Save the file and restart service:&lt;br /&gt;
&lt;br /&gt;
  systemctl restart isc-dhcp-server&lt;br /&gt;
&lt;br /&gt;
===Joining workstations to domain===&lt;br /&gt;
&lt;br /&gt;
Download [http://upload.itcollege.ee/iso/Win10_1607_EnglishInternational_x64.iso Windows 10 ISO], install it and [https://wiki.samba.org/index.php/Joining_a_Windows_Client_or_Server_to_a_Domain#Joining_a_Windows_Client_or_Server_to_a_Domain join it to domain]. Proceed to install [https://wiki.samba.org/index.php/Installing_RSAT Microsoft Remote Server Administration Tools] to manage your domain controller. Log in with Other user and specify either mycorp\administrator or administrator@mycorp.lan as username. Verify that file shares at \\dc1.mycorp.lan are browseable.&lt;br /&gt;
&lt;br /&gt;
Boot [http://upload.itcollege.ee/iso/ubuntu-mate-16.04.1-desktop-amd64.iso Ubuntu MATE LiveCD] and install Ubuntu on the harddisk. Join it to domain using realmd and afterwards try to interact with the domain controller as shown in previous session:&lt;br /&gt;
&lt;br /&gt;
  apt install realmd&lt;br /&gt;
  realm --verbose join mycorp.lan&lt;br /&gt;
  pam-auth-update # Tick &amp;quot;Create home directory on login&amp;quot; and press enter&lt;br /&gt;
&lt;br /&gt;
Try to log out and log in with administrator@mycorp.lan and the domain administrator password.&lt;/div&gt;</summary>
		<author><name>Btastan</name></author>
	</entry>
</feed>