Showing posts with label Test Lab Guides. Show all posts
Showing posts with label Test Lab Guides. Show all posts

Monday, January 6, 2014

Basics: Using Group Policy on UNIX/Linux and Mac OS X Systems with Centrify

Background

As per Wikipedia: "Group Policy provides the centralized management and configuration of operating systems, applications, and users' settings in an Active Directory environment"  but what does this mean:
  • For the IT Administrator:  It allows the enforcement and management of computer and user settings to be much easier.  It's also easier to achieve standardization from a central administrative place.
  • For Security:  It allows for security policy definition in a single place, with enforcement in multiple endpoints.
  • For End-Users:  It means that the two parties above can control my experience.  :-)  All joking aside, group policies can make the user's experience more consistent.
  • For IT Management:  Group Policies promote better compliance, more standardization and operational efficiency.
Centrify provides Group Policy objects for the UNIX/Linux (including GNOME), Mac OS X and in the user suite for iOS, Android, etc.

How does group policy work?

In a Windows network, client reads a special share in the SYSVOL share of a domain controller and based on the scope (Site, Domain, OU), the processing rules and security settings they may or may not be processed.  They can change computer settings (upon reboot) or user settings (upon login) or after the gpupdate command is issued.

But UNIX/Linux systems are not Group Policy capable?  Yes, this is true.  Unless the system has been Centrified.  The section below explains how Centrify can process group policies.

Note:  Group Policy processing is available on the licensed versions of Centrify for UNIX, Linux and Mac OS X, with the exception of the Password and Kerberos policy that can be enforced in the Express (community) version.  This blog does not cover Centrify Express, but the reason why this is possible is due to the shared objects that comprise the Account PAM module provided by Centrify.

How does Centrify enable Group Policy for UNIX/Linux and Mac Systems?

There are several components that allow group policies to be processed in UNIX systems.
On the Windows side:  Group Policy templates and definitions (.adm and .xml) files provided with the Centrify Suite. A trusted administrator links and configures the GPOs, which in turn are copied in the SYSVOL share of the domain controller (and replicated in the domain).
On the UNIX/Linux/Mac OS X system side:  The Centrify agent (adclient), mapping files, the mapper process, a virtual directory and config files.


The simplified process works like this:
  1. At the group policy refresh interval or when the adgpupdate command is issued, adclient reads the SYSVOL share of the current domain controller.
  2. The client determines which group policies apply according GP processing rules.
  3. The group policies are interpreted and implemented by the mappers process
  4. The corresponding changes are made to the configuration files in the system.
For example, the Windows logon banner, specified in the "Interactive logon: Message text for users attempting to log on" GPO under Computer Configuration > Windows Settings > Security Settings > Local Policies > Security Options is mapped to the text in the  /etc/issue file in the UNIX/Linux system.

Other very important GPOs are verified by the PAM Password Module, like these options on the "Computer Configuration > Windows Settings > Security Settings > Account Policies > Password Policy" Section:  
Enforce password history
  • Maximum password age
  • Minimum password age
  • Minimum password length
  • Password must meet complexity requirements
Process Reuse:  This means that all the password policies can be reused in the UNIX, Linux and Mac OS X systems that are joined via Centrify commercial editions!!!

Video Chalk-talk

For a deeper dive on group policies provided for Mac OS X by Centrify, take a look at this chalktalk:



Documentation

Group Policy-related Centrify Utilities

adgpupdate

The adgpupdate command is the equivalent to the gpupdate command in Windows.  What it does is described above.  

usage: adgpupdate [options]
options:
  -T, --target <Computer | User>
                     Only refresh the computer or user policy (default both).
  -V, --verbose      Print debugging diagnostics to stderr.
  -v, --version      Print version information.
  -h, --help         Print this help text.

Sample output:
$ adgpupdate -V
session opened
Refreshing Computer Policy...
Success
Refreshing User Policy...
User Policy disabled on this machine.

To view the settings processed by group policy, inspect the gp.report file under /var/centrifydc/reg/machine  (and /user if the system is a Mac or if it was enabled for GNOME policies)

adgpresult

In the 2015 version of the Centrify DirectControl agent (5.2.2), the adgpresult command has been introduced.  This command works just like the Windows gpresult tool.  It shows all the group policies processed locally by the agent in a very neat output.

$ adgpresult --help
usage: adgpresult [options]
    e.g. adgpresult -a
    or adgpresult -m -u uname1 -u uname2 ...
options:
    -a, --all           Dump both gp settings for machine and current user.
                        Default option if no option is given.
    -m, --machine       Dump the machine's gp settings.
    -u, --user <name>   Dump the specified user's gp settings.
    -h, --help          Print this help information and exit.

Tuesday, December 24, 2013

Lab # 7: Installing the Centrify agent and joining Active Directory

In this lab

  • We will install the Centrify agent in CEN1 using RPM and join Active Directory manually
  • We will install the Centrify agent in SUSE1 using install.sh in interactive mode and join Active Directory manually
  • We will install the Centrify agent and join Active Directory on SOL1 using install.sh in unattended mode.
  • We will use some of the tools and CLI commands including with the base agent.

 Install Centrify on CEN1 using RPM

  1. Log in to CLIENT1 with Jessie Matthews (UNIX administrator) account.
  2. Open PuTTY and connect to CEN1
  3. Go to the /temp folder (or where you copied the Centrify agent files)
  4. Decompress the tarball (elevate if necessary)
    tar xzvf centrify-suite-2013.3-rhel3-x86_64.tgz
  5. Use RPM to install the base agent centrifydc-5.1.2-rhel3-x86_64.rpm
    rpm - Uvh centrifydc-5.1.2-rhel3-x86_64.rpm
  6. To verify that Centrify is installed, run the adinfo command.  Notice the output
    $ adinfo
    not joined any domain
    Licensed Features: Enabled

    The last line means that the agent can see a valid license in AD.

Join CEN1 to Active Directory

Information
Domain to join:  corp.contoso.com
Place to put the computer account:  "OU=Servers,OU=UNIX"
Zone to join:  HQ
User account that can join systems to the target container:  jessie.matthews
Desirable command output:  verbose
  1. Type the following command (requires elevation if you're not root):
    sudo adjoin -z HQ -c "OU=Servers,OU=UNIX" -V -u jessie.matthews corp.contoso.com
  2. Type the sudo and Jessie's AD password when prompted.
  3. To verify that the computer has joined successfully, type the adinfo command:
    [centrifying@cen1 temp]$ adinfo
    Local host name:   cen1
    Joined to domain:  corp.contoso.com
    Joined as:         cen1.corp.contoso.com
    Pre-win2K name:    cen1
    Current DC:        dc1.corp.contoso.com
    Preferred site:    CorpHQ
    Zone:              corp.contoso.com/UNIX/Zones/HQ
    CentrifyDC mode:   connected
    Licensed Features: Enabled
  4. Exit the PuTTY session.

Install Centrify on SUSE1 using install.sh

  1. Open PuTTY and connect to SUSE1
  2. Go to the /temp folder (or where you copied the Centrify agent files)
  3. Decompress the tarball (elevate if necessary)
    tar xvfz centrify-suite-2013.3-suse9-x86_64.tgz
  4. Use the install.sh and in interactive mode, select a custom installation and accept the DirectControl Agent, select N for the rest of the options.
    How do you want to proceed? (E|S|X|C|Q) [E]:C
    Install the Centrify DirectControl 5.1.2 package? (Q|Y|N) [Y]:Y
  5. When presented with the confirmation option, select Y.
    You chose Centrify Suite Custom Edition and entered the following:
        Install CentrifyDC 5.1.2 package: Y
        Install CentrifyDC-nis 5.1.2 package: N
        Install CentrifyDC-openssh 5.1.2 package: N
        Install CentrifyDC-ldapproxy 5.1.2 package: N
        Install CentrifyDA 3.1.1 package: N
        Express authentication mode      : N
        Run adcheck                      : N
        Join an Active Directory domain  : N
If this information is correct and you want to proceed, type "Y".
To change any information, type "N" and enter new information.
Do you want to continue (Y) or re-enter information? (Q|Y|N) [Y]:Y


To join SUSE1 to AD, follow the instructions outlined for CEN1.  Keep in mind that the adjoin command is in /usr/sbin in case you don't have it in your path.

Install the Agent and Join AD on SOL1 using an unattended installation

  1. Open PuTTY and connect to SOL1
  2. Go to the /temp folder (or where you copied the Centrify agent files)
    You may need to su to root or use Solaris roles to perform the following tasks.
  3. Run tar to decompress the tarball
    tar xvf  centrify-suite-2013.3-sol9-x86.tar
  4. Edit the following lines in the  centrifydc-install.cfg file.  Uncomment lines if necessary.
    ADJOIN="Y"
    DOMAIN="corp.contoso.com"
    USERID=jessie.matthews
    PASSWD=Jessie's or your user's password
    CONTAINER="OU=Servers,OU=UNIX"
    ZONE=HQ

    Comment the following line (add a # in front of it)
    #CentrifyDC_openssh=
    This is to stop Centrify OpenSSH from being installed with the base package.
  5. Save the file.
  6. Run install.sh in non-interactive mode
    ./install.sh -n
At this point the script will run adcheck and read the unattended file.  Some output:
Joining the Active Directory domain corp.contoso.com ...
Using domain controller: dc1.corp.contoso.com writable=true
Join to domain:corp.contoso.com, zone:HQ successful
Centrify DirectControl started.
Initializing cache
.
You have successfully joined the Active Directory domain: corp.contoso.com
in the Centrify DirectControl zone: CN=HQ,OU=Zones,OU=UNIX,DC=corp,DC=contoso,DC=com

Verify the objects in Active Directory

Open ADUC and expand the corp.contoso.com domain, expand UNIX, then Expand Servers.
  1. Verify that the two new computer objects are present  (refresh if necessary)
  2. Right-click the CEN1 computer object, select Properties and go to the Operating System tab.
Notice that the OS type and version exhibit the proper version.

Add each system to their corresponding computer group

  1. Open Access Manager and Navigate to the Zones/HQ/Authorization/Computer Roles node
  2. Expand Database Servers, right click Members and select Add Computer
  3. In the find box, type cen1;  click on cen1 from the results box and press OK.
  4. Expand Web Servers, right click Members and select Add Computer
  5. In the find box, type suse1;  click on suse1 from the results box and press OK

Now all the systems are joined in to AD and properly categorized, we are ready to start working with users and accessing systems.


Appendix

Installing Using a YUM Repository
http://centrifying.blogspot.com/2015/11/setting-up-simple-yum-repository-to.html
Installing Using a Simple Chef recipe
http://centrifying.blogspot.com/2015/11/deploy-centrify-and-join-active.html
Tools: Install.sh
http://centrifying.blogspot.com/2015/10/utilities-installsh.html

Sunday, December 15, 2013

Lab # 1: Modifying the Base Configuration TLG

Lab Overview
In this lab we will modify Microsoft's Base Configuration Test Lab Guide to:
  1. Remind customers to change their passwords 30 days before expiration
  2. Set up a network login banner for the domain clients
  3. Assign the 10.0.0.0/24 Subnet to the Default AD Site
  4. Rename the Default AD Site to CorpHQ
  5. Create A records for the Unix/Linux hosts
  6. Create a Reverse-lookup Zone for the corp.contoso.com  (10.0.0./24)
  7. Install and enable the Remote Server Administration Tools (RSAT) for Windows 7 SP1 on CLIENT1
  8. Install PuTTY and WinSCP on CLIENT1 
  9. Create a sample users
  10. Obtain and copy the Centrify Server suite and Agents to the Files share in APP1
The purpose roles of the TLG stay the same:
  • DC1 is the domain controller, DNS, DHCP server and Certificate Authority 
  • APP1 is the first application server, it hosts the certificate revocation list for the CA (file and web)
  • CLIENT1 is a client.  For our purposes, this will be the workstation for Unix/Linux administrators.  They will use PuTTY to access the systems via SSH.  Additionally, the Centrify Access Manager tools will be installed there.
Lab Requirements
  • The requirements of the base Test Lab Guide (for DC1, APP1 and CLIENT1)
Modify Domain GPOs and Site

On DC1
To Prompt users to change the password 30 days before it expires
  1. Click Start, click Administrative Tools, and then click Group Policy Management.
  2. In the console tree, open Forest: corp.contoso.com\Domains\corp.contoso.com.
  3. In the details pane, right-click Default Domain Policy, and then click Edit.
  4. In the console tree of the Group Policy Management Editor, open Computer Configuration\Policies\Windows Settings\Security Settings\Local Policies\Security Options
  5. In the details pane, double-click Interactive Logon: Prompt user to change password before expiration
  6. On the Security Policy Setting tab, select Define this policy setting, type 30 (days) and then click OK.

To Set up a network login banner
  1. Double-click the Interactive logon:  Message text for users attempting to log on GPO 
  2. Check the box to define the policy and paste the following text:
    "This computer system is for authorized use only. Users have no explicit or implicit expectation of privacy.Any or all uses of this system and all data on this system may be intercepted, monitored, recorded, copied, audited, inspected, and disclosed to authorized sites and law enforcement personnel, as well as authorized officials of other agencies. By using this system, the user consent to such disclosure at the discretion of authorized site personnel"
  3. Press OK and close the Group Policy Editor.
To Rename the AD Site
  1. Click Start, click Administrative Tools, and then click Active Directory Sites and Services.
  2. On the left pane, expand sites and click and right-click Subnets.
  3. In the New Object - Subnet window, Under prefix, type: 10.0.0.0/24 and click the "Default-First-Site-Name" then press OK.
  4. On the left pane, expand sites, and right click the "Default-First-Site-Name" site, then select Rename.
  5. Rename it to CorpHQ
  6. Close Active Directory Sites and Services
Create a DNS Reverse-lookup zone for the 10.0.0.0 subnet.
  1. Click Start, click Administrative Tools, and then click DNS Manager.
  2. On the left pane, expand the DC1 server and right click Reverse-lookup zones and select  New Zones.
  3. Click Next on the wizard. and Next on the Zone Type (Primary / Stored in AD), Next in the Replication Scope, Next on the Reverse-lookup Type (IPV4)
  4. In the Network ID, type 10.0.0 and click Next
  5. Click Next on the Dynamic Update Page and Click Finish.
  6. Leave DNS Manager open to perform the next tasks
Create A records for the Unix/Linux hosts

The IP Addresses for the UNIX systems are:

Hostname
IP Address
Role
CEN1
10.0.0.151
Database Server
SUSE1
10.0.0.152
Web Server
SOL1
10.0.0.153
Utilities Server

Click Start, click Administrative Tools, and then click DNS Manager.
  1. On the left pane, expand the DC1 server and expand the Forward-lookup Zones
  2. On the left pane, right-click on the corp.contoso.com zone and select New Host (A or AAA)
  3. In the New Host window, type the name of the UNIX host (e.g. CEN1)
  4. Type the IP Address in the corresponding field  (e.g. 10.0.0.151)
  5. Check the Create associated pointer (PTR) record and click the Add Host button
  6. Repeat until you have created all three records
  7. Close DNS Manager and log-off

Install and enable the Remote Server Administration Tools (RSAT) for Windows 7 SP1 on CLIENT1
  1. Log on to CLIENT1 with an administrative account from CORP
  2. Download the RSAT SP1
    http://download.microsoft.com/download/4/F/7/4F71806A-1C56-4EF2-9B4F-9870C4CFD2EE/Windows6.1-KB958830-x64-RefreshPkg.msu 
  3.  Double click the installer and click Yes when prompted.  
  4. Click the I Accept button to start the installation.  When the installation is complete, click close.
  5. To enable the RSAT Tools  (ADUC, GPMC, etc), open the Control Panel and click Programs and Features
  6. On the left pane, click "Turn Windows features on or off
  7. Expand Feature Administration Tools and check Group Policy Management
  8. Expand the Remote Server Administration Tools/Role Administration Tools/AD DS and AD LDS Tools and check:
    AD DS Snap-ins and command-line tools
    AD LDS Snap-ins and command-line tools
  9. Press OK
  10. Stay logged into CLIENT1 to complete the next tasks
Download and Install PuTTY and WinSCP on CLIENT1
  1.  Download PuTTY
  2. Install PuTTY, follow the instructions.
  3. In the Select Additional tasks window, check the Create Desktop Icons for all users.
  4. Download WinSCP
  5. Install WinSCP, follow the instructions.
    Make sure you don't select any component in the Google Chrome page.
  6. Stay logged into CLIENT1
Create Sample Users
 First, Create the Staff OU
  1. Click Start, click Administrative Tools, and then click Active Directory Users and Computers
  2. On the left pane, right click the corp.contoso.com domain, select New->Organizational Unit
  3. In the New Object window, Name field, call it Staff and Press OK.
Create the Users in the Staff OU
  1. Right-click the Staff OU, select New->User
  2. Fill out the First Name, Last Name based on the list below, in the user logon name, use the following format:  <firstname>.<lastname> 
    E.g. bryant.wheeler  and click next.
  3. In the next window, set a password and uncheck "user must change password at next logon"
  4. Optionally, set it to not expire.
  5. Click next and finish.
List of sample users:

Name
Title
AD Groups
Bryant Wheeler
Windows Administrator
Domain Admins
Domain Users
Jessie Matthews
UNIX Administrator
Domain Users
Cora Rodriguez
IT Security Analyst
Domain Users
Courtney Larson
IT Manager
Domain Users
Jeremy Silva
DBA UNIX
Domain Users
Ramon Jimenez
DBA UNIX
Domain Users
Doyle Russell
Web Administrator
Domain Users
Matt Sims
Web Administrator
Domain Users
Cassandra Lindsey
External Auditor
Domain Users
Ralph Baldwin
Internal Auditor
Domain Users

 Make Bryant a member of the Domain Admins group.
  1. Open the Staff OU
  2. Double-click Bryant Wheeler's user and go to the Member of tab.
  3. Press the Add button and type Domain Admins in the box and press OK twice.
  4. Close Active Directory Users and Computers.
 Obtain and copy the Centrify Server Suite software
  1. To obtain access to download the software you have to contact Centrify and request a trial.
  2. Download the Centrify Software:
    a) Centrify Consoles:  http://www.centrify.com/support/package-info.asp?fn=centrify-suite-2013.3-mgmt-ent-win64.zip
    b) Agent for CentOS 64bit: http://www.centrify.com/support/download.asp?asset=centrify-suite-2013.3-rhel3-x86_64.tgz
    c) Agent for Solaris x86: http://www.centrify.com/support/download.asp?asset=centrify-suite-2013.3-sol9-x86.tgz
    d) Agent for SUSE 64bit: http://www.centrify.com/support/download.asp?asset=centrify-suite-2013.3-suse9-x86_64.tgz
  3. When you have the software, log on to APP1
  4. Copy the consoles and agents c:\Files folder.  This will make it available via the \\app1\files share.

Wednesday, December 11, 2013

Lab Protocol


Centrifying Labs Protocol
A key goal of this blog is to provide step-by-step instructions and examples to solve the challenges of Identity and Access in Unix and Linux platforms.  To make the most of the materials shared on this site we are proposing the following: Let's not reinvent the wheel and reuse what we have widely available.

The Business Problem is the lab driver
Labs will be designed to solve a real-world issue.  They will help to be reference designs, however, the audience should understand that a small lab is not the same as the real world.  Each business problem will be outlined from the point of view of the Unix Administrator, Security Analyst and IT Manager.  If there's considerations from the Windows Admin perspective, they will be addressed during the solution stage (Plan-Do-Check-Adjust).

Infrastructure:  Windows and Active Directory
Microsoft Technet has an excellent resource in their Test Lab Guides.  What this means to you is that any infrastructure we leverage on the Windows side will come from their guidelines.  This way we follow a uniform example across the board.   All examples on this blog will leverage the base configuration test lab guide for Windows Server 2008 R2.  Here's a diagram:

What does the Base Test Lab Guide provide:
- A corporate network (corpnet) 10.0.0.0/24
- A functioning AD forest  (corp.contoso.com):  LDAP, Kerberos and Group Policy
- Name resolution services
- Working websites and file shares
- A properly configured Certificate Authority and Certificate Revocation lists

DC1 is the domain controller
APP1 is the application server
CLIENT1 is the Windows client, most of the work will be performed from there
The Centrify consoles will be installed here.
Expect EDGE and INET1 to get introduced in DMZ-like scenarios (won't be needed for a while) so its safe to say that you'll be OK with the 3 initial VMs first.

Infrastructure:  UNIX and Linux

The infrastructure will vary depending on the use case, here's a summary of the Unix and Linux VMs:
- CEN1, will be running CentOS 64 bit with the personal version of IBM DB2 (Express) and Apache
- SUSE1 will be running SUSE 10 SP3 with the personal version of Oracle
- SOL1 will be running Solaris 10.

Notes and modifications on the Base Configuration TLC
  • On page 14, the TLC recommends to set the "Domain member: Maximum machine account password age" to 999.  This means that the computer's password will change in close to 3 years.  In a real production environment, this defaults to 30 days. This has implications on mutual computer authentication.
  • I recommend to set the "Interactive Logon: Prompt user to change password before expiration" to 30 days.  This will make the notification effective 30 days before the password expires.
  • Set up a Corporate Disclaimer:  by modifying the "Interactive logon:  Message text for users attempting to log on"  GPO.
Our modified Lab will look like this:


Stay tuned.  Our first lab and diagram will be posted soon.