Likewise Enterprise Installation and Administration Guide

Last updated: May 25, 2011.

Abstract

This guide describes how to install Likewise Enterprise and connect computers running Unix, Linux, and Mac OS X to Active Directory. The guide covers installing the Likewise agent, configuring the agent, installing the Likewise Management Console on a Windows administrative workstation connected to Active Directory, configuring a domain for use with Likewise, migrating Unix users to Active Directory, logging on with domain credentials, and monitoring events.

This guide is supplemented by the Likewise community forum, which you can join at http://www.likewise.com/community/, and by manuals in the documentation library, including the Group Policy Administration Guide.

This Version

Likewise Enterprise 6.0: http://www.likewise.com/resources/documentation_library/manuals/lwe/likewise-enterprise-guide.html

Select Your View:

 Multiple-page HTML web site.

 Single-page HTML document.

 Compiled Help with folder view and advanced search. (Download the zip file and then save its .chm file to a local folder. On some versions of Windows, you must unblock a .chm file before you can view it. To unblock it after saving it locally, right-click the file, click Properties, and then click Unblock.)

 PDF.

Previous Versions

Likewise Enterprise 5.2 and 5.3: http://www.likewise.com/resources/documentation_library/manuals/lwe/likewise-enterprise-53-guide.html (PDF)

Likewise Enterprise 5.1: http://www.likewise.com/resources/documentation_library/manuals/lwe/likewise-enterprise-51-guide.html (PDF)

Likewise Enterprise 5.0: http://www.likewise.com/resources/user_documentation/LikewiseEnterprise5.0_Installation_and_Administration_Guide.pdf

Likewise Enterprise 4.1 or earlier: http://www.likewise.com/resources/documentation_library/#enterprise


Table of Contents

1. Introduction
1.1. Task Road Map
1.2. Software Products
1.3. Software Components
2. Planning Your Installation and Deployment
2.1. Overview of the Installation Process
2.2. Planning Your Deployment
2.3. About Schema Mode and Non-Schema Mode
2.3.1. Changes Made by the Schema Wizard
2.3.2. Key Differences
2.3.3. Pros and Cons of the Schema Modes
2.4. About Likewise Cells
2.5. Best Practices for Modes, Cells, Group Policies, and User Rights
3. Installing and Using the Console
3.1. About the Likewise Console
3.2. Requirements
3.3. Install the Likewise Console
3.4. Start the Likewise Console
3.5. Connect to a Domain
3.6. Run the Schema Mode Wizard
3.7. Replication in a Large Forest or in Multiple Domains
3.8. Upgrade the Schema of a Forest
3.9. Add a Plug-In
4. Working with Cells
4.1. Make a Cell and Associate it with an OU or a Domain
4.1.1. Moving a Computer to Another Cell
4.2. Create a Default Cell
4.2.1. Use Pre-Existing RFC 2307 Data
4.3. Associate a User with One or More Cells
4.4. Add a Group to a Cell
4.5. Add a User to a Cell
4.6. Link Cells
4.7. Delegate Control to Create Container Objects
4.8. Administering Cells with Cell Manager
5. Managing Users, Groups, and Computers
5.1. Modify Likewise Settings in ADUC
5.2. Create a User
5.3. Finding Users and Groups in ADUC
5.4. Provision a User with Linux or Unix Access
5.5. Provision a Group with Linux or Unix Access
5.6. Specify a User's ID and Unix or Linux Settings
5.7. Apply Unix or Linux Settings to Multiple Users
5.8. Set a User Alias
5.9. Set a Group Alias
5.10. Set the Default Home Directory
5.11. Set the Default Login Shell
5.12. Assign a Group ID
5.13. Disable a User
5.14. Improve MMC Performance When Accessing Likewise Settings in ADUC
5.15. Extend File Mode Permissions with POSIX ACLs
5.15.1. Using POSIX ACLs to Grant AD Accounts Access to Subversion
6. Migrating Users to Active Directory
6.1. About Diagnostics and Migration
6.2. Migrate Users to Active Directory
6.3. Find Orphaned Objects
6.4. Migrate a User Profile on a Mac
7. The Likewise Agent
7.1. About the Likewise Agent
7.2. Daemons
7.3. The Likewise Registry
7.4. Ports and Libraries
7.5. Caches and Databases
7.6. Time Synchronization
7.7. Using a Network Time Protocol Server
7.8. Automatic Detection of Offline Domain Controller and Global Catalog
7.9. UID-GID Generation in Likewise Open and Likewise Enterprise Cells
7.10. Cached Credentials
7.11. Trust Support
7.12. Integrating with Samba
7.13. Supported Platforms
8. Configuring Clients Before Agent Installation
8.1. Configure nsswitch.conf
8.2. Configure resolv.conf
8.3. Configure Firewall Ports
8.4. Extend Partition Size Before Installing Likewise on IBM AIX
8.5. Increase Max Username Length on IBM AIX
8.6. Check System Health Before Installing the Agent
9. Installing the Agent
9.1. Install the Correct Version for Your Operating System
9.2. Requirements for the Agent
9.3. Install the Agent on Linux or Unix with the Shell Script
9.4. Install the Agent on Linux in Unattended Mode
9.5. Install the Agent on Unix with the Command Line
9.6. Install the Agent on a Mac Computer
9.7. Install the Agent on a Mac in Unattended Mode
9.8. Installing the Agent in Solaris Zones
9.9. Upgrading Your Operating System
10. Joining an Active Directory Domain
10.1. About Joining a Domain
10.2. Join Active Directory with the Command Line
10.3. Domainjoin-cli Options, Commands, and Arguments
10.4. Join Active Directory Without Changing /etc/hosts
10.5. Join a Linux Computer to Active Directory with the GUI
10.6. Join a Mac Computer to Active Directory with the GUI
10.6.1. Turn Off OS X Directory Service Authentication
10.7. Use Likewise with a Single OU
10.8. Rename a Joined Computer
10.9. Files Modified When You Join a Domain
10.10. With NetworkManager, Use a Wired Connection to Join a Domain
11. Logging On with Domain Credentials
11.1. About Logging On
11.2. Log On with AD Credentials
11.3. Log On with SSH
11.4. Solve Logon Problems from Windows
11.5. Solve Logon Problems on Linux or Unix
12. Troubleshooting Domain-Join Problems
12.1. Top 10 Reasons Domain Join Fails
12.2. Solve Domain-Join Problems
12.3. Ignore Inaccessible Trusts
12.4. Dealing with Common Error Messages
12.4.1. Configuration of Krb5
12.4.2. Chkconfig Failed
12.5. Diagnose NTP on Port 123
12.6. Turn Off Apache to Join a Domain
13. Configuring the Agent
13.1. Modify Settings with the Config Tool
13.2. Add Domain Accounts to Local Groups with /etc/group
13.3. Configure Entries in Your Sudoers Files
13.4. Set a Sudoers Search Path
13.5. Set Up AIX Audit Classes to Monitor Events
14. Troubleshooting the Agent
14.1. Likewise Daemons and Services
14.1.1. Troubleshoot Likewise Daemons with the Service Manager
14.1.2. Check the Status of the Authentication Daemon
14.1.3. Check the Status of the DCE/RPC Daemon
14.1.4. Check the Status of the Network Logon Daemon
14.1.5. Check the Status of the Input-Output Service
14.1.6. Restart the Authentication Daemon
14.1.7. Restart the DCE/RPC Daemon
14.1.8. Restart the Network Logon Daemon
14.1.9. Restart the Input-Output Service
14.2. Logging
14.2.1. Generate a Domain-Join Log
14.2.2. Generate an Authentication Agent Debug Log
14.2.3. Generate a PAM Debug Log
14.2.4. Generate a Directory Service Log on a Mac
14.2.5. Log Group Policy Debugging Data
14.2.6. Generate a Network Trace
14.3. Basics
14.3.1. Check the Version and Build Number
14.3.2. Determine a Computer's FQDN
14.3.3. Make Sure Outbound Ports Are Open
14.3.4. Check the File Permissions of nsswitch.conf
14.3.5. Configure SSH After Upgrading It
14.3.6. Upgrading an Operating System
14.4. Accounts
14.4.1. Allow Access to Account Attributes
14.4.2. A User's Settings Are Not Displayed in ADUC
14.4.3. Resolve an AD Alias Conflict with a Local Account
14.4.4. Fix the Shell and Home Directory Paths
14.4.5. Troubleshooting with the Get Status Command
14.4.6. Troubleshoot User Rights with Ldp.exe and Group Policy Modeling
14.4.7. Fix Selective Authentication in a Trusted Domain
14.5. Cache
14.5.1. Clear the Authentication Cache
14.5.2. Clear a Corrupted SQLite Cache
14.6. Kerberos
14.6.1. Fix a Key Table Entry-Ticket Mismatch
14.6.2. Fix KRB Error During SSO in a Disjoint Namespace
14.6.3. Eliminate Logon Delays When DNS Connectivity Is Poor
14.7. PAM
14.7.1. Dismiss the Network Credentials Required Message
14.8. Red Hat and CentOS
14.8.1. Modify PAM to Handle UIDs Less Than 500
14.9. SLED
14.9.1. A Note About the Home Directory on SLED 11
14.9.2. Updating PAM on SLED 11
14.10. AIX
14.10.1. Increase Max Username Length on AIX
14.10.2. Updating AIX
14.11. Mac OS X
14.11.1. Find the Likewise Service Manager Daemon on a Mac
14.12. FreeBSD
14.12.1. Keep Usernames to 16 Characters or Less
14.13. Solaris
14.13.1. Turn On Core Dumps on Solaris 10
15. Command-Line Reference
15.1. lwsm: Manage Services
15.2. lwconfig
15.3. lwregshell: The Registry Shell
15.4. lw-edit-reg: Export the Registry to Your Editor
15.5. lw-set-log-level: Set the Log Level
15.6. lw-set-machine-name: Change the Hostname in the Local Provider
15.7. Find a User or a Group
15.8. Find a User by a SID
15.9. List Groups for a User
15.10. lw-enum-groups: List Groups
15.11. lw-enum-users: List Users
15.12. lw-get-status: View the Status of the Authentication Providers
15.13. Get the Current Domain
15.14. lw-get-dc-list: List Domain Controllers
15.15. lw-get-dc-name: Get Domain Controller Information
15.16. lw-get-dc-time: Get Domain Controller Time
15.17. lw-get-log-info
15.18. lw-get-metrics
15.19. Get Machine Account Information
15.20. Reload Changes to the Configuration File
15.21. lw-trace-info: Turn on Trace Markers in Log Messages
15.22. lw-update-dns: Dynamically Update DNS
15.23. lw-ad-cache: Manage the AD Cache
15.24. domainjoin-cli: Join or Leave a Domain
15.25. lw-ypcat
15.26. lw-ypmatch
15.27. lw-adtool: Modify Objects in AD
15.28. lwio: Input-Output Commands
15.28.1. lwio-copy: Copy Files Across Disparate Operating Systems
15.28.2. lwio-refresh: Reload the Input-Output Settings After Changes
15.28.3. lwio-set-log-level
15.28.4. lwio-get-log-info
15.29. Commands to Modify Local Accounts
15.29.1. lw-add-user: Add a Local User by Name or UID
15.29.2. lw-add-group: Add a Local Group Member by Name or GID
15.29.3. lw-del-user: Remove a Local User by Name or UID
15.29.4. lw-del-group: Remove a Local Group by Name or GID
15.29.5. lw-mod-user: Modify a Local User by Name or UID
15.29.6. lw-mod-group: Modify a Local Group's Members
15.30. Kerberos Commands
15.30.1. kdestroy: Destroy the Kerberos Ticket Cache
15.30.2. klist: View Kerberos Tickets
15.30.3. kinit: Obtain and Cache a TGT
15.30.4. kpasswd: Change a Password
15.30.5. ktutil: The Keytab File Maintenance Utility
15.30.6. Kvno: Acquire a Service Ticket and Print Key Version Number
15.31. Commands and Scripts Not for Customer Use
15.31.1. ConfigureLogin
15.31.2. dceidl
15.31.3. gpcron
15.31.4. gpcron.sh
15.31.5. gprsrtmnt.sh
15.31.6. init-base.sh
15.32. Likewise Enterprise Tools Installed on Windows Computers
15.32.1. Lwopt.exe
16. Leaving a Domain and Uninstalling the Agent
16.1. Leave a Domain
16.2. Uninstall the Domain Join GUI
16.3. Uninstall the Agent on a Linux or Unix Computer
16.4. Uninstall the Agent on a Mac
17. Using Likewise with Smart Cards
17.1. Smart Card Setup
17.2. Log On with a Smart Card
17.3. Smart Card Group Policies
18. Managing Licenses
18.1. About Licenses
18.2. Creating a License Container
18.3. Import a License File
18.4. Assign a License to a Computer in AD
18.5. Manage a License Key on a Likewise Client
18.6. Delete a License
18.7. Revoke a License
19. Setting Up the Likewise Reporting Database
19.1. Introduction
19.2. Overview
19.3. Requirements
19.4. Setting Up SQL Server
19.4.1. Install and Configure SQL Server
19.4.2. Create a Database Named LikewiseEnterprise
19.4.3. Run the Likewise Database Creation Script
19.4.4. Install the Likewise DB Utilities
19.4.5. SQL Server Database Security Notes
19.5. Setting Up MySQL
19.5.1. Create a Database Named LikewiseEnterprise
19.5.2. Allow the Database To Accept External Connections from Account
19.5.3. Run the Likewise Database Creation Script
19.5.4. Install the Likewise DB Utilities
19.5.5. Customize Your MySQL Security Settings
19.6. Connecting the Likewise Console to the Database
19.6.1. Connect the Likewise Console to the Database
19.6.2. Make Sure the Collector Processes Are Running
19.6.3. Run the DB Update Script
19.6.4. Run the ldbupdate.exe from the Command Line
19.7. Connecting the Likewise Console to the Database
19.7.1. Connect the Likewise Console to the Database
19.7.2. Make Sure the Collector Processes Are Running
19.8. Setting Computers to Forward Events to LWCollector
19.8.1. Set Event Forwarding with a GPO
19.8.2. Forward Events by Changing Your Local Settings
19.8.3. Cull Events from Syslog
19.9. Generate a Sample Report
19.10. Monitoring Events with the Operations Dashboard
19.10.1. Start the Operations Dashboard
19.10.2. Connect to a Database
19.10.3. Change the Refresh Rate
19.11. Configuring the Likewise Data Collectors
19.11.1. LWCollector
19.11.2. LWEventDBReaper
19.12. Working with the Enterprise Database Management Plug-In
19.12.1. Connect to a Database
19.12.2. Change the Parameters of the Collectors
19.12.3. Set the ACL for RPC Access
19.13. Archiving Events
19.14. Troubleshooting
19.14.1. Check the Endpoints
19.14.2. Check the Collector
19.14.3. Check the Database
19.14.4. Troubleshooting Checklists
19.14.5. Switching Between Databases
20. Monitoring Events with the Event Log
20.1. Monitor Events with the Event Log
20.2. View the Local Event Log
20.3. The Event Type
20.4. The Event Source
20.5. List of Events by Source ID
21. Using Likewise for Single Sign-On
21.1. About Single Sign-On
21.2. Make Sure PAM Is Enabled for SSH
21.3. Configure PuTTY for Windows-Based SSO
21.4. Configure Apache for SSO
21.4.1. Kerberos Library Mismatch
21.5. Examples
22. Configuring the Likewise Services with the Registry
22.1. About the Registry
22.1.1. The Structure of the Registry
22.1.2. Data Types
22.2. Modify Settings with the lwconfig Tool
22.3. Gain Access to the Registry
22.4. Change the Value of an Entry with the Shell
22.4.1. Set Common Options with the Registry Shell
22.5. Change the Value of an Entry from the Command Line
22.6. Find a Value Entry
22.7. Settings in the lsass Branch
22.7.1. Log Level Value Entries
22.7.2. Turn On Event Logging
22.7.3. Turn Off Network Event Logging
22.7.4. Restrict Logon Rights
22.7.5. Display an Error to Users Without Access Rights
22.7.6. Display an MOTD
22.7.7. Change the Domain Separator Character
22.7.8. Change the Replacement Character for Spaces
22.7.9. Turn Off System Time Synchronization
22.7.10. Set the Default Domain
22.7.11. Set the Home Directory and Shell for Domain Users
22.7.12. Set the Umask for Home Directories
22.7.13. Set the Skeleton Directory
22.7.14. Force Likewise Enterprise to Work Without Cell Information
22.7.15. Refresh User Credentials
22.7.16. Turn Off K5Logon File Creation
22.7.17. Change the Duration of the Machine Password
22.7.18. Sign and Seal LDAP Traffic
22.7.19. NTLM Value Entries
22.7.20. Additional Subkeys
22.7.21. Add Domain Groups To Local Groups
22.7.22. Control Trust Enumeration
22.7.23. Modify Smart Card Settings
22.7.24. Set the Interval for Checking the Status of a Domain
22.7.25. Set the Interval for Caching an Unknown Domain
22.8. Cache Settings in the lsass Branch
22.8.1. Set the Cache Type
22.8.2. Cap the Size of the Memory Cache
22.8.3. Change the Duration of Cached Credentials
22.8.4. Change NSS Membership and NSS Cache Settings
22.9. Settings in the eventlog Branch
22.9.1. Allow Users and Groups to Delete Events
22.9.2. Allow Users and Groups to Read Events
22.9.3. Allow Users and Groups to Write Events
22.9.4. Set the Maximum Disk Size
22.9.5. Set the Maximum Number of Events
22.9.6. Set the Maximum Event Timespan
22.9.7. Change the Purge Interval
22.10. Settings in the netlogon Branch
22.10.1. Set the Negative Cache Timeout
22.10.2. Set the Ping Again Timeout
22.10.3. Set the Writable Rediscovery Timeout
22.10.4. Set the Writable Timestamp Minimum Change
22.10.5. Set CLdap Options
22.11. Settings in the lwio Branch
22.11.1. Sign Messages If Supported
22.11.2. Enable Security Signatures
22.11.3. Require Security Signatures
22.11.4. Set Support for SMB2
22.12. Settings in the Lwedsplugin Branch for Mac Computers
23. Contacting Technical Support
23.1. Contact Support
23.2. Provide Diagnostic Information to Technical Support
24. Legal Disclaimer and Copyright Notice

Chapter 1. Introduction

Likewise connects Linux, Unix, and Mac OS X computers to Microsoft Active Directory so you can centrally manage all your computers and users from a single identity management system. Likewise Enterprise is made up of two software packages: the Likewise management tools for Active Directory, which you install on a Windows computer, and the Likewise agent, which you install on a Linux, Unix, or Mac computer to connect it to Active Directory.

This guide describes how to install and manage Likewise Enterprise. The target audience is system administrators who manage access to workstations, servers, and applications with Active Directory. The guide assumes that you know how to administer computers, users, and group policies in Active Directory and that you know how to manage computers running Unix, Linux, and Mac OS X.

1.1. Task Road Map

To

See

Set up and test a trial version of Likewise Enterprise 5.3 or later in a networked test environment.

The Likewise Evaluation Guide.

Install the Likewise Enterprise Console and the Likewise management tools on a Windows workstation in a production environment.

Install the Management Console

Determine whether to use schema or non-schema mode.

About Schema Mode and Non-Schema Mode

Find out how to use a container, known as a Likewise cell, to manage Likewise clients and Unix settings in AD.

About Likewise Cells

Create a cell in AD for Unix settings, such as a UID, so an AD user can log on a Likewise client.

Create a Cell in AD

Provide AD users and groups with access to Linux, Unix, and Mac computers.

Managing Users, Groups, and Computers

Install the Likewise agent on a Linux, Unix, or Mac OS X computer.

Install the Agent

Connect a computer running Likewise to Active Directory.

Join Active Directory with the Command Line

Troubleshoot problems joining a domain.

Troubleshooting Domain-Join Problems

Log on a Likewise client with an Active Directory user account.

Log On with AD Credentials

Troubleshoot logon problems.

Troubleshooting Logon Problems

Use Cell Manager to administer Likewise cells in AD.

Administering Cells with Cell Manager

Apply group policies to Linux, Unix, and Mac computers.

The Group Policy Administration Guide.

Use Workgroup Manager to apply managed client settings (MCX) to Mac computers as group policy objects.

The Group Policy Administration Guide.

Install the Likewise reporting and auditing components, including the Likewise database.

Setting Up the Likewise Reporting Database

Find information about Likewise commands and command-line utilities for Linux, Unix, and Mac.

Command-Line Reference

Change the local settings on a Likewise client.

Configuring the Likewise Agent

Monitor security events with the event log.

Monitoring Events with the Event Log

Configure Likewise clients for single sign-on.

Using Likewise for Single Sign-On

Migrate Unix or NIS users to Active Directory.

Migrating Users to Active Directory

Migrate a user profile on a Mac from a local user account to the home directory specified for the user in Active Directory.

Migrate a User Profile on a Mac

Set up Samba to authenticate users with Likewise Enterprise.Samba 3 Integration Guide for Likewise 6 or Later
Install and use Likewise Open.

Likewise Open Installation and Administration Guide

1.2. Software Products

Likewise makes two closely related software products: Likewise Open and Likewise Enterprise.

Likewise Open authenticates domain users with the highly secure Kerberos 5 protocol by hashing their security identifiers from Active Directory. Likewise Open does not, however, process user identifiers or group identifiers even if they are set in Active Directory.

Likewise Enterprise is installed on a Windows administrative workstation connected to a domain controller so you can set user identifiers and group identifiers in Active Directory Users and Computers. Once the UIDs and GIDs are set, the Likewise agent uses the identifiers to authenticate users and groups and to control access to computers and applications.

Likewise Enterprise includes additional features. It not only lets you manage Unix identities in Active Directory but also lets you apply group policies to Unix computers from the Microsoft Group Policy Management Console, including policies based on the Gnome GConf project to define desktop and application preferences for Linux computers. More: Likewise Enterprise integrates Apple's Workgroup Manager with the Group Policy Object Editor to apply managed client settings to Mac OS X computers with group policy objects. Likewise Enterprise also lets you generate a range of reports to help improve regulatory compliance. The result: lower operating costs, better security, enhanced compliance.

1.3. Software Components

Likewise comprises several components, each of which provides part of the functionality necessary to manage Linux and Unix computers in Active Directory. There are, however, only two installation packages: one to install the Likewise agent on a Unix, Linux, or Mac OS X computer; the other to install Likewise Enterprise on a Windows administrative workstation that connects to an Active Directory domain controller.

Component

Function

Agent

  • Runs on a Linux, Unix, or Mac OS X computer to connect it to Active Directory with the Likewise command-line interface or GUI. See Join Active Directory with the Command Line. Likewise Open is an open-source version of the agent that is available for free at www.Likewise.com.

  • Communicates with an Active Directory domain controller to authenticate and authorize users and groups with the Likewise Identity Service. See Log On with AD Credentials.

  • Pulls and refreshes group policies by using the group policy daemon, which is included only with the Likewise Enterprise agent.

Management Console

  • Runs on a Windows administrative workstation that connects to an Active Directory domain controller to help manage Linux, Unix, and Mac OS X computers within Active Directory.

  • Migrates users, checks status, and generates reports.

MMC Snap-Ins for ADUC and GPOE

  • Extends Active Directory Users and Computers to include Unix and Linux users.

  • With Likewise Enterprise, it also extends the Group Policy Object Editor and the Group Policy Management Console to include Linux, Unix, and Mac OS X group policies as well as a way to target them at specific platforms.

Cell Manager

  • A snap-in for the Microsoft Management Console to manage cells associated with Active Directory Organizational Units.

Reporting Database

  • Stores security events and access logs for compliance reports.

Operations Dashboard

  • The Likewise Operations Dashboard is a management application, or plug-in, for the Likewise Management Console. The dashboard retrieves information from the Likewise reporting database to display authentication transactions, authorization requests, network events, and other security events that take place on Likewise clients.

Chapter 2. Planning Your Installation and Deployment

2.1. Overview of the Installation Process

The installation and deployment process typically proceeds in the following order:

  1. Make sure your computers meet the installation requirements and then obtain the Likewise software package from www.Likewise.com.

  2. Plan your installation, test environment, and production deployment. Make decisions about whether to use Likewise in schema mode or non-schema mode; whether to manage a single forest or multiple forests and to assign UID-GID ranges accordingly; how to configure a Likewise cell topology for your unique needs; whether to migrate NIS users and what to do with local user accounts after migration; and whether to use specific cells for aliasing.

  3. Before you install the Likewise Management Console, check Active Directory to make sure it is ready for Likewise by meeting our remediation requirements.

  4. Install the Likewise Management Console, which includes management tools, on a Windows administrative workstation that you use to manage Active Directory.

  5. Optionally, install a reporting database on a Windows administrative workstation connected to a domain controller. The reporting database, which can be either MySQL or SQL Server, stores access information and security events for compliance reports.

  6. Use a Likewise wizard to configure your Active Directory domain in either schema or non-schema mode.

  7. Configure a cell topology in Active Directory Users and Computers.

  8. Optionally use the console's migration tool to migrate Unix and Linux users and groups to Active Directory.

  9. Check the system health, or readiness, of your Linux, Unix, and Mac computers before installing the Likewise agent. For example, you must make sure resolv.conf is configured for Likewise.

  10. Install the Likewise agent on each Unix, Linux, or Mac OS X computer that you want to join to the Active Directory domain.

  11. Join your Unix and Linux computers to Active Directory.

  12. Optionally plan and deploy group policies to manage your Unix, Linux, and Mac OS X computers in Active Directory.

  13. Troubleshoot any deployment issues and optimize the deployment for your unique mixed network.

2.2. Planning Your Deployment

The key to a successful deployment is planning. Before you begin deploying Likewise in an enterprise, develop a plan that addresses at least the following aspects of installation and deployment:

  • Set up a test environment. It is recommended that you first deploy Likewise in a test environment so that you can identify and resolve any issues specific to your mixed network before you put the system into production.

  • Determine whether to use Likewise in schema or non-schema mode. The advantages and disadvantages of both approaches are discussed later. When you configure your domain with the Likewise domain configuration wizard, you must choose whether to use schema or non-schema mode.

    Important: Back up Active Directory before you run the Likewise domain configuration wizard.

  • Decide whether to configure Likewise to manage a single forest or multiple forests. If you manage multiple forests, the UID-GID range assigned to a forest should not overlap with the range of another forest.

  • Determine how you will migrate Linux, Unix, and Mac OS X users to Active Directory. For example, if you are using NIS, decide whether you will migrate those accounts to Active Directory and whether you will migrate local accounts and then delete them or leave them. It is usually recommended that you delete interactive local accounts other than the root account.

  • Identify the structure of the organizational units -- or cell topology -- that you will need, including the UID-GID ranges. If you have multiple NIS servers in place, your users may have different UID-GID maps in each NIS domain. You may want to eliminate the NIS servers but retain the NIS mapping information in Active Directory. To do so, you can use Likewise cells.

  • Determine whether you will use aliasing. If you plan to use aliasing, you must associate users with a specific Likewise cell; you cannot use the default cell.

2.3. About Schema Mode and Non-Schema Mode

Likewise has two operating modes: schema mode and non-schema mode. Schema mode takes advantage of the Unix- and Linux-specific RFC 2307 object classes and attributes to store Linux and Unix user and group information. In contrast, non-schema mode stores Linux and Unix data without requiring RFC 2307 object classes and attributes and without modifying the schema. Instead, non-schema mode uses existing object classes and attributes to store its data. To store information about a cell, Likewise creates a container object and stores data in its description attribute. To store information about a group or user, Likewise creates a serviceConnectionPoint object and stores data in its keywords attribute. Both keywords and description are multi-valued attributes that can have multiple values while still allowing AD searches for specific values.

Specifically, in non-schema mode Likewise uses RFC 2307 attribute names to store values in the keywords and description attributes in the form name=value, where name is the attribute name and value is its value. Here's an example of how the keywords attribute name-value pairs can contain Unix and Linux information for an AD user:

uid=
uidNumber=1016
gidNumber=100000
loginShell=/bin/bash
unixHomeDirectory=/home/joe
gecos=
backlink=[securityIdentifierOfUser]
objectClass=CenterisLikewiseUser

In the example, the uid attribute is empty. It is needed only when you want to specify a name alias so that the AD user can log on a computer with something other than his or her AD account name.

In ADSI Edit, the properties for a user look like this:

The keywords attribute is also used to store Linux and Unix group information. Here's an example of how the attribute name-value pairs can contain Unix and Linux information for a group:

backLink=[securityIdentifierOfGroup] description= displayName= gidNumber=100000 objectClass=centerisLikewiseGroup

When you set an alias for a group, it is stored in the displayName attribute (for the group in the example above, no alias has been set, and thus displayName is empty).

In ADSI Edit, the values of the keywords attribute look like this:

Schema mode takes a slightly different approach. To store Linux and Unix user and group information, schema mode takes advantage of the Unix- and Linux-specific RFC 2307 object classes and attributes, namely the posixAccount and posixGroup object classes. For example, the posixAccount and posixGroup object classes include attributes -- uidNumber and gidNumber -- that Likewise uses for UID and GID mapping. In addition, Likewise uses serviceConnectionPoint objects to store the same information as in non-schema mode by using the keywords attribute.

For example, when you create a cell in schema mode, Likewise creates a container object – CN=$LikewiseIdentityCell -- in the domain root, or in the OU where you created the cell. If the container is created in an OU, which is called a named or non-default cell, the Unix-specific data is stored in CN=Users and CN=Groups in the $LikewiseIdentityCell container object. The objects point to the Active Directory user or group information with a backlinked security identifier.

If the container is created at the level of the root domain, it is known as a default cell. In this case, the Unix-specific data is stored directly in the AD user or group account.

If you choose to use schema mode and your schema does not comply with RFC 2307, you must modify the schema. The Likewise Domain Extension Wizard, which is a tool in the console, can automatically upgrade your schema to comply with RFC 2307. (Windows Server 2003 R2 or later complies with RFC 2307.) When you use schema mode with a schema that already complies with RFC 2307, Likewise does not change the schema, but you still must run the Domain Extension Wizard to include the RFC 2307 attributes in the global catalog and to index them for faster searches.

2.3.1. Changes Made by the Schema Wizard

The Active Directory schema changes are applied from a set of LDAP Data Interchange Format (LDIF) files. The standard installation places these files in the following directory:

/Program Files/Likewise/Enterprise/Resources/LDF

After you have raised the domain and forest to 2003 functional levels, the Likewise domain configuration wizard makes the following changes, which are required for Likewise to run in schema mode:

  1. Adds the Windows Server 2003 R2 schema extensions for Unix if they are not already part of the schema. Specifically, the wizard adds uid, uidNumber, gidNumber, gecos, unixHomeDirectory, and loginShell.

  2. Promotes the uid, uidNumber, and gidNumber attributes to the global catalog.

  3. Indexes the uid attribute.

2.3.2. Key Differences

The following table summarizes the differences between schema mode and non-schema mode:

Mode

Use Case

Storage Method

Non-schema mode

AD installations that have not migrated to the latest AD schema; administrators are reluctant or unwilling to change the schema.

AD installations that use Windows 2000 domain controllers.

Likewise uses the description and the keywords attributes of container and serviceConnectionPoint objects to store Unix and Linux information for users, groups, and cells.

Schema mode

AD installations that comply with RFC 2307, such as Windows Server 2003 R2 or later. Or, administrators who are willing to change the schema to RFC 2307 and to raise the forest functional level to Windows Server 2003. AD installations that do not use Windows 2000 domain controllers. (You cannot raise the forest functional level of a Windows 2000 domain controller to that of Windows Server 2003; see http://support.microsoft.com/kb/322692.)

Likewise uses the Unix- and Linux-specific attributes that are built into the RFC 2307 schema as well as the container object and the keywords attribute.

Both schema mode and non-schema mode provide a method for storing Unix and Linux information in Active Directory -- including UIDs and GIDs -- so that Likewise can map SIDs to UIDs and GIDs and vice versa. The mapping lets Likewise use an Active Directory user account to grant a user access to a Unix or Linux resource that is governed by a UID-GID scheme. When an AD user logs on a Unix or Linux computer, the Likewise agent communicates with the Active Directory Domain Controller through standard LDAP protocols to obtain the following authorization data:

  • UID
  • Primary GID
  • Secondary GIDs
  • Home directory
  • Login shell

Likewise uses this information to control the user's access to Unix and Linux resources.

The advantages and disadvantages of the schema modes are further discussed in the next section.

2.3.3. Pros and Cons of the Schema Modes

Likewise has two operating modes: schema mode and non-schema mode. There are advantages and disadvantages to both. The mode that you choose depends on your unique situation.

The optimal setup is schema mode with a default cell. Schema mode is preferred because lookups use attributes indexed in Active Directory, reducing network traffic and the processing load on domain controllers. Forests that are in Windows 2008 Forest Mode are already in Likewise schema mode. Forests in Windows 2003 Forest Mode with Windows 2003 R2 domain controllers can be moved to schema mode without extending the AD schema.

Because of the performance benefits of schema mode, you should avoid non-schema mode whenever you can. Non-schema mode, however, remains fully supported by Likewise.

Non-Schema Mode: Advantages and Disadvantages

The benefit of using non-schema mode is that it does not require you to upgrade the Active Directory schema. This may be preferable in an environment that places special controls around how Active Directory is managed. This mode is sufficient for use in small deployments, such as a single server or workstation that will be added to a single domain controller.

Advantages of non-schema mode include the following:

  • Supports Windows 2000 domain controllers.

  • Does not change the current schema. Likewise objects are contained in their own serviceConnectionPoints.

  • Does not affect settings in a global manner.

  • Does not affect other Unix schema extensions that may be in place.

A disadvantage of non-schema mode is that if you're using third-party software to manipulate AD objects, it will not recognize how Likewise stores data in Active Directory.

Schema Mode: Advantages and Disadvantages

Schema mode raises the version of the schema to match that of Windows Server 2003 R2 -- the schema extensions are added to comply with the standard defined in RFC 2307. These changes are prescribed by Microsoft and are built into Windows Server 2003 R2.

Advantages of schema mode include the following:

  • Uses indexed searching, which makes lookups faster when there are a large number of UID-GID mappings to process.

  • Improves compatibility with other tools.

  • Enhances ADSI scripting capabilities.

Drawbacks of schema mode include the following:

  • Significantly modifies the Active Directory schema in cases where it must be upgraded to RFC 2307. If you are already using the RFC 2307-compliant schema, the schema adds the uid, uidNumber, and gidNumber attributes to the global catalog, which could marginally increase the size of the catalog and might marginally affect performance in a large Active Directory implementation.

  • Requires you to raise the forest functional level to Windows Server 2003.

    Important: If you upgrade your schema to RFC 2307, you cannot roll back the changes.

  • Cannot use schema mode if you have Windows 2000 domain controllers; you must first upgrade them to Windows Server 2003.

There is background information about functional levels at http://technet.microsoft.com/en-us/library/cc738038.aspx and reference information about functional level features at http://technet.microsoft.com/en-us/library/cc771132.aspx.

2.4. About Likewise Cells

A Likewise cell contains Unix settings for Active Directory users and groups so they can log on to Linux, Unix, and Mac OS X computers. For each user, the settings include a Unix user identifier (UID), the group identifier (GID) of the primary group, a home directory, and a shell.

When an Active Directory user logs on a Likewise client, Likewise searches Active Directory for the user's cell information. The search typically begins at the node where the computer is joined and moves up the directory's structure until a cell is found. To operate properly, the Likewise Enterprise agent must find a cell.

There are two types of cells:

  • A cell associated with an organizational unit (OU). Such a cell is sometimes referred to as a named cell. Since Likewise Enterprise applies group policies to organizational units, associating cells with OUs is a natural way to organize computers and users.

  • A cell associated with the domain. Such a cell is known as a default cell.

In a named cell, Likewise searches for a user or group's attributes in the cell associated with the computer.

A default cell is processed in a different way. With a default cell, Likewise searches for a user or group's attributes in the default cell of the domain where the user or group resides. As a result, in a two-domain topology that, for example, uses a separate domain for users and a separate domain for computers, there must be two default cells:

  • A default cell in the domain where user and group objects reside.

  • A default cell in the domain where computers objects are joined.

In a multi-domain topology, then, you must create a default cell in each domain.

Cells can also map a user to different UIDs and GIDs for different computers. In the following screen shot, the example user, Clark Kent, is allowed to access the computers that are in the selected cells:

Creating Cells

Likewise modifies the Active Directory User and Computers MMC snap-in so that you can create a cell associated with an OU and then use the cell to manage UID-GID numbers. To create a cell, use Active Directory Users and Computers to select the OU you want, click the Likewise Settings tab of the object's Properties sheet, and then select the check box to associate a cell with the OU. You can then assign UID-GID numbers manually or let Likewise do it for you.

When a Likewise client connects to Active Directory, the Likewise agent determines the OU of which the computer is a member and checks whether a cell is associated with it. If a cell is not associated with the OU, the Likewise agent on the Unix computer searches the parent and grandparent OUs until it finds an OU that has a cell associated with it. If an OU with an associated cell is not found, the agent uses the default cell to map its username to UID and GID information.

Important: Before you associate a cell with an organizational unit, make sure you have chosen the schema mode that you want. You cannot change the schema mode after you create a cell, including a default cell.

For instructions on how to make a cell, see Create a Cell.

The Default Cell

Likewise lets you define a default cell. It handles mapping for computers that are not in an OU with an associated cell. The default cell can contain the mapping information for all your Linux and Unix computers.

When you use a default cell, Likewise searches across all your trusted domains for Unix and Linux information directly on the user objects. In schema mode, Likewise searches all trusted global catalogs, which are shared across a forest -- Likewise queries the trusted global catalogs as a set. In non-schema mode, Likewise queries each trusted domain individually.

The default cell does not contain Unix or Linux data. It is a method for managing client Linux and Unix users and computers. When a client finds the default cell object, it searches all trusted domains and forests, enterprise wide, for Linux and Unix information, even if the default cell object has not been created in those trusted domains and forests.

A Linux or Unix computer can be a member of an OU that does not have a cell associated with it. In such a case, the group polices associated with the OU apply to the Linux and Unix computer, but user UID-GID mappings follow the policy of the nearest parent cell, or the default cell. Likewise does not require you to have a default cell.

Linking Cells

To provide a mechanism for inheritance and to ease system management, Likewise can link cells. Linking specifies that users and groups in a linked cell can access resources in the target cell. For example, if your default cell contains 100 system administrators and you want those administrators to have access to another cell, called Engineering, you do not need to provision those users in the Engineering cell. You can simply link the Engineering cell to the default cell, and then the Engineering cell will inherit the settings of the default cell. Then, to make management easier, in the Engineering cell you can just specify the mapping information that deviates from the default cell.

Although you can use linking to in effect set up a hierarchy of cells, linking is not transitive. If, for example, a cell called Civil is linked to the Engineering cell and the Engineering cell is linked to the default cell, the Civil cell does not inherit the settings of the default cell.

When you link to multiple cells, the order that you set is important because it controls the search order. Suppose that Kathy, a system administrator, has a UID of 100,000 set in the default cell and a UID of 150,000 set in the Engineering cell. In the Civil cell, however, he must use his UID from the Engineering cell to log on Civil computers. If the Civil cell is linked to both the default cell and Engineering cell, the order becomes important. If Engineering does not precede the default cell in the search order, Kathy will be assigned the wrong UID and will be unable to log on computers in the Civil cell.

For instructions on how to link cells, see Link Cells.

Cell Manager

Cell Manager is a Likewise MMC snap-in for managing cells associated with Active Directory organizational units. With Cell Manager, you can view all your cells in one place. Cell Manager complements Active Directory Users and Computers by letting you delegate management of a cell -- that is, give others the ability to add users and groups to a cell. Cell Manager is automatically installed when you install the Likewise Console. For more information, see Manage Cells.

Migrating NIS Domains

If use Likewise to migrate all your Unix and Linux users to Active Directory, in most cases you will assign these users a UID and GID that is consistent across all the Unix and Linux computers that are joined to Active Directory -- a simple approach that reduces administrative overhead.

In cases when multiple NIS domains are in use and you want to eliminate these domains over time and migrate all users and computers to Active Directory, mapping an Active Directory user to a single UID and GID might be too difficult. When multiple NIS domains are in place, a user typically has different UID- GID maps in each NIS domain. With Likewise, you can eliminate these NIS domains but retain the different NIS mapping information in Active Directory because Likewise lets you use a cell to map a user to different UIDs and GIDs depending on the Unix or Linux computer that they are accessing.

To move to Active Directory when you have multiple NIS servers, you can create an OU (or choose an existing OU) and join to the OU all the Unix computers that are connected to the NIS server. You can then use cells to represent users' UID-GID mapping from the previous identity management system.

Using Multiple Cells

If you have multiple Unix and Linux hosts but are not using a centralized scheme to manage UIDs and GIDs, it is likely that each host has unique UID-GID mappings. You may also have more than one centralized IMS, such as multiple NIS domains. You can use multiple cells to represent the UID-GID associations that the NIS domain provided, allowing those Unix and Linux users to continue to use their existing UID-GID information while using Active Directory credentials.

When using multiple cells, it is useful to identify what Unix and Linux objects the cell will represent, such as the following:

  • Individual Unix, Linux, or Mac OS X computers

  • A single NIS domain

  • Multiple NIS domains (which requires multiple cells)

Migration Tool

The Likewise Console provides a migration tool to import Linux, Unix, and Mac OS X passwd and group files -- typically /etc/passwd and /etc/group -- and automatically map their UIDs and GIDs to users and groups defined in Active Directory. The migration tool can also generate a Windows automation script to associate the Unix and Linux UIDs and GIDs with Active Directory users and groups. For more information, see Migrate Users to Active Directory.

Orphaned Objects Tool

The Likewise console provides a tool for finding and removing orphaned objects. An orphaned object is a linked object, such as a Unix or Linux user ID or group ID, that remain in a cell after you delete a group or user's security identifier, or SID, from an  Active Directory domain. Removing orphaned objects from Active Directory can clean up manually assigned user IDs and improve search speed. For more information, see Find Orphaned Objects.

2.5. Best Practices for Modes, Cells, Group Policies, and User Rights

In general, the optimal setup is schema mode with a default cell. Schema mode is strongly preferred because lookups use attributes indexed in Active Directory, reducing network traffic and the processing load on domain controllers. When Unix identity information does not overlap, you should use schema mode with a default cell. If you require multiple cells to keep Unix identities from coming into conflict, use schema mode with named cells. Try to minimize the number of named cells you use, preferably no more than four.

Forests that are in Windows 2008 Forest Mode are already in Likewise schema mode. Forests in Windows 2003 Forest Mode with Windows 2003 R2 domain controllers can be moved to schema mode without extending the AD schema.

Because of the performance benefits of schema mode, you should avoid non-schema mode whenever you can. Non-schema mode, however, remains fully supported by Likewise.

Migrating from a non-schema default cell to a default cell in schema mode requires more work and is riskier than any other kind of cell migration. So, to ease migration in the future and to improve support, non-schema mode cells should be created only as named cells -- that is, cells associated with organizational units.

Although you could use cells to limit access to a computer, doing so goes against the design of Active Directory. It is recommended that you control access and authorize users with methods other than cells. Instead, you can control access by using the RequireMembershipOf setting in the registry or the group policy, named Allow Logon Rights, that manages the RequireMembershipOf setting.

Likewise recommends the following additional best practices:

  • You should either pre-stage Unix computer accounts or you should delegate to Unix system administrators control of the OU to which the Unix computers will be joined. For information on how to delegate control, see Best Practices for Delegating Active Directory Administration. For information on how to pre-create computer accounts, see Domain Users Cannot Join Workstation or Server to a Domain.

  • You should follow the same best practices for applying group policy objects that Microsoft recommends at TechNet.

  • To simplify troubleshooting across multiple operating systems, you should avoid heavy use of Likewise's target platform filter for group policies.

There are additional best practices for managing the security of the Likewise database; see the chapter on installing and configuring the Likewise database.

Finally, more best practices are listed in Likewise professional services' Best Practices Guide.

Chapter 3. Installing and Using the Console

3.1. About the Likewise Console

You install the Likewise Management Console on a Windows administrative workstation connected to a domain controller to administer Linux, Unix, and Mac OS X computers in Active Directory. When you install the console, it adds extension tabs to the properties sheets of most objects in Active Directory Users and Computers (ADUC). The extension tabs, named Likewise Settings and Likewise NIS Maps, let you manage Unix settings in ADUC. In addition, the Likewise group policies are added to the Group Policy Management Console and the Group Policy Object Editor.

After you install the console, you can use Active Directory Users and Computers to manage Unix and Linux users and groups, including their UID and GID information, their default logon shell, and their default home directory. You can also use the Group Policy Object Editor to create and edit Linux- and Unix-specific group policies, and you can use the Group Policy Management Console to view information about Likewise group policies.

You can use the console to perform the following tasks:

  • Run multiple instances of the console and point them at different domains.

  • Run the console with a different user account.

  • Upgrade your Active Directory schema.

  • Obtain status information about your Active Directory forests and domains.

  • Migrate Unix and Linux users and groups by importing passwd and group files and mapping the information to users and groups in Active Directory.

  • Remove orphaned objects.

  • Generate reports about users, groups, and computers.

3.2. Requirements

This section lists the requirements to use Likewise Enterprise with Active Directory. Requirements for the Likewise agent -- the software that runs on the Linux, Unix, and Mac OS X computers that you want to connect to AD -- are listed in About Installing the Agent.

You must have at least the following components:

  1. An Active Directory domain controller.

  2. A Windows administrative workstation that is running ADUC and is connected to your Active Directory domain controller.

    Because Likewise enhances ADUC, GPOE, and GPMC to support Unix computers, you must make sure that the Microsoft management tools for Active Directory are installed before you install Likewise. The Microsoft management tools vary by Windows version, but typically include the Admin Pack for Windows XP and Windows Vista and the Remote Server Administration Tools (RSAT) for Windows 7 and Windows Server 2008 R2.

    With Windows 7 and Windows 2008 R2, you must turn on the following features of the Remote Server Administration Tools by going to the Control Panel, selecting Programs, and then selecting Turn Windows features on or off: Group Policy Administration Tools, Active Directory Module for Windows PowerShell, Active Directory Administrative Center, AD DS Snap-ins and Command-Line Tools. For more information, see the description of the Remote Server Administration Tools for Windows 7 and your Microsoft Windows documentation.

  3. One or more Unix or Linux computers running an operating system that Likewise supports, such as versions of Mac OS X, Red Hat, SUSE Linux, Fedora, CentOS, Debian, Sun Solaris, IBM AIX, HP-UX, and Ubuntu. For a complete list of supported platforms, see the list at www.Likewise.com.

Administrator Privileges

  • Root access or sudo permission on the Unix, Linux, and Mac OS X computers that you want to join to the domain.

  • Active Directory credentials that allow you to add computers to an Active Directory domain -- for example, membership in the Domain Administrators security group or the Enterprise Administrators security group.

Active Directory Requirements

  • Windows 2003 SP1 or R2 Standard and Enterprise

  • Windows Server 2008

  • Windows 2000 SP4 Server

Windows Requirements for the Console

  • Windows 2003 SP1 or R2 (or later)

  • Windows XP Professional, SP3 -- requires the Windows Admin Pack

    Note: The 64-bit version of Windows Server 2003 and the 64-bit version of Windows XP are not supported.

  • Windows Server 2008 SP1 or R2

  • Windows 7 Professional

  • Windows Vista SP1

  • Microsoft .NET 1.1 Framework

  • Microsoft .NET 2.0 Framework

  • MSXML 6.0 Parser (for displaying reports in the GPMC)

  • MMC 3.0 Update

    Note: You cannot install MMC 3.0 on a Windows 2000 computer, and thus you cannot install the Likewise Console on a Windows 2000 computer.

  • 50 MB of free space

Requirements to Run Likewise in Schema Mode

  • Active Directory installations that comply with RFC 2307, such as Windows Server 2003 R2.

  • Domain and forest functional levels have been raised to Windows Server 2003 or higher.

  • No Windows 2000 domain controllers (raising the forest functional level to Windows Server 2003 excludes Windows 2000 domain controllers from the domain).

For more information, see About Schema Mode and Non-Schema Mode and Pros and Cons of the Schema Modes.

Remediation Requirements for Active Directory

Networking

The subnets with your Linux, Unix, and Mac computers must be added to Active Directory sites before joining the computers to Active Directory so that the Likewise agent can detect the optimal domain controller and global catalog.

Replication

Make sure your AD replication system is up to date and functioning properly by using the following diagnostic tools from http://www.microsoft.com/download to test replication. For instructions, see the Microsoft documentation for each tool.

  1. DCDiag. Part of Microsoft's support tools for Windows Server 2003, dcdiag.exe should be run with the /v /c /e switches to test all the domain controllers in all your sites.

  2. FRSDiag. Use frsdiag.exe tool, available from the Microsoft Resource Kit tools, to check the File Replication Service (FRS).

In addition, the following tools can help you review and troubleshoot FRS problems.

Sonar. Optionally use it to perform a quick review of FRS status.

Ultrasound. Optionally use it to monitor and troubleshoot FRS.

ReplMon. Included in the Microsoft Resource Kit Tools, use it to investigate replication problems across links where DCDiag showed failures.

3.3. Install the Likewise Console

You install the Likewise Management Console on a Windows administrative workstation that can connect to your Active Directory domain controller. It is recommended that you do not install the console on a domain controller. (For instructions on how to use the Likewise metainstaller to install the console and other components, see the Likewise Evaluation Guide.)

In addition to the console, the Likewise Enterprise installer for Windows includes several components: the Likewise migration tools, Gnome group policy schemas, and GPMC support.

Important Note About Upgrading: To upgrade to the latest version of Likewise Enterprise on your Windows administrative workstation, first uninstall the existing version. Then, before installing the latest version of Likewise Enterprise, install the latest version of the Microsoft Group Policy Management Console and run Windows update to make sure your workstation has the latest XML patches.

  1. Verify that your administrative workstation is running a version of Windows that Likewise supports (see the list in the section on requirements) and has 50 MB of free disk space.

  2. Because Likewise enhances ADUC, GPOE, and GPMC to support Unix computers, make sure that the Microsoft management tools for Active Directory are installed before you install the console.

    The Microsoft management tools vary by Windows version, but typically include the AdminPak for Windows XP and Windows Vista and the Remote Server Administration Tools (RSAT) for Windows 7.

  3. Locate LikewiseEnterprise.exe on your installation media. (The file name might also contain a version and build number.) It is a standard MSI installer. Copy it to the desktop of your Windows administrative workstation.

  4. Execute LikewiseEnterprise.exe with an Active Directory account that has privileges to modify objects and child objects in Active Directory -- for example, an account that is a member of the Domain Administrators or the Enterprise Administrators security group.

  5. Follow the instructions in the installation wizard.

  6. Select the Likewise features you want to install:

    To

    Install

    Install the Likewise extension tabs for ADUC and other base tools and code that Likewise uses to manage Unix information in Active Directory.

    This component is required.

    Likewise

    Install the Likewise migration tools, including the tool to import Linux, Unix, and Mac OS X passwd and group files and the tool to upgrade a previous version of Likewise to the current version.

    Likewise Migration Tools

    Install the Likewise Management Console. It runs on a Windows administrative workstation that connects to an Active Directory domain controller to help you manage Linux and Unix computers in Active Directory. The console lets you view status and start several Likewise tools, such as Cell Manager.

    The console also serves as an extensible service for running several other Likewise management applications, called snap-ins or plug-ins. A plug-in named Provisioning Management is included when you install the Likewise Management Console and it is loaded by default when you run the console. The other plug-ins include Enterprise Data Management, the Operations Dashboard, and Audit and Access Reporting, all three of which are new components provided as a technology preview.

    Likewise Management Console and its components

    Install the Gnome GConf group policy schemas. The schemas are used to apply user settings to Gnome desktops.

    Gnome Group Policy Schemas

    Install features that support managing and viewing Likewise group policies in the Microsoft Group Policy Management Console.

    GPMC support

  7. If you do not have MMC 3.0 installed, you are prompted to install it.

  8. If you do not have .NET 2.0 installed, you are prompted to install it.

3.4. Start the Likewise Console

Before you can start the Likewise Management Console, it must be installed on your administrative desktop. Depending on the options chosen during installation, the console can be started in the following ways:

  • Double-click on the Likewise Management Console desktop shortcut .

  • Click Start, point to All Programs, click Likewise, and then click Likewise Management Console.

  • At the command prompt, execute the following commands:

    cd %ProgramFiles%\Likewise\Enterprise\

    iconsole.lmc

Tip: You can run multiple instances of the Likewise Console and point them at different domains.

The Likewise Console page is the first screen that is displayed after you start the console. From the page, you can navigate to all other pages in the console, including the Status page. You can also start Active Directory Users and Computers (ADUC), Cell Manager, and the Migration tool.

The Forest Status page displays the following information for the selected Active Directory forest. After you start the console, it may take a few moments to retrieve information about your domains.

Likewise Version: The Likewise version and build number. Technical support personnel may ask you for this information when you contact them for assistance.

Consistency check: Indicates whether Active Directory has been properly prepared for the current operating mode. Typically this status indicator reads as Good.

Cell count: Displays the number of cells that are associated with organizational units in the selected domain, including the default cell.

Mode: Either schema or non-schema. Schema indicates that the selected forest is using the RFC 2307-compliant schema. Non-schema indicates that it is not.

3.5. Connect to a Domain

If Likewise detects more than one Active Directory forest, it displays them on the Likewise Console's Forest Status page. You can connect to a forest by double-clicking the forest name.

You can connect to another domain as follows:

  1. In the Likewise Management Console tree, right-click the Provisioning Management node, and then click Connect to Domain.

  2. In the Fully Qualified Domain Name box, enter the FQDN of the domain that you want to connect to.

  3. In the NT4-style Domain Name box, enter the short name of the domain.

  4. In the Username and Password boxes, enter the credentials of an Active Directory administrator. It is recommended that you use the AD Enterprise Administrators security group account.

3.6. Run the Schema Mode Wizard

After you install the Likewise Management Console for the first time, you can run the Schema Mode Wizard to upgrade your Active Directory schema to that of Microsoft Windows Server 2003 R2, which provides support for RFC 2307. The Run Schema Mode Wizard button appears only if you have not run the Schema Mode Wizard and if you have not created any Likewise cells. In non-schema mode, the button will reappear after you remove all your Likewise cells.

Likewise has two operating modes: schema mode and non-schema mode. Non-schema mode stores Linux and Unix data without requiring RFC 2307 object classes and attributes and without modifying the existing schema. Non-schema mode is Likewise's default mode, and you do not need to run the schema mode wizard to use it.

Schema mode takes advantage of the Unix- and Linux-specific RFC 2307 object classes and attributes, namely the posixAccount and posixGroup object classes. The wizard upgrades your schema to RFC 2307. If you are already using Windows Server 2003 R2, running the wizard indexes frequently searched attributes in the Active Directory global catalog.

Before you decide which schema mode is right for your environment, see About Schema Mode and Non-Schema Mode and Pros and Cons of the Schema Modes.

Important: You cannot roll back the changes that the schema mode wizard makes to the Active Directory schema. Back up Active Directory before you run the wizard.

Run the Schema Mode Wizard

To raise the forest functional level and to upgrade the schema, you must be a member of the Enterprise Administrators security group or the Schema Administrators security group for the forest.

  1. On your Windows administrative workstation, use Active Directory Domains and Trusts to raise the forest functional level of your Active Directory forest to Windows 2003. To raise the forest functional level to Windows 2003, you must first raise the domain functional level for each domain in your forest to Windows 2003. For more information, see Active Directory Domains and Trusts Help.

    Note: Raising the forest functional level to Windows Server 2003 will exclude Windows 2000 domain controllers from the domain.

  2. In the Likewise Management Console tree, click Status.

  3. In the left pane, click the forest for which you want to upgrade the schema.

  4. Click Run Schema Mode Wizard:

    Note: The Run Schema Mode Wizard button appears only if the forest has not been configured for Likewise and if you have not created any Likewise cells.

  5. Follow the instructions in the wizard.

3.7. Replication in a Large Forest or in Multiple Domains

When you set up Likewise in an environment with a large forest or multiple domains, it may take some time for the Likewise objects and the schema update to replicate to the rest of the domain.

Replication must complete before the domain and its child domains are fully enabled for Likewise. You will be unable to connect to a child domain until replication finishes.

3.8. Upgrade the Schema of a Forest

One or more domains that share a common schema and global catalog are known as a forest. With Likewise, you can upgrade the schema of a forest. To do so, you must be a member of the Enterprise Administrators security group or the Schema Administrators security group for the forest.

Important: To apply the schema extensions only to a single forest, select only the forest that you want.

  1. In the Likewise Management Console, click the Status tab.

  2. In the Forest tree, select the forest, domain, or child domain that you want to configure.

  3. In the right pane, click Run Schema Mode Wizard.

    Note: The Run Schema Mode Wizard button appears only if the forest has not been configured for Likewise.

  4. Follow the instructions in the wizard. For more information, see Run the Schema Mode Wizard.

3.9. Add a Plug-In

The console includes several plug-ins: Access and Audit Reporting, Enterprise Database Management, and the Operations Dashboard.

  1. In the console, on the File menu, click Add/Remove Plug-in.

  2. Click Add.

  3. Click the plug-in that you want, and then click Add.

  4. Click Close, and then click OK.

Chapter 4. Working with Cells

4.1. Make a Cell and Associate it with an OU or a Domain

To create a Likewise cell and associate it with a domain or an organizational unit (OU), you must have Active Directory administrative privileges that allow you to create container objects within an OU or a domain. To associate a cell with an OU, for example, you must be a member of the Domain Administrators security group, or you must have been delegated control to create container objects within the OU.

Important: Before you associate a cell with an organizational unit, make sure you have chosen the schema mode that you want. You cannot easily change the schema mode after you create a cell, including a default cell.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the OU or the domain for which you want to create a cell, click Properties, and then click the Likewise Settings tab.

    Important: Do not create a cell in the built-in OU named Domain Controllers.

  3. Under Likewise Cell Information, select the Create Associated Likewise Cell check box, and then click OK.

     

    You can now associate users with the cell.

4.1.1. Moving a Computer to Another Cell

When you move a computer from one cell to another, you must do the following if you want the cell information to be updated immediately on the client:

  • Clear the authentication cache for user and group membership: lsass-adcache.db. For instructions, see Clear the Authentication Cache.

  • Restart the Likewise authentication daemon by executing the following command as root: /etc/init.d/lsassd restart

  • Force the computer to refresh its group policies by executing the following command as root: /opt/likewise/bin/gporefresh

4.2. Create a Default Cell

Likewise gives you the option of defining a default cell. It handles mapping for computers that are not in an OU with an associated cell. The default cell can contain the mapping information for all your Linux and Unix computers. Likewise Enterprise does not require a default cell.

A Linux or Unix computer can be a member of an OU that does not have a cell associated with it. In such cases, the group polices associated with the OU apply to the Linux and Unix computer, but user UID-GID mappings follow the policy of the nearest parent cell, or the default cell.

To create a default cell, in the Active Directory Users and Computers console tree, right-click the name of your domain, click Properties, click the Likewise Settings tab, and then click Create Associated Likewise Cell.

4.2.1. Use Pre-Existing RFC 2307 Data

To recognize and use pre-existing Unix data that is stored in Active Directory with RFC 2307 attributes, make sure Likewise is in schema mode and then create a default cell.

4.3. Associate a User with One or More Cells

In Active Directory Users and Computers, you can associate a user with one or more Likewise cells to give the user access to the Linux, Unix, and Mac OS X computers that are members of each cell.

Note: To associate a user with a cell, you must log on with sufficient administrative privileges -- for example, as a member of the Domain Administrators group.

  1. Start Active Directory Users and Computers.

  2. In the console tree, click Users.

  3. In the details pane, right-click the user that you want, and then click Properties.

  4. Click the Likewise Settings tab.

  5. Under Likewise Cells, select the check box for the cell that you want to associate the user with. You can associate the user with multiple cells by selecting the check boxes for the cells that you want.

    Under User info for cell, a default GID value, typically 100000, is automatically populated in the GID box.

    Note: The user's settings can vary by cell.

  6. To set the UID, click Suggest, or type a value in the UID box.

See Also

Assign a Group ID

4.4. Add a Group to a Cell

You can add an Active Directory group to a cell after you have associated a cell with an organizational unit (OU).

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the OU with an associated cell to which you want to add a group, click Properties, and then click the Likewise Settings tab:

  3. Click Add, select the group that you want to add, and then click OK.

4.5. Add a User to a Cell

You can add an Active Directory user to a cell after you have associated a cell with an organizational unit (OU).

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the OU with an associated cell to which you want to add a user, click Properties, and then click the Likewise Settings tab:

  3. Click Add, locate and select the user that you want to add, and then click OK.

4.6. Link Cells

Linking specifies that the computers in the current cell can be accessed by the users in the cell that you link to (the linked cell).

In the scenario shown in the screenshot below, the current cell is EditorialDepartment. When you link to the Engineering cell from the Likewise Settings tab for EditorialDepartment, the users in Engineering can access the computers in EditorialDepartment.

The following example demonstrates how linking cells can be useful:

If your default cell contains 100 system administrators and you want those administrators to have access to the computers in another cell, called Engineering, you do not need to provision those users in the Engineering cell. You can simply link the Engineering cell to the default cell, and then the Engineering cell inherits the settings of the default cell. For more information on linking cells, see About Cells.

  1. On your administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the organizational unit that is associated with the cell you want to link to another cell, and then click Properties.

  3. Click the Likewise Settings tab.

  4. Click Linked Cells, click Add, click the cell that you want, and then click OK.

  5. When you link to multiple cells, the order that you set is important because it controls the search order. The cells are searched in the order listed. Use Move Up or Move Down to set the order of the cells.

    For an example of how the search order can be important, see About Cells.

  6. Click OK.

4.7. Delegate Control to Create Container Objects

To associate a Likewise cell with an Active Directory organizational unit, an administrator must have permission to create container objects within the OU. A member of the Domain Administrators or Enterprise Administrators security group can delegate control of the OU to another administrator.

  1. In Active Directory Users and Computers, in the console tree, right-click the OU for which you want to delegate permissions, and then click Delegate Control.

  2. Click Next.

  3. Click Add, find the user that you want, click OK, and then click Next.

  4. Select Create a custom task to delegate, and then click Next.

  5. Select This folder, existing objects in this folder, and creation of new objects in this folder, and then click Next.

  6. Under Permissions, select the following, and then click Next:

    Read
    Write
    Create All Child Objects
    Delete All Child Objects
    Read All Properties
    Write All Properties

  7. Click Finish.

Tip: For more information about delegating control, see Delegating Administration in Active Directory Users and Computers Help.

4.8. Administering Cells with Cell Manager

Cell Manager is a Likewise MMC snap-in for managing cells associated with Active Directory organizational units.

With Cell Manager, you can delegate management, change permissions for a cell, add cells, view cells, and associate cells with OUs to provide users and groups with Linux and Unix access. Cell Manager also lets you connect to another domain and filter cells to reduce clutter.

Cell Manager is automatically installed when you install the Likewise Console.

Start Cell Manager

  1. In the Likewise Enterprise Console tree, click Diagnostics & Migration.

  2. Under Tasks, click Launch Cell Manager.

Tip: To start Cell Manager from the Start menu, click Start, point to All Programs, click Likewise, and then click Likewise Cell Manager.

Delegate Management

You can use Cell Manager to create an access control list (ACL) that allows users or groups without administrative privileges to perform the administrative operations that you specify. For example, you can delegate management for the cell manager node to allow other users to create and delete cells. You can delegate management of a cell, a group, or a user.

  1. In the Cell Manager console tree, right-click the folder of the cell that you want to delegate management for, and then click Delegate Control.

  2. Follow the instructions in the Delegate Control Wizard.

Change Permissions of a Cell, Group, or User

  1. In the Cell Manager console tree or in the details pane, right-click the object that you want to change permissions for, and then click Properties.

    Tip: To select multiple users or groups, in the details pane, hold down CTRL and click the users or groups that you want to change.

  2. Click Permissions.

  3. Make the changes that you want.

Add a Cell

When you add a cell, you must attach it to an Organizational Unit in Active Directory.

  1. In the Cell Manager console tree, right-click the top-level Cell Manager domain node, point to New, and then click Cell.

  2. In the list of OUs, expand the tree and then click the OU to which you want to attach the cell.

    Note: You cannot attach a cell to the top-level node (the domain).

  3. In the First available user ID box, enter the number that you want. Keep in mind that the user ID range cannot overlap with the ID range of another cell.

  4. In the First available group ID box, enter the number that you want. Keep in mind that the user ID range cannot overlap with the ID range of another cell.

  5. In the Home directory template box, type the path for the home directory that you want to set for users in the cell -- for example, /home/%D/%U.

    Important: When you set the home directory, you must use the default user name variable (%U). You may specify the default domain name by using the domain name variable (%D) but, unlike the user name variable, it is not required.

  6. In the Default login shell box, type the path to the default shell that you want to use -- for example, /bin/ sh.

Give a User Access to a Cell

When you give a user access to a cell by using Cell Manager, you can add the new user to the cell only with default attributes. You can change the attributes later by using in Active Directory Users and Computers; see Specify a User's ID and Unix or Linux Settings.

  1. In the Cell Manager console tree, right-click the cell that you want to give a user access to, point to New, and then click User.

  2. Find and select the user that you want to add, and then click OK.

Give a Group Access to a Cell

When you give a group access to a cell by using Cell Manager, you can add the new group to the cell only with default attributes. You can change the attributes later by using Active Directory Users and Computers.

  1. In the Cell Manager console tree, right-click the cell that you want to give a user access to, point to New, and then click Group.

  2. Find and select the group that you want to add, and then click OK.

Filter Cells

You can use filtering to set the maximum number of cells to display and show only the cells that match a pattern.

  1. In the Cell Manager console tree, right-click the top-level Cell Manager domain node, and then click Filter.

  2. Set the filtering values that you want to use.

Connect to a Different Domain

Even though users and groups imported from a different domain appear in Cell Manager, you cannot modify their settings from outside their original domain. Instead, to modify the settings of a user or group imported from another domain, use Cell Manager to connect to that domain and then make the changes that you want.

  1. In the Cell Manager console tree, right-click the top-level Cell Manager domain node, and then click Connect To Domain.

  2. In the Domain box, type the domain that you want, or click Browse, and then locate the domain that you want.

Chapter 5. Managing Users, Groups, and Computers

5.1. Modify Likewise Settings in ADUC

In Microsoft Active Directory Users and Computers, you can modify your Likewise settings for a domain, an organizational unit, a group, or a user. Likewise adds a tab to the property sheet of the following objects in the Active Directory Users and Computers MMC snap-in:

  • Domain: Likewise Settings

  • Users: Likewise Settings

  • Groups: Likewise Settings

  • Organizational Units:

    • Likewise Settings (for the associated cell)

    • Group Policy (with Likewise Enterprise)

Important: To change the settings, you must log on as a member of the Domain Administrators security group, the Enterprise Administrators security group, or another group that gives you sufficient privileges to modify objects in Active Directory. Or you must have been delegated privileges to modify the settings of the objects that you want to change; for more information, see Delegate Management.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the object that you want to change, click Properties, and then click the Likewise Settings tab.

  3. Make the changes that you want.

5.2. Create a User

To create a Unix or Linux user account in Active Directory, you must have sufficient administrative privileges -- for example, as a member of the Enterprise Administrators group, the Domain Administrators group, or as a delegate.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click Users, point to New, and then click User.

  3. Enter the name and logon name information for the user, and then click Next.

    Tip: For more information, see Create a New User Account in Active Directory Users and Computers Help.

  4. In the Password box and the Confirm password box, type a password for the user, select the password options that you want, and then click Next.

  5. Click Finish.

  6. In the console tree, right-click the user that you just created, and then click Properties.

  7. Click the Likewise Settings tab.

  8. Under Likewise Cells, select the check box for the cell that you want to associate the user with. The user's settings can vary by cell.

    Under User info for cell, a default value, typically 100000, is automatically populated in the GID box.

  9. To set the UID, click Suggest, or type a value in the UID box.

  10. To override the default home directory and login shell settings, in the Home Directory box, type the directory that you want to set for the user, and then in Login Shell box, type the login shell that you want.

  11. Optionally, you can set a login name for the user in the Login Name box and add a comment in the Comment box. You use the Login Name box to set a login name for the user that is different from the user's Active Directory login name. If you leave the Login Name box empty, the user logs on Linux and Unix computers by using his or her Active Directory login name.

See Also

Create a Cell

5.3. Finding Users and Groups in ADUC

Because of a limitation with the Active Directory Users and Computers snap-in, when you try to find a Likewise user or group by right-clicking an organizational unit and then clicking Find, the user or group will not appear in the results even when the user or group is in the OU. The Find command does, however, work at the level of the domain.

As an alternative, you can find Likewise users and groups in an OU by using the following procedure:

  1. In the console tree, right-click the OU with an associated cell in which you want to find a user or a group, click Properties, and then click the Likewise Settings tab:

  2. Click Add and use the dialog box that appears to find the object that you want.

5.4. Provision a User with Linux or Unix Access

To provide an Active Directory user with Unix, Linux, or Mac access, you must have sufficient administrative privileges -- for example, as a member of the Enterprise Administrators group, the Domain Administrators group, or as a delegate.

Tip: For a Mac OS X user, limit group membership to less than 45 groups that are enabled for Unix access. Because of a limitation with Mac OS X, membership in groups other than the primary group is not enumerated for a user who belongs to more than 45 groups.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the user that you want, and then click Properties.

  3. Click the Likewise Settings tab.

  4. Under Likewise Cells, select the check box for the cell that you want to give the user Linux or Unix access.

    Note: If no cells appear under Likewise Cells, see Create a Cell or Create a Default Cell.

  5. Under User info for cell, to set the UID, click Suggest, or type a value in the UID box.

    Note: The user's settings can vary by cell.

  6. In the GID box, a default value, typically the GID for the Domain Users group, is automatically populated in the GID box. To change the GID, click the drop-down list, and select the group that you want.

    Note: If the group that you want is unavailable, you must first add the group to the cell; see Add a Group to a Cell.

  7. To override the default home directory and login shell settings, in the Home Directory box, type the directory that you want to set for the user, and then in Login Shell box, type the login shell that you want.

  8. Optionally, you can set a login name for the user in the Login Name box and add a comment in the Comment box. You use the Login Name box to set a login name for the user that is different from the user's Active Directory login name. If you leave the Login Name box empty, the user logs on Linux and Unix computers by using his or her Active Directory login name.

5.5. Provision a Group with Linux or Unix Access

To provide an Active Directory group with Unix, Linux, or Mac access, you must have sufficient administrative privileges -- for example, as a member of the Enterprise Administrators group, the Domain Administrators group, or as a delegate.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the group that you want, and then click Properties.

  3. Click the Likewise Settings tab.

  4. Under Cells, select the check box for the cell that you want to provide the group access to.

    Note: If no cells appear under Likewise Cells, see Create a Cell or Create a Default Cell.

  5. Under Group info for cell, to set the GID for the group in the cell you selected, click Suggest, or type a value in the GID box.

  6. Optionally, you can set an alias for the group: In the Group Alias box, type an alias. The alias applies only within the cell.

5.6. Specify a User's ID and Unix or Linux Settings

You can set a user's identifier (UID) and specify the user's Unix, Linux, or Mac OS X settings.

Note: To provide a user with a UID and Unix or Linux settings, you must have sufficient administrative privileges -- for example, as a domain administrator or as a delegate. To delegate administrative privileges to another user, see Delegate Management.

  1. On your administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, click Users.

  3. In the details pane, right-click the user that you want, and then click Properties.

  4. Click the Likewise Settings tab.

  5. Under Likewise Cells, select the check box for the cell that you want to associate the user with.

    Under User info for cell, a default value is automatically populated in the GID box. You can change the user's primary group by select the group that you want from the drop-down list.

  6. To set the UID, click Suggest, or type a value in the UID box.

    Tip: To generate a report that shows duplicate UIDs, see Show Duplicate UIDs, GIDs, Login Names, and Group Aliases.

  7. To override the default home directory and login shell settings, in the Home Directory box, type the directory that you want to set for the user, and then in Login Shell box, type the login shell that you want.

  8. Optionally, you can set a login name for the user in the Login Name box and add a comment in the Comment box. You use the Login Name box to set a login name for the user that is different from the user's Active Directory login name. If you leave the Login Name box empty, the user logs on Linux and Unix computers by using his or her Active Directory login name.

See Also

Resolve an AD Alias Conflict with a Local Account

5.7. Apply Unix or Linux Settings to Multiple Users

Likewise lets you apply Unix, Linux, and Mac OS X settings to multiple users at the same time. For example, you can assign multiple users to a cell and then set their home directory.

The users must be members of a group that is associated with a cell and each user must have a UID-GID mapping.

Note: To change users' settings, you must log on as a member of the Domain Administrators security group or the Enterprise Administrators security group. Or, you must have been delegated privileges to modify the settings of the user objects that you want to change; for more information, see Delegate Management.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, click Users, or expand the container that holds the users that you want.

  3. In the details pane, hold down CTRL and click the users that you want.

  4. Right-click the selected range of users, click Properties, and then click the Likewise Settings tab.

  5. Under UNIX/Linux User Information, select the check box for the cell to which you want to assign the users.

    By assigning the users to a cell, you are enabling them for access to the Unix, Linux, and Mac OS computers that are in the cell.

  6. Under User Info, make the changes that you want.

    You can specify a GID for the users, and you can set their login shell and home directory.

5.8. Set a User Alias

You can set an alias for an Active Directory user so that the user can use the alias to log on a Linux, Unix, or Mac OS X computer joined to Active Directory. The alias is set only for the cell that you select when you set it.

  1. On your Windows administrative workstation, in Active Directory Users and Computers, expand the folder for your domain, and then expand Users.

  2. Right-click the user that you want, click Properties, and then click the Likewise Settings tab.

  3. Under Likewise Cells, click the cell that you want the user's alias to apply in.

  4. In the Login Name box, type an alias for the user.

5.9. Set a Group Alias

You can create an alias for a group that is part of a Likewise cell, including the default cell. The group can use the alias within the cell.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, click Users.

  3. In the list of users, right-click the group that you want, click Properties, and then click the Likewise Settings tab.

  4. Under Cells, select the check box for the cell that you want to set a group alias for, and then in the Group Alias box, type an alias for the group.

    Tip: To generate a report that shows duplicate group aliases, see Show Duplicate UIDs, GIDs, Login Names, and Group Aliases.

5.10. Set the Default Home Directory

There are three ways that you can set the default home directory for Linux, Unix, and Mac OS X users:

  • Set a cell's default home directory by using the Likewise Settings tab for an organizational unit's properties in Active Directory Users and Computers.

  • Select multiple users in Active Directory Users and Computers and then set their default home directory.

  • Set an individual user's default home directory by using the Likewise Settings tab for the user's properties in Active Directory Users and Computers.

When you set the default home directory, you must use the default user name variable (%U). You may specify the default domain name by using the domain name variable (%D) but, unlike the user name variable, it is not required.

Important: On Solaris, you cannot create a local home directory in /home, because /home is used by autofs, Sun's automatic mounting service. The standard on Solaris is to create local home directories in /export/home.

Set the Home Directory for a Cell

To set a default home directory for a cell, you must have Active Directory administrative privileges to modify OU objects.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the OU for which you want to set a home directory, click Properties, and then click the Likewise Settings tab.

  3. Under Likewise Cell Information, in the Default Home Directory box, type the home directory that you want to set for the groups and users in the cell.

Set the Home Directory for Multiple Users

To change users' settings, you must log on as a member of the Domain Administrators security group or the Enterprise Administrators security group. Or, you must have been delegated privileges to modify user settings; see Delegate Management.

  1. On your administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, expand Users, or expand the container that holds the users that you want.

  3. In the details pane, hold down CTRL and click the users that you want.

  4. Right-click on the selected range of users, click Properties, and then click the Likewise Settings tab.

  5. Under UNIX/Linux User Information, select the check box for the cell that contains the users whose home directory you want to set.

    Note: Selecting a check box for a cell assigns the selected users to the cell and gives them access to the Unix, Linux, and Mac OS computers that are in the cell.

    If the check box for the cell that you want is already selected, click the name of the cell.

  6. In the Home Directory box, type the path for the home directory that you want to set -- for example, /home/%D/%U.

Set the Home Directory for a Single User

To change a user's settings, you must log on as a member of the Domain Administrators security group or the Enterprise Administrators security group. Or, you must have been delegated privileges to modify user settings; see Delegate Management.

  1. On your administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, expand Users.

  3. Right-click the user that you want, click Properties, and then click the Likewise Settings tab.

  4. In the list under Likewise Cells, click the cell for which you want to set the user's home directory.

  5. In the Home Directory box, type the path for the home directory that you want to set -- for example, /home/%D/%U.

5.11. Set the Default Login Shell

By using Likewise, there are two ways that you can set the default login shell for Linux, Unix, and Mac OS X users:

  • Set a cell's default login shell by using the Likewise Settings tab for an organizational unit's properties in Active Directory Users and Computers.

  • Select multiple users in Active Directory Users and Computers and then set their default login shell.

  • Set an individual user's default login shell by using the Likewise Settings tab in Active Directory Users and Computers.

Set the Login Shell for a Cell

To set a default login shell for a cell, you must have Active Directory administrative privileges to modify OU objects.

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, right-click the OU for which you want to set a login shell, click Properties, and then click the Likewise Settings tab.

  3. Under Likewise Cell Information, in the Default Login Shell box, type the login shell that you want to set for the users and groups in the cell.

Set the Login Shell for Multiple Users

To change users' settings, you must log on as a member of the Domain Administrators security group or the Enterprise Administrators security group. Or, you must have been delegated privileges to modify user settings; see Delegate Management.

  1. On your administrator workstation, start Active Directory Users and Computers.

  2. In the console tree, expand Users, or expand the container that holds the users that you want.

  3. In the details pane, hold down CTRL and click the users that you want.

  4. Right-click on the selected range of users, click Properties, and then click the Likewise Settings tab.

  5. Under UNIX/Linux User Information, select the check box for the cell that contains the users whose home directory you want to set.

    Note: Selecting a check box for a cell assigns the selected users to the cell and gives them access to the Unix, Linux, and Mac OS computers that are in the cell.

    If the check box for the cell that you want is already selected, click the name of the cell.

  6. In the Login Shell box, type the login shell that you want to set -- for example, /bin/sh.

Set the Login Shell for a Single User

To change a user's settings, you must log on as a member of the Domain Administrators security group or the Enterprise Administrators security group. Or, you must have been delegated privileges to modify user settings; see Delegate Management.

  1. On your administrator workstation, start Active Directory Users and Computers.

  2. In the console tree, expand Users.

  3. Right-click the user that you want, click Properties, and then click the Likewise Settings tab.

  4. In the list under Likewise Cells, click the cell for which you want to set the user's home directory.

  5. In the Login Shell box, type the login shell that you want to set -- for example, /bin/bash.

5.12. Assign a Group ID

You can assign a group identifier (GID) to an Active Directory group by associating the group object with a cell and specifying a GID value for the group object.

The GID information that you enter is applied to all objects within the group. However, subgroups nested within the settings do not carry down; you must apply the GID information to subgroups individually.

Note: To assign a group ID, you must log on with privileges sufficient to modify the object.

  1. On your Windows administrative workstation, Start Active Directory Users and Computers.

  2. In the console tree, click Users.

  3. In the details pane, right-click a group object or any container object, and then click Properties.

  4. Click the Likewise Settings tab.

  5. Under Cells, select the check box for the cell that you want to associate with the group object.

  6. To assign a GID, click Suggest, or in the GID box type the group identifier that you want to assign to the group.

    Tip: To generate a report that shows duplicate GIDs, see Show Duplicate UIDs, GIDs, Login Names, and Group Aliases.

  7. In the Group Alias box, you may type an alias for the group, but it is not required.

  8. In the Description text box, you may enter a description, but it is not required.

5.13. Disable a User

To disable a user, you must log on as a domain administrator or as a member of another group that gives you privileges sufficient to modify Active Directory user objects.

Note: When a computer cannot communicate with a domain controller, a user with a disabled account who has recently logged on to the computer can continue to log on until you clear the cache or until the cache expires. By default, the cache expires after 4 hours, or the interval that you set by using a Likewise group policy or by modifying the local configuration file (lsassd.conf).

  1. On your Windows administrative workstation, start Active Directory Users and Computers.

  2. In the console tree, click Users.

  3. In the details pane, right-click the user that you want to disable, and then click Properties.

  4. Click the Likewise Settings tab.

  5. Under Likewise Cells, clear the check boxes for the cells in which you want to disable the user.

    To disable the user's access to all Linux, Unix, and Mac OS X computers, in the list of cells under Likewise Cells, clear all the check boxes.

5.14. Improve MMC Performance When Accessing Likewise Settings in ADUC

When the Microsoft Management Console loads a snap-in such as ADUC, it checks for certificate revocations. To improve MMC performance after Likewise is installed on your Windows administrative workstation, you can reconfigure Internet Explorer's security options to not check for certificate revocation and reconfigure Windows to not update root certificates.

Important: Although these changes can improve performance, they can also affect your administrative workstation's security policy. Before making these changes, determine whether they are permitted by your IT security policy.

  1. Close all instances of the Microsoft Management Console. Windows Task Manager should show no instances of mmc.exe.

  2. Start Internet Explorer. The following steps assume you are using IE 7; for additional information or instructions for other versions of Windows, see Microsoft.com.

  3. On the Tools menu, click Internet Options.

  4. Click the Advanced tab, and then in the list under Security clear the check boxes for the following options:

    Check for publisher's certificate revocation

    Check for server certificate revocation

    Check for signatures on downloaded programs

    Allow software to run or install even if the signature is invalid

  5. Click OK.

  6. In Control Panel, go to Add or Remove Programs. The following steps assume you are using Windows Server 2003.

    For additional information and instructions for other versions of Windows, see Microsoft.com. For computers running Windows 2008, for instance, you can turn off automatic root certificates updates by using a Microsoft group policy; see Certificate Support and the Update Root Certificates Component.

  7. Click Add/Remove Windows Components, and then in the list under Components clear the Update Root Certificates checkbox.

  8. Apply the changes and then restart the Microsoft Management Console.

5.15. Extend File Mode Permissions with POSIX ACLs

When you have to grant multiple users or groups access to a file, directory, or Samba share on a Linux server, you can use POSIX access control lists to extend the standard file mode permissions.

Because Linux and Unix file mode permissions control access only for a single user, a single group, and then everyone else, the only means of granting access to more than one group with the standard file modes is to either nest the groups together or to give everyone access -- approaches that are often unacceptable. Nested groups can be a maintenance burden, and granting access to everyone can undermine security. As for Samba shares, it is insufficient to add multiple users and groups to the valid users parameter in smb.conf if the underlying file system does not allow them access.

Prerequisites

You must have the acl package installed. You can determine this as follows:

# rpm – qa | grep acl
libacl-2.2.23-5
acl-2.2.23-5

The file system must be mounted with acl in the option list.  You can determine this using the mount command:

# mount
/dev/sda1 on / type ext3 (rw,acl)

As shown above, the root file system has been mounted with read-write (rw) and acl options.  If you don’t see acl in the options for the file system you are working with, modify /etc/fstab to include this option, and then remount the file system. In the case of the root file system, you may need to reboot the system.

All users and groups must be created before adding them to the ACL. In the case of Active Directory users, they must be preceded by the domain unless user aliases have be to configured (for example, DOMAIN\username).

Example

This example uses a directory called testdir. The process is the same for files.

Here are the standard file mode permissions of the testdir directory.  

[aciarochi@rhel4-devel tmp]$ ls -ld testdir
drwxrwx---  2 root root 4096 Dec 14 13:28 testdir

You can view the extended ACL using the getfacl utility. In this case, it shows the same information, in a different format:

[aciarochi@rhel4-devel tmp]$ getfacl testdir
# file: testdir
# owner: root
# group: root
user::rwx
group::rwx
other::---

With these permissions, only the root user and members of the root group are allowed to open the directory.  Since the aciarochi user is not in the root group, he is denied access:

[aciarochi@rhel4-devel tmp]$ cd testdir
-bash: cd: testdir: Permission denied

However, we can grant access to aciarochi by using the setfacl utility to add him to the ACL. We must switch to the root user, of course, since that is the directory owner. Once the ACL is set, aciarochi can open the directory:

[root@rhel4-devel ~]# setfacl -m u:aciarochi:rwx /tmp/testdir/
[root@rhel4-devel ~]# exit
logout
[aciarochi@rhel4-devel tmp]$ cd testdir
[aciarochi@rhel4-devel testdir]$ pwd
/tmp/testdir

Notice that the standard file mode permissions have not changed, except for the addition of a + at the end, indicating that extended file permissions are in effect:

[aciarochi@rhel4-devel tmp]$ ls -ld /tmp/testdir/
drwxrwx---+ 2 root root 4096 Dec 14 13:28 /tmp/testdir/

Additional groups can be added in the same manner -- using a g: instead of a u: -- to indicate a group.  In the following example, we grant read and execute (open) access to the ftp group:

[root@rhel4-devel ~]# setfacl -m g:ftp:r-x /tmp/testdir
[root@rhel4-devel ~]# getfacl testdir
# file: testdir
# owner: root
# group: root
user::rwx
user:aciarochi:rwx
group::rwx
group:ftp:r-x
mask::rwx
other::---

5.15.1. Using POSIX ACLs to Grant AD Accounts Access to Subversion

With Likewise, you can use AD accounts with Subversion. The trick is to use POSIX ACLs to give a domain group write access to the SVN repository.

Here's an example:

$ svnadmin create /data/foo 

## Add domain admins to the default directory ace 
$ find /data/foo -type d | xargs setfacl -d -m “g:AD\domain^admins:rwx” 

## Add domain admins to the directory ace 
$ find /data/foo -type d | xargs setfacl -m “g:AD\domain^admins:rwx” 

## Add domain admins to the ace for files 
$ find /data/foo -type f | xargs setfacl -m “g:AD\domain^admins:rw” 

$ getfacl /data/foo 
# file: foo 
# owner: AD\134gjones 
# group: AD\134unixusers 
user::rwx 
group::r-x 
group:AD\134domain^admins:rwx 
mask::rwx 
other::r-x 
default:user::rwx 
default:group::r-x 
default:group:AD\134domain^admins:rwx 
default:mask::rwx 
default:other::r-x

Don't forget to use only one forward slash (\) in /etc/group. Note too that the entry is case sensitive. You must specify the domain name in uppercase and the username in lowercase.

Chapter 6. Migrating Users to Active Directory

6.1. About Diagnostics and Migration

The Likewise Diagnostics and Migration page in the Likewise Management Console includes two tools to help manage a mixed network:

  • Find Orphaned Objects

  • Run Migration Tool

An orphaned object is a linked object, such as a Unix user ID or group ID, that remains in a cell after you delete a group or user's security identifier, or SID, from an Active Directory domain. The Find Orphaned Objects tool cleans up manually assigned user IDs and improves search speed.

The NIS migration tool imports Linux and Unix passwd files and group files and maps them to users and groups in Active Directory. The tool lets you resolve conflicts and ambiguous user names before you commit the changes.

The migration tool includes options to ease your NIS migration to Active Directory and to handle various requirements:

  • Migrate account information to the organizational units that you want.

  • Create groups in Active Directory to match your Linux and Unix groups.

  • Generate scripts to repair file ownership and group settings.

  • Change the GID of imported users to that of the AD Domain Users group.

  • Automatically set an alias for each migrated user.

  • Generate Visual Basic scripts to migrate users and groups in an automated and custom way.

  • Modify GIDs during migration.

  • Select only the groups and users that you want to migrate from your full list of groups and users.

  • Set the home directory and shell for migrated users.

  • Filter out standard Unix and Linux accounts, such as mail and news.

  • Modify UID information during migration.

  • Use NIS map files to migrate netgroups, automounts, and other services to Active Directory.

6.2. Migrate Users to Active Directory

The Likewise NIS migration tool can import Linux, Unix, and Mac OS X password and group files -- typically /etc/passwd and /etc/group -- and automatically map their UIDs and GIDs to users and groups defined in Active Directory.

You can also generate a Windows automation script to associate the Unix and Linux UIDs and GIDs with Active Directory users and groups. Before you commit the changes, you can resolve ambiguous user names and other conflicts.

Important: Before you migrate users to a domain that operates in non-schema mode, it is recommended that you find and remove orphaned objects. The IDs associated with orphaned objects are reserved until you remove the orphaned objects. See Find Orphaned Objects.

What You Need Before You Begin

Before running the migration tool, you should have the following information ready:

  • The name of the domain to which you want to migrate the account information.

  • Credentials that allow you to modify the domain.

  • The Unix or Linux passwd file and corresponding group file that you want to add to Active Directory and manage with Likewise. The password and group files can be from a computer or an NIS server.

Run the Migration Tool

  1. In the Likewise Management Console tree, under Provisioning Management, click the Diagnostics & Migration.

  2. Under Tasks, click Run Migration Tool.

  3. Click Next.

  4. In the Domain box, type the domain name that you want to migrate the account information to.

  5. If your logon credentials allow you to modify the domain, under Credentials, select Use logon credentials.

    Or, if your logon credentials are not allowed to modify the domain, select Use alternate credentials, and then enter credentials that have the appropriate privileges.

  6. Click Next.

  7. Click Import, and then in the Map name box, type a name that corresponds to the computer that the passwd and group files are from.

    The migration tool imports the passwd file and group file into the map file, which is then matched to existing Active Directory user and group names.

  8. In the Passwd file box, type the path and name of the file that you want to import, or click Browse and then find the file that you want.

  9. In the Group file box, type the path and name of the passwd file's corresponding group file, or click Browse and then find the file.  

  10. To import default Unix or Linux user accounts such as root and public, clear the Omit standard Linux/UNIX user accounts check box.

  11. Click Import.

  12. In the list under Users, clear the Import check box for any user that you do not want to import, and then click Next.

  13. Select the organizational unit to which you want to migrate the Linux or Unix account information.

    If you select the top of your domain, the information is migrated to the default Likewise cell of your Active Directory forest and UID numbers are automatically assigned within the domain's range.

    If you select an organizational unit, Likewise creates a cell for the organizational unit and migrates the account information to it, maintaining your UIDs and GIDs if the passwd and group files agree and if the UIDs and GIDs do not conflict with existing users or groups. The migrated account information applies only to computers that are members of the organizational unit.

  14. Click Next.

  15.  Under Migration Options, do any of the following:

    To

    Do This

    Create groups in Active Directory that match your Linux or Unix groups

    Select the Create groups in Active Directory to match Linux/UNIX groups check box.

    Create all groups in Active Directory -- not just the references ones. To select this option, you must first you must first select the Create groups in Active Directory to match Linux/UNIX groups check box.

    Select the Create all groups in AD (not just referenced ones) check box.

    Generate script that can repair ownership and group settings

    Select the Generate scripts to repair file ownership and group settings check box.

    Change the GID of imported users to "Domain Users"

    Select the Change GID of imported users to "Domain Users" check box.

    Set the alias even if it is the same as sAMAccountName

    Select the Always set Login Name (alias), even when same as sAMAccountName check box.

    Generate a Visual Basic script to perform migration

    Select the Generated VBScript to perform migration check box, and then in the Script name box, type a name for the script. In the Folder for generated scripts box, enter the directory that you want.

  16. Click Next.

  17. Click the Users tab and verify that the information is correct.

  18. Click the Groups tab and verify that the information is correct.

  19. To import the passwd and group files after you verify that the information is correct, click Next.

6.3. Find Orphaned Objects

You can use the Likewise Management Console to find and remove orphaned objects. An orphaned object is a linked object, such as a Unix or Linux user ID or group ID, that remains in a cell after you delete a group or user's security identifier, or SID, from an Active Directory domain.

Removing orphaned objects from Active Directory can clean up manually assigned user IDs and improve search speed. It is recommended that you remove orphaned objects before you use the migration tool with a domain that operates in non-schema mode.

  1. In the Likewise Management Console tree, under Provisioning Management, click the Diagnostics & Migration.

  2. Under Tasks, click Find Orphaned Objects.

  3. Click Select Domains, select the domains that you want to scan, and then click OK.

  4. Click Begin Scan.

  5. To remove the objects that appear in the Orphaned objects to delete box, click Delete Objects.

6.4. Migrate a User Profile on a Mac

On a Mac OS X computer, the Likewise domain join utility includes a tool to migrate a user's profile from a local user account to the home directory specified for the user in Active Directory.

When you migrate the user's profile, you can either copy or move it from the local account to the user's Active Directory account. Copying the profile leaves a copy of the user's files in their original location, but doubles the space on the hard disk required to keep the user's files.

You can migrate a user by using the GUI or by using the command line. In addition, you can customize the migration shell script to suit your requirements.

Important: To migrate a user's profile, you must have a local or AD account with administrative privileges. The account that you use must not be the account that you are migrating.

Migrate a User's Profile with the GUI

  1. Save and close any documents that the user has open.

  2. Log on with an administrator account that is not being migrated.

  3. In Terminal, execute the following command to open the Likewise Domain Join dialog:

    open /opt/likewise/bin/Likewise\ Domain\ Join.app

    If prompted, enter a name and password of an account with administrative privileges. The account can be either a local machine account or an AD account, but must not be the account that you are migrating.

  4. In the Likewise Domain Join dialog, Click Migrate.

    Note: The Likewise Domain Join dialog might be behind your Terminal window or behind another window.

  5. Under Source - Local Account, in the list, click the user that you want.

  6. In the box under Destination - Likewise AD Account, type the name of the Active Directory user account to which you want to migrate the local account, and then click to check that the account is in Active Directory.

  7. Under Options, do one of the following:

    To

    Do This

    Move the user's files and data from the user's home directory to a home directory specified in Active Directory.

    Select Move Profile.

    Copy a user's files and data from the user's home directory to a home directory specified in Active Directory.

    Note: This option doubles the amount of hard disk space required to store the user's files and data on the computer.

    Select Copy Profile.

  8. Click Migrate.

Migrate a User's Profile from the Command Line

You can migrate a user's profile by using the command line. On a Mac OS X computer, the location of the migration shell script is as follows:

/opt/likewise/bin/lw-local-user-migrate.sh

You can execute the migration script either locally or remotely by connecting to a Mac with SSH. Connecting to a Mac with SSH and then running the migration script from the command line lets you remotely migrate users from another computer.

For information about the command's syntax and arguments, execute the following command in Terminal:

/opt/likewise/bin/lw-local-user-migrate.sh --help

Customize the Migration Script

You can customize the migration script to suit your needs by opening the script and editing it. The script is written in Bash shell.

Important: There is no Likewise support for customizing the script or for modified scripts. Changes to the script preclude Likewise support.

Chapter 7. The Likewise Agent

7.1. About the Likewise Agent

The Likewise agent is installed on a Linux, Unix, or Mac OS X computer to connect it to Microsoft Active Directory and to authenticate users with their domain credentials. The agent integrates with the core operating system to implement the mapping for any application, such as the logon process (/bin/login), that uses the name service (NSS) or pluggable authentication module (PAM). As such, the agent acts as a Kerberos 5 client for authentication and as an LDAP client for authorization. In Likewise Enterprise, the agent also retrieves group policy objects to securely update local configurations, such as the sudo file.

The Likewise agent is also known as the Likewise client and the Likewise identity service.

7.2. Daemons

Likewise Open

The Likewise Open agent comprises the following daemons:

Daemon

Description

Dependencies

/opt/likewise/sbin/lsassd

The Likewise authentication daemon. Lsass stands for Likewise Security and Authentication Subsystem. The service handles authentication, authorization, caching, and idmap lookups. You can check its status or restart it.

View a diagram of the Lsass architecture.

netlogond lwiod dcerpcd eventlogd

/opt/likewise/sbin/netlogond

Detects the optimal domain controller and global catalog and caches them. You can check its status or restart it.

None

/opt/likewise/sbin/lwiod

The Likewise input-output service.

The DCE-RPC client libraries use the Likewise input-output client library, which makes calls to lwiod with Unix domain sockets.

You can check its status or restart it.

The input-output service also communicates over SMB with SMB servers. For instructions on how to set up and use the Likewise CIFS/SMB file server, see the Likewise CIFS file server user guide.

netlogond

/opt/likewise/sbin/dcerpcd

The Likewise DCE/RPC end-point mapper. DCE/RPC stands for Distributed Computing Environment/Remote Procedure Calls. The daemon handles communication between Linux, Unix, and Mac computers and Microsoft Active Directory by mapping data to end points. You can check its status or restart it.

netlogond lwiod

/opt/likewise/sbin/eventlogd

Collects and processes data for the event log.

netlogond lwiod dcerpcd

For AD user account requests (but not for root account requests), eventlogd also depends on lsassd.

/opt/likewise/sbin/lwregd

The daemon for the registry service.

All the Likewise services depend on lwregd.

/opt/likewise/sbin/lwsmd

The Likewise service manager. It manages all the other Likewise daemons and services.

All the Likewise services depend on lwsmd.

Likewise Enterprise

Likewise Enterprise includes all the daemons that are in Likewise Open. The following additional daemons are in Likewise Enterprise to apply group policies, handle smart cards, and monitor security events:

Daemon

Description

Dependencies

/opt/likewise/sbin/gpagentd

The group policy agent. Part of Likewise Enterprise, it runs as a background service to pull group policy objects from Active Directory and apply them to the computer.

The daemon uses LDAP to look up information about group policies and uses lwiod and its redirector to retrieve group policy objects.

You can check its status or restart it.

netlogond lwiod dcerpcd eventlogd lsassd

/opt/likewise/sbin/eventfwdd

Event forwarding daemon, part of the Likewise Enterprise data collection service.

eventlogd

/opt/likewise/sbin/reapsysld

Part of the Likewise data collection service that is included in Likewise Enterprise.

eventlogd eventfwdd

/opt/likewise/sbin/lwscd

The daemon for the smart card service. See the chapter on using Likewise with a smart card.

lwpkcs11d

/opt/likewise/sbin/lwpkcs11d

A daemon that aids the Likewise smart card service by supporting the PKCS#11 API.

None

The Likewise Input-Output Service

The lwiod daemon multiplexes input and output by using SMB1 or SMB2. The daemon's plugin-based architecture includes several drivers, the most significant of which is coded as rdr -- the redirector.

The redirector multiplexes CIFS/SMB connections to remote systems. For instance, when two different processes on a local Linux computer need to perform input-output operations on a remote system by using CIFS/SMB, with either the same identity or different identities, the preferred method is to use the APIs in the lwio client library, which routes the calls through the redirector. In this example, the redirector maintains a single connection to the remote system and multiplexes the traffic from each client by using multiplex IDs.

The input-output service plays a key role in the Likewise architecture because Likewise makes heavy use of DCE/RPC, short for Distributed Computing Environment/Remote Procedure Calls. DCE/RPC, in turn, uses SMB: Thus, the DCE-RPC client libraries use the Likewise input-output client library, which in turn makes calls to lwiod with Unix domain sockets.

When you join a domain, for example, Likewise uses DCE-RPC calls to establish the machine password. The Likewise authentication daemon periodically refreshes the machine password by using DCE-RPC calls. Authentication of users and groups in Active Directory takes place with Kerberos, not RPC. ( View a data-flow diagram that shows how systems interact when you join a domain.)

In addition, when a joined computer starts up, the Likewise authentication daemon enumerates Active Directory trusts by using DCE-RPC calls that go through the redirector. With one-way trusts, the authentication daemon uses RPC to look up domain users, groups, and security identifiers. With two-way trusts, lookup takes place through LDAP, not RPC.

Because the authentication daemon registers trusts only when it starts up, you should restart lsassd with the Likewise Service Manager after you modify a trust relationship.

The Likewise group policy agent also uses the input-output client library and the redirector when it copies files from the sysvol share of a domain controller.

To troubleshoot remote procedure calls that go through the input-output service and its redirector, use a Wireshark trace or a TCP dump to capture the network traffic. Wireshark, a free open-source packet analyzer, is recommended.

To troubleshoot connection problems with the redirector, set the log level of lwiod to debug:

/opt/likewise/bin/lwio-set-log-level debug

PAM Options

Likewise uses three standard PAM optionstry_first_pass, use_first_pass, and use_authtok -- and adds three non-standard options to the PAM configuration on some systems: unknown_ok, remember_chpass, and set_default_repository. The unknown_ok option allows local users to continue down the stack (first line succeeds but second line fails) while blocking domain users who do not meet group membership requirements. On AIX systems, which have both PAM and LAM modules, the remember_chpass prevents the AIX computer from trying to change the password twice and prompting the user twice. On Solaris systems, the set_default_repository option is used to make sure password changes work as expected.

Managing the Likewise Daemons

The Likewise Service Manager lets you track and troubleshoot all the Likewise services with a single command-line utility. You can, for example, check the status of the services, view their dependencies, and start or stop them. The service manager is the preferred method for restarting a service because it automatically identifies a service's dependencies and restarts them in the right order. In addition, you can use the service manager to set the logging destination and the log level.

To list status of the services, run the following command with superuser privileges at the command line:

/opt/likewise/bin/lwsm list

Example:

[root@rhel5d bin]# /opt/likewise/bin/lwsm list
lwreg       running (standalone: 1920)
dcerpc      running (standalone: 2544)
eventlog    running (standalone: 2589)
lsass       running (standalone: 2202)
lwio        running (standalone: 2191)
netlogon    running (standalone: 2181)
npfs        running (io: 2191)
rdr         running (io: 2191)

After you change a setting in the registry, you must use the service manager to force the service to begin using the new configuration by executing the following command with super-user privileges. This example refreshes the lsass service:

/opt/likewise/bin/lwsm refresh lsass

7.3. The Likewise Registry

Configuration information for the daemons is stored in the Likewise registry, which you can access and modify by using the registry shell or by executing registry commands at the command line. The registry shell is at /opt/likewise/bin/lwregshell. For more information, see Configuring the Likewise Services with the Registry.

7.4. Ports and Libraries

The agent includes a number of libraries in /opt/likewise/lib.

The agent uses the following ports for outbound traffic.

View a data-flow diagram that shows how systems interact when you join a domain.

Port

Protocol

Use

53  

UDP/ TCP

DNS

88

UDP/TCP

Kerberos

123

UDP

NTP

135

TCP

RPC endpoint mapper

137

UDP

NetBIOS Name Service

139  

TCP

NetBIOS Session (SMB)

389

UDP/TCP

LDAP

445

TCP

SMB over TCP

464

UDP/TCP

Machine password changes (typically after 30 days)

3268

TCP

Global Catalog search

7.5. Caches and Databases

To maintain the current state and to improve performance, the Likewise authentication service (lsass) caches information about users and groups in memory. You can, however, change the cache to store the information in a SQLite database; for more information, see the chapter on configuring Likewise with the registry.

The Likewise site affinity service, netlogon, caches information about the optimal domain controller and global catalog in the Likewise registry.

The following files are in /var/lib/likewise/db:

File

Description

registry.db

The SQLite 3.0 database in which the Likewise registry service, lwreg, stores data.

sam.db

Repository managed by the local authentication provider to store information about local users and groups.

lwi_events.db

The database in which the event logging service, eventlog, records events.

lsass-adcache.db.fqdn

Cache managed by the Active Directory authentication provider to store user and group information. The file is in /var/lib/likewise/db only when you set the database type to be the non-default SQLite database. In the name of the file, FQDN is replaced by your fully qualified domain name.

Since the default UIDs that Likewise generates are large, the entries made by the operating system in the lastlog file when AD users log in make the file appear to increase to a large size. This is normal and should not cause concern. The lastlog file (typically /var/log/lastlog) is a sparse file that uses the UID and GID of the users as disk addresses to store the last login information. Because it is a sparse file, the actual amount of storage used by it is minimal.

With Likewise Open, you can manage the following settings for your cache by editing the Likewise registry. See Cache Settings in the lsass Branch.

  • The Cache Type

  • The Size of the Memory Cache

  • The Duration of Cached Credentials

  • The NSS Membership and NSS Cache Settings

  • The Interval for Caching an Unknown Domain

With Likewise Enterprise, you can manage the settings with group policies; see the Group Policy Adminstration Guide.

Additional information about a computer's Active Directory domain name, machine account, site affinity, domain controllers, forest, the computer's join state, and so forth is stored in the Likewise registry. Here's an example of the kind of information that is stored under the Pstore key and the netlogon key:

[HKEY_THIS_MACHINE\Services\lsass\Parameters\Providers\ActiveDirectory\DomainJoin\LIKEWISEDEMO.COM\Pstore]
"ClientModifyTimestamp"=dword:4b86d9c6
"CreationTimestamp"=dword:4b86d9c6
"DomainDnsName"="LIKEWISEDEMO.COM"
"DomainName"="LIKEWISEDEMO"
"DomainSID"="S-1-5-21-3190566242-1409930201-3490955248"
"HostDnsDomain"="likewisedemo.com"
"HostName"="RHEL5D"
"MachineAccount"="RHEL5D$"
"SchannelType"=dword:00000002

[HKEY_THIS_MACHINE\Services\netlogon\cachedb\likewisedemo.com-0]
"DcInfo-ClientSiteName"="Default-First-Site-Name"
"DcInfo-DCSiteName"="Default-First-Site-Name"
"DcInfo-DnsForestName"="likewisedemo.com"
"DcInfo-DomainControllerAddress"="192.168.92.20"
"DcInfo-DomainControllerAddressType"=dword:00000017
"DcInfo-DomainControllerName"="w2k3-r2.likewisedemo.com"
"DcInfo-DomainGUID"=hex:71,c1,9e,b5,18,35,f3,45,ba,15,05,95,fb,5b,62,e3
"DcInfo-Flags"=dword:000003fd
"DcInfo-FullyQualifiedDomainName"="likewisedemo.com"
"DcInfo-LMToken"=dword:0000ffff
"DcInfo-NetBIOSDomainName"="LIKEWISEDEMO"
"DcInfo-NetBIOSHostName"="W2K3-R2"
"DcInfo-NTToken"=dword:0000ffff
"DcInfo-PingTime"=dword:00000006
"DcInfo-UserName"=""
"DcInfo-Version"=dword:00000005
"DnsDomainName"="likewisedemo.com"
"IsBackoffToWritableDc"=dword:00000000
"LastDiscovered"=hex:c5,d9,86,4b,00,00,00,00
"LastPinged"=hex:1b,fe,86,4b,00,00,00,00
"QueryType"=dword:00000000
"SiteName"=""

7.6. Time Synchronization

For the Likewise agent to communicate over Kerberos with the domain controller, the clock of the client must be within the domain controller's maximum clock skew, which is 300 seconds, or 5 minutes, by default. (For more information, see http://web.mit.edu/kerberos/krb5-1.4/krb5-1.4.2/doc/krb5-admin/Clock-Skew.html.)

The clock skew tolerance is a server-side setting. When a client communicates with a domain controller, it is the domain controller's Kerberos key distribution center that determines the maximum clock skew. Since changing the maximum clock skew in a client's krb5.conf file does not affect the clock skew tolerance of the domain controller, the change will not allow a client outside the domain controller's tolerance to communicate with it.

The clock skew value that is set in the /etc/likewise/krb5.conf file of Linux, Unix, and Mac OS X computers is useful only when the computer is functioning as a server for other clients. In such cases, you can use a Likewise Enterprise group policy to change the maximum tolerance; for more information, see Set the Maximum Tolerance for Kerberos Clock Skew in the Likewise Group Policy Administration Guide.

The domain controller uses the clock skew tolerance to prevent replay attacks by keeping track of every authentication request within the maximum clock skew. Authentication requests outside the maximum clock skew are discarded. When the server receives an authentication request within the clock skew, it checks the replay cache to make sure the request is not a replay attack.

7.7. Using a Network Time Protocol Server

If you set the system time on your computer with a Network Time Protocol (NTP) server, the time value of the NTP server and the time value of the domain controller could exceed the maximum skew. As a result, you will be unable to log on your computer.

If you use an NTP server with a cron job, there will be two processes trying to synchronize the computer's time -- causing a conflict that will change the computer's clock back and forth between the time of the two sources.

Likewise recommends that you configure your domain controller to get its time from the NTP server and configure the domain controller's clients to get their time from the domain controller.

7.8. Automatic Detection of Offline Domain Controller and Global Catalog

The Likewise authentication daemon -- lsassd -- manages site affinity for domain controllers and global catalogs and caches the information with netlogond. When a computer is joined to Active Directory, netlogond determines the optimum domain controller and caches the information. If the primary domain controller goes down, lassd automatically detects the failure and switches to another domain controller and another global catalog within a minute.

However, if another global catalog is unavailable within the forest, the Likewise agent will be unable to find the Unix and Linux information of users and groups. The Likewise agent must have access to the global catalog to function. Therefore, it is a recommended that each forest has redundant domain controllers and redundant global catalogs.

7.9. UID-GID Generation in Likewise Open and Likewise Enterprise Cells

In Likewise Open, a UID and GID are generated by hashing the user or group's security identifier, or SID, from Active Directory. With Likewise Open, you do not need to make any changes to Active Directory. A UID and GID stays the same across host machines. With Likewise Open, you cannot set UIDs and GIDs for Linux and Unix in Active Directory; using AD to set and manage UIDs and GIDs is a feature of Likewise Enterprise or the Likewise UID-GID management tool.

If your Active Directory relative identifiers, or RIDs, are a number greater than 524,287, the Likewise Open algorithm that generates UIDs and GIDs can result in UID-GID collisions among users and groups. In such cases, it is recommended that you use Likewise Enterprise or the Likewise UID-GID management tool.

The Likewise Open algorithm is the same in 4.1 and 5.0, and if you are running 4.1 on one computer and 5.0 or later on another, each user and group should have the same UID and GID on both machines.

Note: If you have UIDs and GIDs defined in Active Directory, Likewise Open will not use those UIDs and GIDs.

In Likewise Enterprise, you can specify the UIDs and GIDs that you want, including setting multiple UID and GID values for a given user based on OU membership by using Likewise cells. (Likewise cells, available only in Likewise Enterprise, provide a method for mapping Active Directory users and groups to UIDs and GIDs.) You can also set Likewise Enterprise to automatically generate UID and GID values sequentially.

7.10. Cached Credentials

Both Likewise Open and Likewise Enterprise cache credentials so users can log on when the computer is disconnected from the network or Active Directory is unavailable.

7.11. Trust Support

The Likewise agent supports the following Active Directory trusts:

Trust Type

Transitivity

Direction

Likewise Default Cell Support

Likewise Non-Default Cell Support (Named Cells)

Parent and child

Transitive

Two-way

Yes

Yes

External

Nontransitive

One-way

No

Yes

External

Nontransitive

Two-way

No

Yes

Forest

Transitive

One-way

No

Yes

Forest

Transitive

Two-way

Yes: Must enable default cell in both forests.

Yes

There is information on the types of trusts at http://technet.microsoft.com/en-us/library/cc775736(WS.10).aspx.

Notes on Trusts

The following list contains general information about working with trusts.

  • You must place the user or group that you want to give access to the trust in a cell other than the default cell.

  • In a two-way forest or parent-child trust, Likewise merges the default cells. When merged, users in one domain can log on computers in another domain, and vice-versa.

  • To put a user in a child domain but not the parent domain, you must put the user in a non-default cell, which is a cell associated with an organizational unit.

  • If there is a UID conflict across two domains, one domain will be dropped.

  • In a cross-forest transitive one- or two-way trust, the root of the trusted forest must have a default cell.

  • In a one-way trust in which Forest A trusts Forest B, a computer in Forest A cannot get group information from Forest B, because Forest B does not trust Forest A. The computer in Forest A can obtain group information if the user logs on with a password for a domain user, but not if the user logs on with Kerberos single sign-on credentials. Only the primary group information, not the secondary group information, is obtained.

  • To support a 1-way trust without duplicating user accounts, you must use a cell associated with an OU, not a default cell. If Domain A trusts Domain B (but not the reverse) and if Domain B contains all the account information in cells associated with OUs, then when a user from Domain B logs on a machine joined to Domain A, Domain B will authenticate the user and authorize access to the machine in Domain A.

    In such a scenario, you should also add a domain user from the trusted domain to an administrative group in the trusting domain so you can manage the trusting domain with the appropriate level of read access to trusted user and group information. However, before you add the domain user from the trusted domain to the trusting domain, you must first add to the trusting domain a group that includes the user because Unix and Linux computers require membership in at least one group and Active Directory does not enumerate a user's membership in foreign groups.

  • If you have a network topology in which the "front" domain trusts the "back" domain, and you join a machine to the front domain using a back domain administrator, as in the following example, the attempt to join the domain will fail: domainjoin-cli join front.likewise.com back\\administrator password. However, the attempt to join the domain will succeed if you use the following nomenclature:

    domainjoin-cli join front.likewise.com administrator@BACK.likewise.COM password

  • With Likewise Enterprise, aliased user names are supported in the default cell and in named cells.

Trusts and Cells in Likewise Enterprise

In Likewise Enterprise, a cell contains Unix settings, such as a UID and a GID, for an Active Directory user. When an AD user logs on a Likewise client, Likewise Enterprise searches Active Directory for the user's cell information -- and must find it to operate properly. Thus, your AD topology and your trust relationships may dictate where to locate a cell in Active Directory so that your Likewise clients can access their Unix settings.

With a default cell, Likewise searches for a user or group's attributes in the default cell of the domain where the user or group resides. In a multi-domain topology, a default cell must exist in the domain where user and group objects reside in addition to the default cell that exists in the domain to which Unix, Linux, and Mac computers are joined. In a multi-domain topology, then, be sure to create a default cell in each domain.

Ideally, Unix information is stored on the user object in default cell schema mode. If the client computer does not have the access rights to read and write the information to the user object, as in an external one-way trust, the Unix information cannot be stored on the user object. It can, however, be stored locally in a named cell, that is, a cell associated with an organizational unit.

Since a named cell can be linked to the default cell, you can store Unix information on the user object in default cell schema mode when possible, and otherwise in a named cell that represents the external user. For information about cells, see the chapter on planning your Likewise Enterprise installation and deployment.

7.12. Integrating with Samba

Likewise includes a tool to install the files necessary to use Samba with Likewise. Located in /opt/likewise/bin, the tool is named samba-interop-install. The Likewise Samba Guide describes how to use the tool to integrate Samba 3.0.25, 3.2.X, or 3.5.X with Likewise Enterprise 6 or Likewise Open 6.

7.13. Supported Platforms

Likewise Open and Likewise Enterprise run on a broad range of Unix, Mac OS X, and Linux platforms. Likewise frequently adds new vendors and distributions to the list of supported platforms.

Chapter 8. Configuring Clients Before Agent Installation

8.1. Configure nsswitch.conf

Before you attempt to join an Active Directory domain, make sure the /etc/nsswitch.conf file contains the following line:

hosts: files dns

The hosts line can contain additional information, but it must include the dns entry, and it is recommended that the dns entry appear after the files entry.

Computers running Solaris, in particular, may not contain this line in nsswitch.conf until you add it.

When you use Likewise with Multicast DNS 4 (mDNS4) and have a domain in your environment that ends in .local, you must place the dns entry before the mdns4_minimal entry and before the mdns4 entry:

hosts: files dns mdns4_minimal [NOTFOUND=return] mdns4

The default setting for many Linux systems is to list the mdns4 entries before the dns entry -- a configuration that leaves Likewise unable to find the domain.

Important: For Likewise to process changes to your nsswitch.conf file, you must restart the Likewise input-output service (lwiod) and the authentication service (lsassd). Running the following command as root restarts both services:

/opt/likewise/bin/lwsm restart lwio

For Likewise to work correctly, the nsswitch.conf file must be readable by user, group, and world.

For more information on configuring nsswitch, see the man page for nsswitch.conf.

8.2. Configure resolv.conf

Before you attempt to join an Active Directory domain, make sure that /etc/resolv.conf on your Linux, Unix, or Mac client includes a DNS server that can resolve SRV records for your domain.

Example:

[root@rhel5d Desktop]# cat /etc/resolv.conf
search likewisedemo.com
nameserver 192.168.100.132

For more information on resolv.conf, see your operating system's man page.

8.3. Configure Firewall Ports

The Likewise agent requires several firewall ports to be open for outbound traffic. For a list of the required ports, see Make Sure Outbound Ports Are Open.

8.4. Extend Partition Size Before Installing Likewise on IBM AIX

On AIX 5.2 and 5.3, you may need to extend the size of certain partitions to complete the installation successfully.

To do so, use IBM's chfs command to change the partition sizes -- for example:

# chfs -a size=+200M /opt

This command increases the size of the opt partition by 200 megabytes, which should be sufficient for a successful installation.

8.5. Increase Max Username Length on IBM AIX

By default, IBM AIX is not configured to support long user and group names, which might present a conflict when you try to log on with a long Active Directory username. On AIX 5.3 and AIX 6.1, the symptom is that group names, when enumerated through the groups command, are truncated.

To increase the max username length on AIX 5.3, use the following syntax:

# chdev - l sys0 -a max_logname=MaxUserNameLength+1

Example:

# chdev - l sys0 -a max_logname=255

This command allocates 254 characters for the user and 1 for the terminating null.

The safest value that you can set max_logname to is 255.

You must reboot for the changes to take effect:

# shutdown - Fr

Note: AIX 5.2 does not support increasing the maximum user name length.  

8.6. Check System Health Before Installing the Agent

Members of the Likewise support staff might use a shell script to check the health of a Linux or Unix computer on which you plan to install the Likewise agent. The script helps identify potential system configuration issues before you install the agent and attempt to join a Linux or Unix computer to Active Directory.

With Likewise Open, the script is unavailable, but you can manually check your computer against the list in the table below.

The name of the script is healthchk.sh. To execute it, copy the script to the Unix or  Linux computer that you want to check, and then execute the following command from the shell prompt: likewise-health-check.sh

The script outputs the results of its scan to /tmp/healthchk.out.

The following table lists each item the script checks, describes the item, and suggests action to correct the issue.

Item Checked

Description

Corrective Action

Type of operating system

The operating system must be one of the platforms that Likewise supports. Supported platforms are listed later in this guide.

Install the agent on a computer that is running a supported operating system.

Hostname

Informational.

Not applicable.

Processor type

The processor type must be supported by the Likewise Agent. See the list of supported platforms later in this guide.

Install the agent on a computer with a supported processor.

Disk usage

Checks the disk space available to /opt to ensure that there is enough to install the agent and its accompanying packages.

Increase the amount of disk space available to /opt.

Contents of /etc/*release (for AIX, to determine the oslevel)

Displays the operating system and version number to ensure that they are supported by Likewise. See the list of supported platforms later in this guide.

Install the agent on a computer that is running a supported operating system and version.

Network interface and its status

Displays network interfaces and IP addresses to ensure that the system has network access.

Configure the computer so that it has network access and can communicate with the domain controller.

Contents of the IP routing table

To determine whether a single default gateway is defined for the computer.

If the computer does not use a single default gateway, you must define a route to a single default gateway.

For example, you can run the route -n to view the IP routing table and set a static route. For more information, see the man pages for your system.

On Solaris, you may need to create or edit /etc/defaultrouter.

On Linux, you can set the default gateway by running the network utility for your distribution.

Connectivity to the default gateway

Pings the default gateway to ensure that the computer can connect to it. A connection to the default gateway is required.

Configure the computer and the network so that the computer can connect to the default gateway.

Contents of nsswitch.conf (or, for AIX, netsvc.conf)

Displays information about the nsswitch configuration.

The nsswitch.conf file must contain the following line:

hosts: files dns

Computers running Solaris, in particular, may not contain this line in nsswitch.conf.

FQDN

Determines the fully qualified domain name of the computer to ensure that it is set properly.

Make sure the computer's FQDN is correct in /etc/hosts.

You can determine the fully qualified domain name of a computer running Linux, Unix, or Mac OS X by executing the following command:

ping - c 1 `hostname`

On HP-UX:

ping `hostname` -n 1

On Solaris:

FQDN=`/usr/lib/mail/sh/check-hostname|cut -d" " -f7`;echo $FQDN

This command prompts the computer to look up the primary host entry for its hostname. In most cases, it looks for its hostname in /etc/hosts, returning the first FQDN name on the same line. So, for the hostname qaserver, here's an example of a correct entry in /etc/hosts:

10.100.10.10 qaserver.corpqa.likewise.com qaserver

If, however, the entry in /etc/hosts incorrectly lists the hostname (or anything else) before the FQDN, the computer's FQDN becomes, using the malformed example below, qaserver:

10.100.10.10 qaserver qaserver.corpqa.likewise.com

If the host entry cannot be found in /etc/hosts, the computer looks for the results in DNS instead. This means that the computer must have a correct A record in DNS. If the DNS information is wrong and you cannot correct it, add an entry to /etc/hosts.

IP address of local NIC

Determines whether the IP address of the local network card matches the IP address returned by DNS for the computer. The IP address of the local NIC must match the IP address for the computer in DNS.

Either update DNS or change the local IP address so that the IP address of the local network card matches the IP address returned by DNS for the computer.

Contents of resolv.conf

Returns the address for the nameserver set in resolv.conf.

The address of nameserver must point to a DNS server that can resolve the Active Directory domain name and return the SRV records for the domain controllers.

The SRV record is a DNS resource record that is used to identify computers that host specific services. SRV resource records are used to locate domain controllers for Active Directory.

Compare against the results of the items checked next.

DNS query results for system (hostname and IP)

The IP address for the host name from DNS must match the IP address of the computer's local NIC.

Either update DNS or change the local IP address so that the IP address of the local network card matches the IP address returned by DNS for the computer.

DNS name resolution and connectivity to specified domain controller

Pings the domain name to get the IP address.

Correct resolv.conf so that the nameserver points to a DNS server that can resolve the Active Directory domain name -- typically the domain controller running DNS.

SRV records from DNS

Performs a DNS lookup for the SRV records to get the IP addresses for the domain controller.

Correct resolv.conf so that the nameserver points to a DNS server that can resolve the SRV records.

Connectivity to the Internet

Informational. Although connectivity to the Internet is optional, it makes it easier to download the installer for the agent installer.

Not applicable.

Location and version information for sudo, openssl, bash, rpm, and ssh

Checks whether required utilities are installed and are in expected locations.

 

Likewise requires the following utilities: ssh and openssl.

The other utilities are optional but may be useful.

Selected firewall settings (Kerberos, NetBIOS, and LDAP)

Tests whether the computer can connect to ports on the domain controller to make sure that a firewall will not block the computer's attempt to join the domain.

Reconfigure the firewall to allow the computer to access the domain controller.

Listing of files in /etc/pam.d

Lists other software that requires PAM.

Not applicable. Save this information for Likewise support staff in case they need to troubleshoot the installation.

Contents of selected pam files (pam.conf, common-auth, system-auth)

May reveal installation of other applications that are incompatible with the installer.

Not applicable. Save this information for Likewise support staff in case they need to troubleshoot the installation.

Contents of /etc/krb5.conf

Shows Kerberos 5 configuration.

Not applicable. Save this information for Likewise support staff in case they need to troubleshoot the installation.

DHCP

Checks whether DHCP is in use.

When the Likewise Agent joins the computer to the domain, the agent restarts the computer. DHCP can then change the contents of /etc/resolv.conf, /etc/hosts, and other files, causing the computer to fail to join the domain.

Set the computer to a static IP address or configure DHCP so that it does not update such files as /etc/resolv.conf and /etc/hosts.

ISA type

Returns 32-bit or 64-bit information.

Use the installer for your ISA type.

Read-only filespaces

Checks whether /opt is mounted as readonly.

Make sure that /opt is writable.

AIX TL levels

Determines the AIX TL level.

Not all TL levels are supported. For AIX, check with Likewise support to make sure that Likewise is compatible with the TL level you are using.

Chapter 9. Installing the Agent

9.1. Install the Correct Version for Your Operating System

You must install the Likewise agent -- the identity service that authenticates users -- on each Linux, Unix, or Mac OS X computer that you want to connect to Active Directory. To obtain the installer or to view a list of supported platforms, see www.likewise.com. The Likewise Open installation package can be downloaded for free at http://www.likewise.com/products/likewise_open/. If you are using Likewise Enterprise, make sure you install the Likewise Enterprise version of the agent.

Important: Before you install the agent, it is recommended that you upgrade your system with the latest security patches. Patch requirements for Unix systems are listed below.

The procedure for installing the Likewise Open agent or the Likewise Enterprise agent depends on the operating system of your target computer or virtual machine. Each procedure is documented in a separate section of this chapter.

Operating System

Procedure by Title

Linux platforms running kernel release number 2.6 or later are supported by Likewise 6.1 or later.

Linux platforms runing kernel release number 2.4 or later are supported by Likewise 6.0 or earlier.

Install the Agent on Linux or Unix with the Shell Script

Unix: Sun Solaris, HP-UX, IBM AIX

Install the Agent on Unix with the Command Line

VMware ESX 3.0 and 3.5 (hypervisor)

Install the Agent on Linux or Unix with the Shell Script

Mac OS X 10.4 or later, including 10.5 and 10.6

Install the Agent on a Mac Computer

You also have the option of installing the agent in unattended mode; see Install the Agent on Linux in Unattended or Text Mode and Install the Agent on a Mac in Unattended Mode.

Checking Your Linux Kernel Release Number

To determine the release number of the kernel on your Linux machine, run the following command:

uname -r

For the Linux machine to be supported by Likewise, the kernel release number must be 2.6 or later.

Package Management Commands

For an overview of commands such as rpm and dpkg that can help you manage Likewise on Linux and Unix platforms, see Package Management Commands.

9.2. Requirements for the Agent

This section lists requirements for installing and running the Likewise agent. Requirements for the Likewise Management Console, which is part of Likewise Enterprise and the UID-GID module, are detailed in the chapter on installing the console. Likewise Open does not include the Likewise Management Console.

Before you install the Likewise agent, make sure that the following environmental variables are not set: LD_LIBRARY_PATH, LIBPATH, SHLIB_PATH, LD_PRELOAD. Setting any of these environmental variables violates best practices for managing Unix and Linux computers because it causes Likewise to use non-Likewise libraries for its services. For more information on best practices, see http://linuxmafia.com/faq/Admin/ld-lib-path.html. Likewise does not support installations that use these environmental variables. If joining the domain fails with an error message that one of these environmental variables is set, stop all the Likewise daemons, clear the environmental variable, make sure it is not automatically set when the computer restarts, and then try to join the domain again.

If you must set LD_LIBRARY_PATH, LIBPATH, or SHLIB_PATH for another program, put the Likewise library path (/opt/likewise/lib or /opt/likewise/lib64) before any other path -- but keep in mind that doing so may result in side effects for your other programs, as they will now use Likewise libraries for their services.

Patch Requirements

It is recommended that you apply the latest patches for your operating system before you install Likewise. Known patch requirements are listed below.

Sun Solaris

All Solaris versions require the md5sum utility, which can be found on the companion CD.

Sun Solaris 10 requires update 5 or later. The Solaris 10 05/08 (or later) patch bundle is available at http://sunsolve.sun.com/. Solaris 10_x86 requires the patch for nscd, either patch ID number 138047-02 or the patch that supercedes it, number 138264-02. This patch available for SPARC as patch 138046.

Solaris 8 Sparc should be fully patched according to Sun's recommendations. Likewise depends on the latest patch for libuuid. On Sparc systems, the patch for libuuid is 115831. Sun patch 110934-28 for Solaris 5.8 is also required for Solaris 8.

Solaris 8 Intel systems also require the latest patch for libuuid: 115832-01. Sun patches 110403-06 and 110935-26 are also required. Patch 110403-06 must be installed before you install patch 110935-26.

Solaris 9 requires Sun patch 113713-28 for Solaris 5.9.

OpenSolaris is compatible with Likewise without any patches.

HP-UX

Secure Shell: For all HP-UX platforms, it is recommended that a recent version of HP's Secure Shell be installed. Likewise recommends that you use HP-UX Secure Shell A.05.00.014 or later.

Sudo: By default, the versions of sudo available from the HP-UX Porting Center do not include the Pluggable Authentication Module, or PAM, which Likewise requires to allow domain users to execute sudo commands with super-user credentials. It is recommended that you download sudo from the HP-UX Porting Center and make sure that you use the with-pam configuration option when you build it.

HP-UX 11iv1 requires the following patches: PHCO_36229, PHSS_35381, PHKL_34805, PHCO_31923, PHCO_31903, and PHKL_29243. Although these patches may be superceded by subsequent patches, these patches represent the minimum patch level for proper operation.

Kerberos client libraries: For single sign-on with HP-UX 11.11 and 11.23, you must download and install the latest KRB5-Client libraries from the HP Software Depot. (By default, HP-UX 11.31 includes the libraries.)

Other Requirements for the Agent

AIX

On AIX computers, PAM must be enabled. LAM is supported only on AIX 5.x. PAM must be used exclusively on AIX 6.x.

Secure Shell

To properly process logon events with Likewise, your SSH server or client must support the UsePam yes option. For single sign-on, both the SSH server and the SSH client must support GSSAPI authentication.

Other Software

Telnet, rsh, rcp, rlogin, and other programs that uses PAM for processing authentication requests are compatible with Likewise.

Networking Requirements

Each Unix, Linux, or Mac computer must have fully routed network connectivity to all the domain controllers that service the computer's Active Directory site. Each computer must be able to resolve A, PTR, and SRV records for the Active Directory domain, including at least the following:

  • A domain.tld

  • SRV _kerberos._tcp.domain.tld

  • SRV _ldap._tcp.domain.tld

  • SRV _kerberos._udp.sitename.Sites._msdcs.domain.tld

  • A domaincontroller.domain.tld

In addition, several ports must be open; see Make Sure Outbound Ports Are Open.

Disk Space Requirements

The Likewise agent requires 100 MB of disk space in the /opt mount point. The agent also creates configuration files in /etc/likewise and offline logon information in /var/lib/likewise. In addition, the Likewise Enterprise agent caches group policy objects in /var/cache/likewise.  

Memory and CPU Requirements

The agent consists of several daemons that typically use between 9 MB and 14 MB of RAM. Memory utilization of the authentication daemon on a 300-user mail server is typically 7 MB; the other daemons require between 500 KB and 2 MB each. CPU utilization on a 2.0 gigahertz single-core processor under heavy load with authentication requests is about 2 percent. For a description of the Likewise daemons, see About the Likewise Agent.

Clock Skew Requirements

For the Likewise agent to communicate over Kerberos with the domain controller's Kerberos key distribution center, the clock of the client must be within the domain controller's maximum clock skew, which is 300 seconds, or 5 minutes, by default. For more information on time synchronization, see About the Likewise Agent.

9.3. Install the Agent on Linux or Unix with the Shell Script

You install the Likewise Enterprise agent by using a shell script that contains a self-extracting executable. The file name of the SFX installer ends in sh. Example: LikewiseEnterprise-6.1.0.3499-linux-i386-rpm.sh.

The examples shown are for Linux RPM-based platforms. For other Linux and Unix platforms -- such as Debian, HP-UX, AIX, and Solaris -- simply substitute the right installer. The installer's name includes the product name, version and build numbers, operating system, computer type, and platform type.

Install the Agent on Linux or Unix with the Shell Script

Perform the following procedure with the root account. To view information about the installer or to view a list of command-line options, run the following command: ./LikewiseEnterprise-6.1.0.3499-linux-i386-rpm.sh --help

After the wizard finishes, the user interface for joining a domain appears. To suppress it, you can run the installer with its --dont-join argument.

  1. Download or copy the shell script to your Linux or Unix computer's desktop.

    Important: If you FTP the file to the desktop of the target Linux or Unix computer, you must select binary, or BIN, for the transfer. Most FTP clients default to AUTO or ASCII, but the installer includes some binary code that becomes corrupted in AUTO or ASCII mode.

  2. Change directories to the desktop.

  3. As root, change the mode of the installer to executable.

    chmod a+x LikewiseEnterprise-6.1.0.3499-linux-i386-rpm.sh

    On Ubuntu, execute the sudo command before you execute the chmod command:

    sudo chmod a+x LikewiseEnterprise-6.1.0.3499-linux-i386-rpm.sh

  4. As root, run the installer:

    ./LikewiseEnterprise-6.1.0.3499-linux-i386-rpm.sh

  5. Follow the instructions in the installer.

    Note: On SLES and other systems on which the pager is set to less, you must exit the end user license agreement, or EULA, by typing the following command: q 

9.4. Install the Agent on Linux in Unattended Mode

You can install the agent in unattended mode by using the install command:

./LikewiseEnterprise-6.1.0.67-linux-i386-rpm.sh install

9.5. Install the Agent on Unix with the Command Line

You install the Likewise Open agent or the Likewise Enterprise agent on Sun Solaris, HP-UX, and IBM AIX by using a shell script that contains a self-extracting executable -- an SFX installer with a file name that ends in sh. Example: LikewiseEnterprise-6.1.0.70-solaris-sparc-pkg.sh.

The examples shown below are for Solaris Sparc systems. For other Unix platforms, simply substitute the right installer. The installer's name includes the product name, version and build numbers, operating system, computer type, and platform type.

Note: The name of a Unix installer for Likewise Enterprise on installation media might be truncated to an eight-character file name with an extension. For example, l3499sus.sh is the truncated version of LikewiseEnterprise-6.1.0.3499-solaris-sparc-pkg.sh.

Perform the following procedure with the root account.

  1. Download or copy the installer to the Unix computer's desktop.

  2. Change directories to the desktop.

  3. As root, change the mode of the installer to executable:

    chmod a+x LikewiseEnterprise-6.1.0.70-solaris-sparc-pkg.sh

    Tip: To view a list of command-line options, run the following command:

    ./LikewiseEnterprise-6.1.0.70-solaris-sparc-pkg.sh --help

  4. As root, run the installer:

    ./LikewiseEnterprise-6.1.0.70-solaris-sparc-pkg.sh

  5. Follow the instructions in the installer.

9.6. Install the Agent on a Mac Computer

To install the Likewise agent on a computer running Mac OS X, you must have administrative privileges on the Mac. Likewise supports Mac OS X 10.4 or later.

  1. Obtain the Likewise agent installation package for your Mac from Likewise Software and place it on your desktop.

    Important: On an Intel-based Mac, install the i386 version of the .dmg package. On a Mac that does not have an Intel chip, install the powerpc version of the .dmg package. On Mac OS X 10.6 (Snow Leopard), you must use the 10.6 universal installation package.

  2. Log on the Mac with a local account.

  3. On the Apple menu , click System Preferences.

  4. Under Internet & Network, click Sharing, and then select the Remote Login check box. Turning on Remote Login lets you access the Mac with SSH after you install Likewise.

  5. On the Mac computer, go to the Desktop and double-click the Likewise .dmg file.

  6. In the Finder window that appears, double-click the Likewise .mpkg file.

  7. Follow the instructions in the installation wizard.

    When the wizard finishes installing the package, you are ready to join the Mac computer to an Active Directory domain.

9.7. Install the Agent on a Mac in Unattended Mode

The Likewise command-line tools can remotely deploy the shell version of the Likewise agent to multiple Mac OS X computers, and you can automate the installation of the agent by using the installation command in unattended mode.

The commands in this procedure require administrative privileges.

Important: For Intel-based Macs, use the i386 version of the .dmg installer; for example: LikewiseEnterprise-6.1.0.3628-i386.dmg. For Macs that do not have Intel chips, use the powerpc version of the .dmg installer; for example: LikewiseEnterprise-6.1.0.3628-powerpc.dmg

The procedure below assumes you are installing the agent on an i386 Mac; if you are installing on a powerpc, replace the i386 installer with the powerpc installer.

  1. Use SSH to connect to the target Mac OS X computer and then use SCP to copy the .dmg installation file to the desktop of the Mac or to a location that can be accessed remotely. The rest of this procedure assumes that you copied the installation file to the desktop.

  2. On the target Mac, open Terminal and then use the hdiutil mount command to mount the .dmg file under Volumes:

    /usr/bin/hdiutil mount Desktop/LikewiseEnterprise-6.1.0.3628-i386.dmg

  3. Execute the following command to open the .mpkg volume:

    /usr/bin/open Volumes/LikewiseEnterprise-6.1.0.3628-i386

  4. Execute the following command to install the agent:

    sudo installer -pkg /Volumes/LikewiseEnterprise-6.1.0.3628-i386/LikewiseEnterprise-6.1.0.3628-i386.mpkg -target LocalSystem

    Note: For more information about the installer command, in Terminal execute the following command:

    man installer

  5. To join the domain, execute the following command in the Terminal, replacing domainName with the FQDN of the domain that you want to join and joinAccount with the user name of an account that has privileges to join computers to the domain:

    sudo /opt/likewise/bin/domainjoin-cli join domainName joinAccount

    Example: sudo /opt/likewise/bin/domainjoin-cli join likewisedemo.com Administrator

    Terminal prompts you for two passwords: The first is for a user account on the Mac that has admin privileges; the second is for the user account in Active Directory that you specified in the join command.

    Note: You can also add the password for joining the domain to the command, but Likewise recommends against this approach because another user could view and intercept the full command that you are running, including the password:

    sudo /opt/likewise/bin/domainjoin-cli join domainName joinAccount joinPassword

    Example: sudo /opt/likewise/bin/domainjoin-cli join likewisedemo.com Administrator YourPasswordHere

9.8. Installing the Agent in Solaris Zones

Solaris Zones are a virtualization technology created by Sun Microsystems to consolidate servers. Primarily used to isolate an application, Solaris Zones act as isolated virtual servers running on a single operating system, making each application in a collection of applications seem as though it is running on its own server. A Solaris Container combines system resource controls with the virtual isolation provided by zones.

Every zone server contains a global zone that retains visibility and control in any installed non-global zones. By default, the non-global zones share certain directories, including /usr, which are mounted read-only. The shared directories are writable only for the global zone.

By default, installing Likewise in the global zone results in it being installed in all the non-global zones. You can, however, control the target of the installation by using the following options of the SFX installer:

./LikewiseEnterprise-6.1.0.97-solaris-i386-pkg.sh --help
...
--all-zones           (Solaris) Install to all zones (default)
--current-zone        (Solaris) Install only to current zone

After a new child zone is installed, booted, and configured, you must run the following command as root to complete the installation:

/opt/likewise/bin/postinstall.sh

You cannot join zones to Active Directory as a group. Each zone, including the global zone, must be joined to the domain independently of the other zones.

Caveats

There are some caveats when using Likewise with Solaris Zones:

1. When you join a non-global zone to AD, you will receive an error as Likewise attempts to synchronize the Solaris clock with AD. The error occurs because the root user of the non-global zone does not have root access to the underlying global system and thus cannot set the system clock. If the clocks are within the 5-minute clock skew permitted by Kerberos, the error will not be an issue. Otherwise, you can resolve the issue by manually setting the clock in the global zone to match AD or by joining the global zone to AD before joining the non-global zone.

2. Some group policies may log PAM errors in the non-global zones even though they function as expected. The cron group policy is one example:

Wed Nov 7 16:26:02 PST 2009 Running Cronjob 1 (sh)
Nov 7 16:26:01 zone01 last message repeated 1 time
Nov 7 16:27:00 zone01 cron[19781]: pam_lsass(cron): request failed

Depending on the group policy, these errors may result from file access permissions, attempts to write to read-only directories, or both.

3. By default, Solaris displays auth.notice syslog messages on the system console. Some versions of Likewise generate significant authentication traffic on this facility-priority level, which may lead to an undesirable amount of chatter on the console or clutter on the screen.

To redirect the traffic to a file instead of displaying it on the console, edit your /etc/syslog.conf file as follows:

Change this:

*.err;kern.notice;auth.notice /dev/sysmsg

To this:

*.err;kern.notice /dev/sysmsg

auth.notice /var/adm/authlog

Important: Make sure that you use tabs, not spaces, to separate the facility.priority information (on the left) from the action field (on the right). Using spaces will cue syslog to ignore the entire line.

9.9. Upgrading Your Operating System

Before you upgrade your operating system, you must leave the domain, uninstall the domain join GUI, and uninstall the agent. Then, make sure you are using the correct agent for the new version of your operating system, install it, and rejoin the domain.

If, for example, you plan to upgrade your operating system from Mac OS X 10.5 (Leopard) to Mac OS X 10.6 (Snow Leopard), you must first leave the domain and uninstall the current agent. Then, after upgrading your operating system, install the correct agent for the new version of the operating system and join the domain again. See Uninstall the Agent on a Mac.

Chapter 10. Joining an Active Directory Domain

10.1. About Joining a Domain

When Likewise joins a computer to an Active Directory domain, it uses the hostname of the computer to create the name of the computer object in Active Directory. From the hostname, the Likewise domain join tool attempts to derive a fully qualified domain name. By default, the Likewise domain join tool creates the Linux and Unix machine accounts in the default Computers container in Active Directory.

You can, however, choose to pre-create machine accounts in Active Directory before you join your computers to the domain. When you join a computer to a domain, Likewise associates the computer with the pre-existing machine account when Likewise can find it. To locate the machine account, Likewise first looks for a machine account with a DNS hostname that matches the hostname of the computer. If the DNS hostname is not set, Likewise then looks for the name of a machine account that matches the computer's hostname, but only when the computer's hostname is 15 characters or less. Therefore, when the hostname of your computer is more than 15 characters, you should set the DNS hostname for the machine account to ensure that the correct machine account is found. If no match is found, Likewise creates a machine account.

The location of the domain join command-line utility is as follows:

/opt/likewise/bin/domainjoin-cli

After you join a domain for the first time, you must restart the computer before you can log on. If you cannot restart the computer, you must restart each service or daemon that looks up users or groups through the standard nsswitch interface, which includes most services that authenticate users, groups, or computers. You must, for instance, restart the services that use Kerberos, such as sshd.

For Linux computers, there is an optional graphical version of the Likewise domain join tool. It is installed on Linux platforms that are running GTK+ version 2.6 or later. For more information, see Join a Linux Computer to Active Directory with the GUI.

Important: On Linux computers running NetworkManager -- which is often used for wireless connections -- you must make sure before you join a domain that the computer has a non-wireless network connection and that the non-wireless connection is configured to start when the networking cable is plugged in. You must continue to use the non-wireless network connection during the post-join process of restarting your computer and logging on for the first time with your Active Directory domain credentials. For more information, see With NetworkManager, Use a Wired Connection to Join a Domain.

Privileges and Permissions

To join a computer to a domain, you must have the user name and password of an Active Directory account that has privileges to join computers to the domain and the full name of the domain that you want to join. Instructions on how to delegate rights to join a computer to a domain are at http://support.microsoft.com/kb/932455. The level of privileges that you need is set by Microsoft Active Directory and is typically the same as performing the corresponding action on a Windows computer. For more information on Active Directory privileges, permissions, and security groups, see the following references on the Microsoft Technet web site: Active Directory Privileges, Active Directory Object Permissions, Active Directory Users, Computers, and Groups, Securing Active Directory Administrative Groups and Accounts.

Removing a Computer from a Domain

You can remove a computer from the domain either by removing the computer's account from Active Directory Users and Computers or by running the domain join tool on the Unix, Linux, or Mac OS X computer that you want to remove; see Leave a Domain.

Creation of Local Accounts

After you join a domain, Likewise creates two local user accounts in the following form: machine-name\Administrator and machine-name\Guest. The administrator account is disabled until you enable it by running the lw-mod-user command with the root account. You will be prompted to reset the password the first time you use the account.

You can view information about these accounts by executing the following command:

/opt/likewise/bin/lw-enum-users

Example output:

User info (Level-2):
====================
Name:                       NISHI-01\Administrator
UPN:                        Administrator@NISHI-01
Generated UPN:              YES
Uid:                        1500
Gid:                        1544
Gecos:                      <null>
Shell:                      /bin/sh
Home dir:                   /
LMHash length:              0
NTHash length:              0
Local User:                 YES
Account disabled:           TRUE
Account Expired:            FALSE
Account Locked:             FALSE
Password never expires:     FALSE
Password Expired:           TRUE
Prompt for password change: YES
User can change password:   NO
Days till password expires: -149314


User info (Level-2):
====================
Name:                       NISHI-01\Guest
UPN:                        Guest@NISHI-01
Generated UPN:              YES
Uid:                        1501
Gid:                        1546
Gecos:                      <null>
Shell:                      /bin/sh
Home dir:                   /tmp
LMHash length:              0
NTHash length:              0
Local User:                 YES
Account disabled:           TRUE
Account Expired:            FALSE
Account Locked:             TRUE
Password never expires:     FALSE
Password Expired:           FALSE
Prompt for password change: YES
User can change password:   NO
Days till password expires: -149314

10.2. Join Active Directory with the Command Line

On Linux, Unix, and Mac OS X computers, the location of the domain join command-line utility is as follows:

 /opt/likewise/bin/domainjoin-cli

Important: To run the command-line utility, you must use a root account. To join a computer to a domain, you must have the user name and password of an Active Directory account that has privileges to join computers to the domain and the full name of the domain that you want to join. Instructions on how to delegate rights to join a computer to a domain are at http://support.microsoft.com/kb/932455. After you join a domain for the first time, you must restart the computer before you can log on with your domain account.

When you join a domain by using the command-line utility, Likewise uses the hostname of the computer to derive a fully qualified domain name (FQDN) and then automatically sets the FQDN in the /etc/hosts file. You can also join a domain without changing the /etc/hosts file; see Join Active Directory Without Changing /etc/hosts.

Before Joining a Domain

To join a domain, the computer's name server must be able to find the domain and the computer must be able to reach the domain controller. You can make sure the name server can find the domain by running this command:

nslookup  domainName

You can verify that your computer can reach the domain controller by pinging it:

ping  domainName

If either of these tests fails, see Check System Health Before Installing the Agent and Solve Domain-Join Problems.

Join a Linux or Unix Computer to Active Directory

Execute the following command as root, replacing domainName with the FQDN of the domain that you want to join and joinAccount with the user name of an account that has privileges to join computers to the domain:

/opt/likewise/bin/domainjoin-cli join domainName joinAccount

Example: /opt/likewise/bin/domainjoin-cli join likewisedemo.com Administrator

Tip: On Ubuntu, execute the sudo su - command before you run the domainjoin-cli command.

Join a Mac Computer to Active Directory

Using sudo, execute the following command in Terminal, replacing domainName with the FQDN of the domain that you want to join and joinAccount with the user name of an account that has privileges to join computers to the domain:

sudo /opt/likewise/bin/domainjoin-cli join domainName joinAccount

Example: sudo /opt/likewise/bin/domainjoin-cli join likewisedemo.com Administrator

The terminal prompts you for two passwords: The first is for a user account on the Mac that has administrative privileges; the second is for the account in Active Directory that you specified in the join command.

Join a Linux or Unix Computer to an Organizational Unit

Execute the following command as root, replacing organizationalUnitName with the path and name of the organizational unit that you want to join, domainName with the FQDN of the domain, and joinAccount with the user name of an account that has privileges to join computers to the domain:

/opt/likewise/bin/domainjoin-cli join --ou organizationalUnitName domainName joinAccount

Example: /opt/likewise/bin/domainjoin-cli join --ou Engineering likewisedemo.com Administrator

Join a Linux or Unix Computer to a Nested Organizational Unit

Execute the following command as root, replacing path with the AD path to the OU from the top down, with each node separated by a forward slash (/). In addition, replace organizationalUnitName with the name of the organizational unit that you want to join. Replace domainName with the FQDN of the domain and joinAccount with the user name of an AD account that has privileges to join computers to the target OU:

/opt/likewise/bin/domainjoin-cli join --ou path/organizationalUnitName domainName joinAccount

Here's an example of how to join a deeply nested OU:

domainjoin-cli join --ou topLevelOU/middleLevelOU/LowerLevelOU/TargetOU likewisedemo.com Administrator

10.3.  Domainjoin-cli Options, Commands, and Arguments

The domainjoin-cli command-line interface includes the following options:

Option

Description

Example

--help

Displays the command-line options and commands.

domainjoin-cli --help

--help-internal

Displays a list of the internal debugging and configuration commands.

domainjoin-cli --help-internal

--logfile  {.| path}

Generates a log file or prints the log to the console.

domainjoin-cli --logfile /var/log/domainjoin.log join likewisedemo.com Administrator

domainjoin-cli --logfile . join likewisedemo.com Administrator

Basic Commands

The domain join command-line interface includes the following basic commands:

Command

Description

Example

query

Displays the hostname, current domain, and distinguished name, which includes the OU to which the computer belongs.

If the computer is not joined to a domain, it displays only the hostname.

domainjoin-cli query

setname  computerName

Renames the computer and modifies the /etc/hosts file with the name that you specify.

domainjoin-cli setname RHEL44ID

fixfqdn

Fixes a computer's fully qualified domain name.

domainjoin-cli fixfqdn

join [--ou  organizationalUnit ] domainName userName

Joins the computer to the domain that you specify by using the account that you specify.

You can use the --ou option to join the computer to an OU within the domain by specifying the path to the OU and the OU's name. When you use this option, you must use an account that has membership in the Domain Administrators security group. The path to the OU is top down.

domainjoin-cli join --ou Engineering likewisedemo.com Administrator

join -- notimesync

Joins the computer to the domain without synchronizing the computer's time with the domain controller's. When you use this option, the sync-system-time value for lsassd is set to no.

domainjoin-cli join -- notimesync likewisedemo.com Administrator

leave [userName]

Removes the computer from the Active Directory domain.

If the userName is provided, the computer account is disabled in Active Directory.

domainjoin-cli leave

domainjoin-cli leave smithy@likewisedemo.com

Advanced Commands

The command-line interface includes advanced commands that you can use to preview the stages of joining or leaving a domain, find out which configurations are required for your system, view information about a module that will be changed, configure a module such as nsswitch, and enable or disable a module. The advanced commands provide a potent tool for troubleshooting issues while configuring a Linux or Unix computer to interoperate with Active Directory.

View a data-flow diagram that shows how systems interact when you join a domain.

Preview the Stages of the Domain Join for Your Computer

To preview the domain, DNS name, and configuration stages that will be used to join a computer to a domain, execute the following command at the command line:

domainjoin-cli join --preview  domainName

Example: domainjoin-cli join --preview likewisedemo.com

Here's an example of the results, which can vary by computer:

[root@rhel4d bin]# domainjoin-cli join --preview likewisedemo.com
Joining to AD Domain:   likewisedemo.com
With Computer DNS Name: rhel4d.likewisedemo.com

The following stages are currently configured to be run during the domain join:
join           - join computer to AD
krb5           - configure krb5.conf
nsswitch       - enable/disable Likewise nsswitch module
start          - start daemons
pam            - configure pam.d/pam.conf
ssh            - configure ssh and sshd

Check Required Configurations

To see a full listing of the modules that apply to your operating system, including those modules that will not be run, execute either the following join or leave command:

domainjoin-cli join --advanced --preview  domainName

domainjoin-cli leave --advanced --preview  domainName

Example: domainjoin-cli join --advanced --preview likewisedemo.com

The result varies by computer:

[root@rhel4d bin]# domainjoin-cli join --advanced --preview likewisedemo.com
Joining to AD Domain:   likewisedemo.com
With Computer DNS Name: rhel4d.likewisedemo.com
    [F] stop           - stop daemons
    [F] hostname       - set computer hostname
    [F] firewall       - open ports to DC
    [F] keytab         - initialize kerberos keytab
[X] [N] join           - join computer to AD
[X] [N] krb5           - configure krb5.conf
[X] [N] nsswitch       - enable/disable Likewise nsswitch module
[X] [N] start          - start daemons
    [F] gdm            - fix gdm presession script for spaces in usernames
[X] [N] pam            - configure pam.d/pam.conf
[X] [S] ssh            - configure ssh and sshd

Key to flags
[F]ully configured        - the system is already configured for this step
[S]ufficiently configured - the system meets the minimum configuration
                            requirements for this step
[N]ecessary               - this step must be run or manually performed.
[X]                       - this step is enabled and will make changes
[ ]                       - this step is disabled and will not make changes

View Details about a Module

The Likewise domain join tool includes the following modules -- the components and services that the tool must configure before it can join a computer to a domain:

Module

Description

join

Joins the computer to Active Directory

leave

Deletes the machine account in Active Directory

dsplugin

Enables the Likewise directory services plugin on a Mac computer

stop

Stops daemons so that the system can be configured

start

Starts daemons after configuration

firewall

Opens ports to the domain controller

hostname

sets the computer hostname

krb5

Configures krb5.conf

pam-mode

Switches authentication from LAM to PAM

nsswitch

Enables or disables Likewise nsswitch module

pam

Configures pam.d and pam.conf

lam-auth

Configures LAM for Active Directory authentication

ssh

Configures ssh and sshd

bash

Fixes the bash prompt for backslashes in usernames

gdm

Fixes gdm presession script for spaces in usernames

As the previous section illustrated, you can see the modules that must be configured on your computer by executing the following command:

domainjoin-cli join --advanced --preview  domainName

You can further bore down into the details of the changes that a module will make by using either the following join or leave command:

domainjoin-cli join --details  module domainName  joinAccount

domainjoin-cli leave --details  module domainName  joinAccount

Example: domainjoin-cli join --details nsswitch likewisedemo.com Administrator

The result varies depending on your system's configuration:

domainjoin-cli join --details nsswitch likewisedemo.com Administrator
[X] [N] nsswitch          - enable/disable Likewise nsswitch module

Key to flags
[F]ully configured        - the system is already configured for this step
[S]ufficiently configured - the system meets the minimum configuration
                            requirements for this step
[N]ecessary               - this step must be run or manually performed.
[X]                       - this step is enabled and will make changes
[ ]                       - this step is disabled and will not make changes

Details for 'enable/disable Likewise nsswitch module':
The following steps are required and can be performed automatically:
    * Edit nsswitch apparmor profile to allow libraries in the /opt/likewise/lib
        and /opt/likewise/lib64 directories
    * List lwidentity module in /usr/lib/security/methods.cfg (AIX only)
    * Add lwidentity to passwd and group/groups line /etc/nsswitch.conf or
        /etc/netsvc.conf

If any changes are performed, then the following services must be restarted:
    * GDM
    * XDM
    * Cron
    * Dbus
    * Nscd

Turn On or Turn Off Domain Join Modules

You can explicitly enable or disable a module when you join or leave a domain. Disabling a module can be useful in cases where a module has been manually configured or in cases where you must ensure that certain system files will not be modified.

Note: If you disable a necessary module and you have not manually configured it, the domain join utility will not join your computer to the domain.

The following command, with either join or leave, can be used to disable a module:

domainjoin-cli join --disable module domainName accountName
domainjoin-cli leave --disable module domainName accountName

Example: domainjoin-cli join --disable pam likewisedemo.com Administrator

To enable a module, execute the following command at the command line:

domainjoin-cli join --enable module domainName accountName

Example: domainjoin-cli join --enable pam likewisedemo.com Administrator

Configuration and Debugging Commands

The domainjoin-cli tool includes commands for debugging the domain-join process and for configuring or preconfiguring a module. You can, for example, run the configure command to preconfigure a system before you join a domain -- a useful strategy when you are deploying Likewise in a virtual environment and you need to preconfigure the nsswitch, ssh, or PAM module of the target computers to avoid having to restart them after they are added to the domain. Here's an example with nsswitch:

domainjoin-cli configure --enable nsswitch

The following commands, viewable by running domainjoin-cli --help-internal, are available:

    fixfqdn
    configure { --enable | --disable } pam [--testprefix <dir>]
    configure { --enable | --disable } nsswitch [--testprefix <dir>]
    configure { --enable | --disable } ssh [--testprefix <dir>]
    configure { --enable | --disable } [--testprefix <dir>] 
               [--long <longdomain>] [--short <shortdomain>] krb5
    configure { --enable | --disable } firewall [--testprefix <dir>]
    configure { --enable | --disable } eventfwdd
    configure { --enable | --disable } reapsysld
    get_os_type
    get_arch
    get_distro
    get_distro_version
    raise_error <error code | error name | 0xhex error code>

10.4. Join Active Directory Without Changing /etc/hosts

When you join a computer to a domain by using the Likewise domain join tool, Likewise uses the hostname of the computer to derive a fully qualified domain name (FQDN) and automatically sets the computer’s FQDN in the /etc/hosts file.

To join a Linux computer to the domain without changing the /etc/hosts file, execute the following command as root, replacing domainName with the FQDN of the domain that you want to join and joinAccount with the user name of an account that has privileges to join computers to the domain:

/opt/likewise/bin/domainjoin-cli join --disable hostname domainName joinAccount

Example: /opt/likewise/bin/domainjoin-cli join --disable hostname likewisedemo.com Administrator

After you join a domain for the first time, you must restart the computer before you can log on.

If the Computer Fails to Join the Domain

Make sure the computer's FQDN is correct in /etc/hosts. For the computer to process tickets in compliance with the Kerberos protocol and to function properly when it uses cached credentials in offline mode or when its DNS server is offline, there must be a correct FQDN in /etc/hosts. For more information on GSS-API requirements, see RFC 2743.

You can determine the fully qualified domain name of a computer running Linux, Unix, or Mac OS X by executing the following command:

ping -c 1 `hostname`

When you execute this command, the computer looks up the primary host entry for its hostname. In most cases, this means that it looks for its hostname in /etc/hosts, returning the first FQDN name on the same line. So, for the hostname qaserver, here's an example of a correct entry in /etc/hosts:

10.100.10.10 qaserver.corpqa.likewise.com qaserver

If, however, the entry in /etc/hosts incorrectly lists the hostname (or anything else) before the FQDN, the computer's FQDN becomes, using the malformed example below, qaserver:

10.100.10.10 qaserver qaserver.corpqa.likewise.com

If the host entry cannot be found in /etc/hosts, the computer looks for the results in DNS instead. This means that the computer must have a correct A record in DNS. If the DNS information is wrong and you cannot correct it, add an entry to /etc/hosts.

10.5. Join a Linux Computer to Active Directory with the GUI

A graphical user interface for joining a domain is included when you install the Likewise agent.

Important: To join a computer to a domain, you must have the user name and password of a user who has privileges to join computers to a domain and the full name of the domain that you want to join.

  1. With root privileges, run the following command at the shell prompt of a Linux computer:

    /opt/likewise/bin/domainjoin-gui

  2. Still as root, in the Domain box, enter the Fully Qualified Domain Name (FQDN) of your Active Directory domain. Example: CORP.LIKEWISEDEMO.COM

    Note: The domain join tool automatically sets the computer’s FQDN by modifying the /etc/hosts file. For example, if your computer's name is qaserver and the domain is corpqa.likewise.com, the domain join tool adds the following entry to the /etc/hosts file: qaserver.corpqa.likewise.com. To manually set the computer's FQDN, see Join Active Directory Without Changing /etc/hosts.

  3. To avoid typing the domain prefix before your user or group name each time you log on -- that is, to force the computer to assume the default domain -- select Enable default user name prefix and enter your domain prefix in the box. Example: CORP

  4. Under Organizational Unit, you can optionally join the computer to an OU by selecting Specific OU Path and then typing a path in the box. The OU path is from the top of the Active Directory domain down to the OU that you want.

    Or, to join the computer to the Computers container, select Default (Computers or previously-joined OU).

  5. Click Join Domain.

  6. Enter the user name and password of an Active Directory account that has privileges to join computers to the domain and then click OK.

    Note: If you do not use an Active Directory Domain Administrator account, you might not have sufficient privileges to change a machine object in Active Directory.

After you join a domain for the first time, you must restart the computer before you can log on.

10.6. Join a Mac Computer to Active Directory with the GUI

To join a computer running Mac OS X 10.4 or later to an Active Directory domain, you must have administrative privileges on the Mac and privileges on the Active Directory domain that allow you to join a computer.

  1. In Finder, click Applications. In the list of applications, double-click Utilities, and then double-click Directory Access in OS X 10.4 or Directory Utility in OS X 10.5. In Mac OS X 10.6 (Snow Leopard), you gain access to Directory Utility by using the Apple menu to view the system preferences for accounts; for instructions, see your Mac OS X 10.6 documentation.

  2. On Mac OS X 10.5, click Show Advanced Settings.

  3. On the Services tab, click the lock and enter an administrator name and password to unlock it.

  4. In the list, make sure that the check box for Active Directory is not selected.

    Important: Active Directory, Apple's built-in service for interoperating with AD, must be disabled for Likewise to work properly.

  5. In the list, click Likewise - Active Directory, make sure the Enable check box for Likewise - Active Directory is selected, and then click Configure in OS X 10.4 or double-click Likewise – Active Directory in OS X 10.5 and later.

    Note: On Mac OS X 10.6, if Likewise - Active Directory does not appear in the list, restart your computer.

  6. Enter a name and password of a local machine account with administrative privileges.

  7. On the menu bar at the top of the screen, click the Likewise Domain Join menu, and then click Join or Leave Domain.

  8. In the Computer name box, type the local hostname of the Mac without the .local extension. Because of a limitation with Active Directory, the local hostname cannot be more than 15 characters. Also: localhost is not a valid name.

    Tip: To find the local hostname of a Mac, on the Apple menu , click System Preferences, and then click Sharing. Under the Computer Name box, click Edit. Your Mac's local hostname is displayed.

  9. In the Domain to join box, type the fully qualified domain name of the Active Directory domain that you want to join.

  10. Under Organizational Unit, you can join the computer to an OU in the domain by selecting OU Path and then typing a path in the OU Path box.

    Note: To join the computer to an OU, you must be a member of the Domain Administrator security group.

    Or, to join the computer to the Computers container, select Default to "Computers" container.

  11. Click Join.

  12. After you are joined to the domain, you can set the display login window preference on the Mac: On the Apple menu , click System Preferences, and then under System, click Accounts.

  13. Click the lock and enter an administrator's name and password to unlock it.

  14. Click Login Options, and then under Display login window as, select Name and password.

With Likewise Enterprise, the domain join utility includes a tool to migrate a Mac user's profile from a local user account to the home directory specified for the user in Active Directory; see Migrate a User Profile on a Mac.

10.6.1. Turn Off OS X Directory Service Authentication

If you are migrating from Open Directory or Active Directory and you had set authentication from the command line with dsconfigad or dsconfigldap, you must run the following commands to stop the computer from trying to use the built-in directory service even if the Mac is not bound to it:

dscl . -delete /Computers
dscl /Search -delete / CSPSearchPath /LDAPv3/FQDNforYourDomainController
dscl /Search -delete / CSPSearchPath /Active\ Directory/All\ Domains
dscl /Search/Contacts -delete / CSPSearchPath /Active\ Directory/All\ Domains
dscl /Search/Contacts -delete / CSPSearchPath /LDAPv3/FQDNforYourDomainController

10.7. Use Likewise with a Single OU

If you have write privileges only for an organizational unit in Active Directory, you can still use Likewise. Your AD rights to create objects in an OU allow you to join Linux and Unix computers to the OU even though you do not have Active Directory Domain Administrator or Enterprise Administrator privileges. (See Delegate Control to Create Container Objects.)

There are additional limitations to this approach:

  • You must join the computer to a specific OU, and you must know the path to that OU.

  • You cannot use Likewise Enterprise in schema mode unless you have Enterprise Administrator privileges, which are required to upgrade the schema.

Join a Linux Computer to an Organizational Unit

To join a computer to a domain, you must have the user name and password of an account that has privileges to join computers to the OU and the full name of the domain that you want to join. The OU path is from the top OU down to the OU that you want.

As root, execute the following command, replacing organizationalUnitName with the path and name of the organizational unit that you want to join, domainName with the FQDN of the domain, and joinAccount with the user name of an account that has privileges to join computers to the domain:

/opt/likewise/bin/domainjoin-cli join -- ou organizationalUnitName domainName joinAccount

Example: /opt/likewise/bin/domainjoin-cli join -- ou Engineering likewisedemo.com Administrator

Example of how to join a nested OU:

domainjoin-cli join --ou topLevelOU/middleLevelOU/LowerLevelOU/TargetOU likewisedemo.com Administrator

After you join a domain for the first time, you must restart the computer before you can log on.

10.8. Rename a Joined Computer

To rename a computer that has been joined to Active Directory, you must first leave the domain. You can then rename the computer by using the domain join command-line interface. After you rename the computer, you must rejoin it to the domain. Renaming a joined computer requires the user name and password of a user with privileges to join a computer to a domain.

Important: Do not change the name of a Linux, Unix, or Mac computer by using the hostname command because some distributions do not permanently apply the changes.

Rename a Computer by Using the Command-Line Tool

The following procedure removes a Unix or Linux computer from the domain, renames the computer, and then rejoins it to the domain.

  1. With root privileges, at the shell prompt of a Unix computer, execute the following command:

    /opt/likewise/bin/domainjoin-cli leave

  2. To rename the computer in /etc/hosts, execute the following command, replacing computerName with the new name of the computer:

    /opt/likewise/bin/domainjoin-cli setname computerName

    Example: /opt/likewise/bin/domainjoin-cli setname RHEL44ID

  3. To rejoin the renamed computer to the domain, execute the following command at the shell prompt, replacing DomainName with the name of the domain that you want to join and UserName with the user name of a user who has privileges to join a domain:

    /opt/likewise/bin/domainjoin-cli join  DomainName UserName

    Example: /opt/likewise/bin/domainjoin-cli join likewisedemo.com Administrator

    It may take a few moments before the computer is joined to the domain.

  4. After you change the hostname of a computer, you must also change the name in the Likewise local provider database so that the local Likewise accounts use the correct prefix. To do so, execute the following command as root, replacing hostName with the name that you want:

    /opt/likewise/bin/lw-set-machine-name hostName

Rename a Computer by Using the Domain Join Tool GUI

  1. From the desktop with root privileges, double-click the Likewise Domain Join Tool, or at the shell prompt of a Linux computer, type the following command:

    /opt/likewise/bin/domainjoin-gui

  2. Click Leave, and then click OK.

  3. Start the domain join tool again by double-clicking the Likewise Domain Join Tool on the desktop, or by typing the following command at the shell prompt of a Linux computer:

    /opt/likewise/bin/domainjoin-gui

  4. Click Next.

  5. In the Computer Name box, rename the computer by typing a new name.

  6. In the Domain to join box, enter the Fully Qualified Domain Name (FQDN) of the Active Directory domain.

  7. Under Organizational Unit, you can join the computer to an OU in the domain by selecting OU Path and then typing a path in the OU Path box.

    Or, to join the computer to the Computers container, select Default to "Computers" container.

  8. Click Next.

  9. Enter the user name and password of an Active Directory user with authority to join a machine to the Active Directory domain, and then click OK.

    The computer's name in /etc/hosts has been changed to the name that you specified and the computer has been joined to the Active Directory domain with the new name.

  10. After you change the hostname of a computer, you must also change the name in the Likewise local provider database so that the local Likewise accounts use the correct prefix. To do so, execute the following command as root, replacing hostName with the name that you want:

    /opt/likewise/bin/lw-set-machine-name hostName

10.9. Files Modified When You Join a Domain

When Likewise adds a computer to a domain, it modifies some system files. The files that are modified depend on the platform, the distribution, and the system's configuration. The following files might be modified.

To see a listing of the changes that joining a domain will make to your operating system, execute the following join command:

domainjoin-cli join --advanced --preview domainName

Note: Not all the following files are present on all computers.

  • /etc/nsswitch.conf (On AIX, the file is /etc/netsvcs.conf.)

  • /etc/pam.conf on AIX, HP-UX, and Solaris

  • /etc/pam.d/* on Linux

  • /etc/ssh/{ssh_config,sshd_config} (or wherever sshd configuration is located)

  • /etc/hosts (To join a domain without modifying /etc/hosts, see Join Active Directory Without Changing /etc/hosts.)

  • /etc/apparmor.d/abstractions/nameservice

  • /etc/X11/gdm/PreSession/Default

  • /etc/vmware/firewall/services.xml

  • /usr/lib/security/methods.cfg

  • /etc/security/user

  • /etc/security/login.cfg

  • /etc/netsvc.conf

  • /etc/krb5.conf

  • /etc/krb5/krb5.conf

  • /etc/rc.config.d/netconf

  • /etc/nodename

  • /etc/{hostname,HOSTNAME,hostname.*}

  • /etc/sysconfig/network/config

  • /etc/sysconfig/network/dhcp

  • /etc/sysconfig/network/ifcfg-*

  • /etc/sysconfig/network-scripts/ifcfg-*

  • /etc/init.d or /sbin/init.d

  • /etc/rcX.d/ (new files and links created)

  • /etc/inet/ipnodes

As an example, the following table lists the files that are modified for the default configuration of the operating system of a few selected platforms.

Modified filesSolaris 9Solaris 10AIX 5.3AIX 6.1Red Hat Enterprise Linux 5
/etc/nsswitch.conf (On AIX, the file is /etc/netsvcs.conf.)ModifiedModified  Modified
/etc/pam.conf on AIX, HP-UX, and SolarisModifiedModifiedModifiedModified 
/etc/pam.d/* on Linux    Modified
/etc/ssh/{ssh_config,sshd_config} (or wherever sshd configuration is located) ModifiedModified Modified
/etc/hosts ModifiedModifiedModifiedModifiedModified
/etc/apparmor.d/abstractions/nameservice     
/etc/X11/gdm/PreSession/Default     
/etc/vmware/firewall/services.xml     
/usr/lib/security/methods.cfg  ModifiedModified 
/etc/security/user  ModifiedModified 
/etc/security/login.cfg  Modified  
/etc/netsvc.conf  ModifiedModified 
/etc/krb5.conf  ModifiedModifiedModified
/etc/krb5/krb5.confModifiedModified   
/etc/rc.config.d/netconf     
/etc/nodenameModifiedModified   
/etc/{hostname, HOSTNAME, hostname.*}Modified    
/etc/sysconfig/network/config     
/etc/sysconfig/network/dhcp     
/etc/sysconfig/network/ifcfg-*     
/etc/sysconfig/network-scripts/ifcfg-*     
/etc/init.d or /sbin/init.d     
/etc/rcX.d/ (new files and links created)   Modified 
/etc/inet/ipnodesModifiedModified   

10.10. With NetworkManager, Use a Wired Connection to Join a Domain

On Linux computers running NetworkManager -- which is often used for wireless connections -- you must make sure before you join a domain that the computer has a non-wireless network connection and that the non-wireless connection is configured to start when the networking cable is plugged in. You must continue to use the non-wireless network connection during the post-join process of restarting your computer and logging on with your Active Directory domain credentials.

After you have joined the domain and logged on for the first time with your AD domain credentials by using a non-wireless connection, you can then revert to using your wireless connection because your AD logon credentials are cached. (You will not, however, be notified when your AD password is set to expire until you either run a sudo command or log on by using a non-wireless connection.)

If, instead, you attempt to use a wireless connection when you join the domain, you will be unable to log on your computer with AD domain credentials after your computer restarts.

Here's why: NetworkManager is composed of a daemon that runs at startup and a user-mode application that runs only after you log on. NetworkManager is typically configured to auto-start wired network connections when they are plugged in and wireless connections when they are detected. The problem is that the wireless network is not detected until the user-mode application starts -- which occurs only after you have logged on.

Information about NetworkManager is available at http://projects.gnome.org/NetworkManager/.

Chapter 11. Logging On with Domain Credentials

11.1. About Logging On

Likewise includes the following logon options:

  • Full domain credentials -- example: likewisedemo.com//hoenstiv

  • Single domain user name -- example: likewisedemo//hoenstiv

  • Alias -- example:  stiv

    (For Likewise Enterprise, see Set a User Alias and Set a Group Alias.

  • Cached credentials

Important: When you log on from the command line, you must use a slash to escape the slash character, making the logon form DOMAIN//username.

To use UPN names, you must raise your Active Directory forest functional level to Windows Server 2003, but raising the forest functional level to Windows Server 2003 will exclude Windows 2000 domain controllers from the domain. For more information, see About Schema Mode and Non-Schema Mode.

When you log on a Linux, Unix, or Mac OS X computer by using your domain credentials, Likewise uses the Kerberos protocol to connect to Active Directory's key distribution center, or KDC, to establish a key and to request a Kerberos ticket granting ticket (TGT). The TGT lets you log on to other computers joined to Active Directory or applications provisioned with a service principal name and be automatically authenticated with Kerberos and authorized for access through Active Directory.

After logon, Likewise stores the password in memory and securely backs it up on disk. You can, however, configure Likewise to store logon information in a SQLite database, but it is not the default method. The password is used to refresh the user's Kerberos TGT and to provide NTLM-based single sign-on through the Likewise GSSAPI library. In addition, the NTLM verifier hash -- a hash of the NTLM hash -- is stored to disk to handle offline logons by comparing the password with the cached credentials.

Likewise stores an NTLM hash and LM hash only for accounts in Likewise's local provider. The hashes are used to authenticate users over CIFS. Since Likewise does not support offline logons for domain users over CIFS, it does not store the LM hash for domain users.

See Also

About Single Sign-On

Configure Putty for Windows-Based SSO

Log On and Verify Your Kerberos Tickets

11.2. Log On with AD Credentials

After the Likewise agent has been installed and the Linux or Unix computer has been joined to a domain, you can log on with your Active Directory credentials, either from the command line or interactively through the system console. After you join a domain for the first time, you must reboot your computer before you can log on interactively through the console.

  • Log on from the command line, but make sure you use a slash character to escape the slash, making the logon form DOMAIN\\username.

    Example with ssh: ssh likewisedemo.com\\hoenstiv@localhost

  • Log on the system console or the text login prompt by using an Active Directory user account in the form of DOMAIN\username, where DOMAIN is the Active Directory short name. Example on Ubuntu:

11.3. Log On with SSH

You can log on with SSH by executing the ssh command at the shell prompt in the following format:

ssh DOMAIN\\username@localhost

Example: ssh likewisedemo.com\\hoenstiv@localhost

11.4. Solve Logon Problems from Windows

To troubleshoot a problem with a user who cannot log on a to Linux or Unix computer, perform the following series of diagnostic tests sequentially.

  1. On a Windows computer, log off and then log on again with the problem user's AD credentials to verify that the password is correct and that the account is not locked or disabled.

  2. Try to SSH to the target Linux or Unix computer again with the user's full NT4-style credentials and password, not just the user's alias. In your SSH command, make sure to use a slash character to escape the slash.

  3. If you are using Likewise Enterprise, make sure that the user's computer is in the correct Likewise cell.

  4. Make sure that the user is enabled to log on the computer, either by being enabled in the cell (with Likewise Enterprise) or by being in a group allowed to access the computer. Then try to log on the target computer again.

  5. Ensure that the Likewise client can communicate with the Active Directory domain controller.

  6. Make sure that the shell specified for the user account in Active Directory is available on the target computer. Specifying a shell that is unavailable will block the user account from logging on.

  7. Verify that the home directory is set and can be created. A home directory that cannot be created because the path is incorrect or the permissions are insufficient can block an attempt to log on.

  8. Make sure there are no logon restrictions in place -- for example, the group policy that restricts logon to certain users or groups -- that prevent the user account from logging on the computer.

  9. Log on the computer with a different user account -- one that is enabled for access to the computer.

11.5. Solve Logon Problems on Linux or Unix

To troubleshoot problems logging on a Linux computer with Active Directory credentials after you joined the computer to a domain, perform the following series of diagnostic tests sequentially with a root account. The tests can also be used to troubleshoot logon problems on a Unix or Mac OS X computer; however, the syntax of the commands on Unix and Mac might be slightly different.

Make Sure You Are Joined to the Domain

Execute the following command:

/opt/likewise/bin/domainjoin-cli query

If you are not joined, see Join Active Directory with the Command Line.

Check Whether You Are Using a Valid Logon Form

When troubleshooting a logon problem, use your full domain credentials: DOMAIN\username. Example: likewisedemo.com\hoenstiv.

When logging on from the command line, you must escape the slash character with a slash character, making the logon form DOMAIN\\username. Example: likewisedemo.com\\hoenstiv.

To view a list of logon options, see About Logging On.

Clear the Cache

You might need to clear the cache to ensure that the client computer recognizes the user's ID. See Clear the Authentication Cache.

Destroy the Kerberos Cache

Clear the Likewise Kerberos cache to make sure there is not an issue with a user's Kerberos tickets. Execute the following command with the user account that you are troubleshooting:

/opt/likewise/bin/kdestroy

Check the Status of the Likewise Authentication Daemon

Check the status of the authentication daemon on a Unix or Linux computer running the Likewise Agent by executing the following command as the root user:

/opt/likewise/bin/lwsm status lsass

If

Do This

The result looks like this:

lsassd is stopped

Restart the daemon.

The result looks like this:

lsassd (pid 1783) is running...

Proceed to the next test.

 

Check Communication between the Likewise Daemon and AD

Verify that the Likewise daemon can exchange data with AD by executing this command:

/opt/likewise/bin/lw-get-dc-name FullDomainName

Example: /opt/likewise/bin/lw-get-dc-name likewisedemo.com

If

Do This

The result does not show the name and IP address of your domain controller

  1. Make sure the domain controller is online and operational.

  2. Check network connectivity between the client and the domain controller.

  3. Join the domain again.

  4. View log files.

The result shows the correct domain controller name and IP address

Proceed to the next test.

Verify that Likewise Can Find a User in AD

Verify that the Likewise agent can find your user by executing the following command, substituting the name of a valid AD domain for domainName and a valid user for ADuserName:

/opt/likewise/bin/lw-find-user-by-name domainName\\ADuserName

Example: /opt/likewise/bin/lw-find-user-by-name likewisedemo\\hab

If

Do This

The command fails to find the user

  1. Check whether the computer is joined to the domain by executing the following command as root:

    domainjoin-cli query

    Displays the hostname, current domain, and distinguished name, which includes the OU to which the computer belongs. Make sure the OU is correct. If the computer is not joined to a domain, it displays only the hostname.

  2. Check Active Directory to make sure the user has an account. If you are using Likewise Enterprise, also ensure that the user is associated with the correct cell.

  3. Check whether the same user is in the /etc/ passwd file. If necessary, migrate the user to Active Directory.

  4. Make sure the AD authentication provider is running by proceeding to the next test.

The user is found

Proceed to the PAM test later in this topic.

Make Sure the AD Authentication Provider Is Running

Likewise includes two authentication providers:

  1. The local provider

  2. The Active Directory provider

If the AD provider is not online, users are unable to log on with their AD credentials. To check the status of the authentication providers, execute the following command as root:

/opt/likewise/bin/lw-get-status

A healthy result should look like this:

LSA Server Status:
Agent version: 5.0.0
Uptime:        2 days 21 hours 16 minutes 29 seconds
[Authentication provider: lsa-local-provider]
        Status:   Online
        Mode:     Local system
[Authentication provider: lsa-activedirectory-provider]
        Status:   Online
        Mode:     Un-provisioned
        Domain:   likewisedemo.com
        Forest:   likewisedemo.com
        Site:     Default-First-Site-Name

An unhealthy result will not include the AD authentication provider or will indicate that it is offline. If the AD authentication provider is not listed in the results, restart the authentication daemon.

If the result looks like the line below, check the status of the Likewise daemons to make sure they are running.

Failed to query status from LSA service.
The LSASS server is not responding.

Run the id Command to Check the User

Run the following id command to check whether nsswitch is properly configured to handle AD user account information:

id DOMAIN\\username

Example: id likewisedemo\\kathy

If the command does not show information for the user, check whether the /etc/nsswitch.conf file is properly configured for passwd and group: Both entries should include the lsass parameter.

If /etc/nsswitch.conf is properly configured, the Likewise name service libraries might be missing or misplaced. It is also possible that the LD_PRELOAD or LD_LIBRARY_PATH variables are defined without including the Likewise libraries.

Switch User to Check PAM

Verify that a user's password can be validated through PAM by using the switch user service. Either switch from a non-root user to a domain user or from root to a domain user. If you switch from root to a domain user, run the command below twice so that you are prompted for the domain user's password:

su DOMAIN\\username

Example: su likewisedemo\\hoenstiv

If

Do This

The switch user command fails to validate the user

Generate a PAM debug log.

Also, check the following log files for error messages (the location of the log files varies by operating system):

/var/log/messages

/var/log/secure

Test SSH

Check whether you can log on with SSH by executing the following command:

ssh DOMAIN\\username@localhost

Example: ssh likewisedemo.com\\hoenstiv@localhost

If you believe the issue might be specific to SSH, see troubleshooting SSH SSO.

Run the Authentication Daemon in Debug Mode

To troubleshoot the lookup of a user or group ID, you can set the Likewise authentication daemon to run in debug mode and show the log in the console by executing this command:

/opt/likewise/sbin/lsassd --loglevel debug

Check Nsswitch.Conf

Make sure /etc/nsswitch.conf is configured correctly to work with Likewise. For more information, see Configuring Clients Before Agent Installation.

On HP-UX, Escape Special Characters at the Console

When you log on to the console on some versions of HP-UX, such as 11.23, you might need to escape special characters, such as @ and #, by preceding them with a slash (\). For more information, see your HP-UX documentation.

Additional Diagnostic Tools

There are additional command-line utilities that you can use to troubleshoot logon problems in the following directory:

 /opt/likewise/bin

See Also

Resolve an AD Alias Conflict with a Local Account

Chapter 12. Troubleshooting Domain-Join Problems

12.1. Top 10 Reasons Domain Join Fails

Here are the top 10 reasons that an attempt to join a domain fails:

  1. Root was not used to run the domain-join command (or to run the domain-join graphical user interface).

  2. The user name or password of the account used to join the domain is incorrect.

  3. The name of the domain is mistyped.

  4. The name of the OU is mistyped.

  5. The local hostname is invalid.

  6. The domain controller is unreachable from the client because of a firewall or because the NTP service is not running on the domain controller. (See Make Sure Outbound Ports Are Open and Diagnose NTP on Port 123.)

  7. The client is running RHEL 2.1 and has an old version of SSH.

  8. On SUSE, GDM ( dbus) must be restarted. This daemon cannot be automatically restarted if the user logged on with the graphical user interface.

  9. On HP-UX and Solaris, dtlogin must be restarted. This daemon cannot be automatically restarted if the user logged on with the HP-UX or Solaris graphical user interface. To restart dtlogin, run the following command: /sbin/init.d/dtlogin.rc start

  10. SELinux is turned on by being set to either enforcing or permissive -- which is especially likely on Fedora and some versions of Red Hat. SELinux must be set to disabled before the computer can be joined to the domain.

    To turn off SELinux, edit the following file, which is the primary configuration file for enabling and disabling SELinux:

    /etc/sysconfig/selinux

    or

    /etc/selinux/config

    For instructions on how to edit the file to disable SELinux, see the SELinux man page.

See Also

Generate a Domain-Join Log

12.2. Solve Domain-Join Problems

To troubleshoot problems with joining a Linux computer to a domain, perform the following series of diagnostic tests sequentially on the Linux computer with a root account. The tests can also be used to troubleshoot domain-join problems on a Unix or Mac OS X computer; however, the syntax of the commands on Unix and Mac might be slightly different.

The procedures in this topic assume that you have already checked whether the problem falls under the Top 10 Reasons Domain Join Fails. It is also recommended that you generate a domain-join log.

Verify that the Name Server Can Find the Domain

Run the following command as root:

nslookup YourADrootDomain.com

Make Sure the Client Can Reach the Domain Controller

You can verify that your computer can reach the domain controller by pinging it:

ping YourDomainName

Verify that Outbound Ports Are Open

Run the following command as root:

domainjoin-cli join --details firewall likewisedemo.com

The results of the command show whether you must open any ports.

For a list of ports that must be open on the client, see Make Sure Outbound Ports Are Open.

Check DNS Connectivity

The computer might be using the wrong DNS server or none at all. Make sure the nameserver entry in /etc/resolv.conf contains the IP address of a DNS server that can resolve the name of the domain you are trying to join. The IP address is likely to be that of one of your domain controllers.

Make Sure nsswitch.conf Is Configured to Check DNS for Host Names

The /etc/nsswitch.conf file must contain the following line. (On AIX, the file is /etc/netsvc.conf.)

hosts: files dns

Computers running Solaris, in particular, may not contain this line in nsswitch.conf until you add it.

Generate a Domain-Join Log

To log information about your attempt to join a domain, you can use the command-line utility's log option with the join command. The log option captures information about the attempt to join the domain on the screen or in a file.

  • To display the information in the terminal, execute the following command; the dot after the logfile option denotes that the information is to be shown in the console:

    domainjoin-cli --logfile . join domainName userName

  • To save the information in a log file, execute the following command:

    domainjoin-cli --logfile path join domainName userName

    Example:

    domainjoin-cli --logfile /var/log/domainjoin.log join likewisedemo.com Administrator

After you generate a log, review it for information that might help solve the problem.

Ensure that DNS Queries Are Not Using the Wrong Network Interface Card

If the computer is multi-homed, the DNS queries might be going out the wrong network interface card. Temporarily disable all the NICs except for the card on the same subnet as your domain controller or DNS server and then test DNS lookups to the AD domain. If this works, re-enable all the NICs and edit the local or network routing tables so that the AD domain controllers are accessible from the host.

Determine Whether the DNS Server Is Configured to Return SRV Records

Your DNS server must be set to return SRV records so the domain controller can be located. It is common for non-Windows (bind) DNS servers to not be configured to return SRV records.

Diagnose it by executing the following command:

nslookup -q=srv _ldap._tcp. ADdomainToJoin.com

Make Sure that the Global Catalog Is Accessible

The global catalog for Active Directory must be accessible. A global catalog in a different zone might not show up in DNS. Diagnose it by executing the following command:

nslookup -q=srv _ldap._tcp.gc._msdcs. ADrootDomain.com

From the list of IP addresses in the results, choose one or more addresses and test whether they are accessible on Port 3268 by using telnet.

telnet 192.168.100.20 3268

Trying 192.168.100.20... Connected to sales-dc.likewisedemo.com (192.168.100.20). Escape character is '^]'. Press the Enter key to close the connection: Connection closed by foreign host.  

Verify that the Client Can Connect to the Domain on Port 123

The following test checks whether the client can connect to the domain controller on Port 123 and whether the Network Time Protocol (NTP) service is running on the domain controller. For the client to join the domain, NTP -- the Windows time service -- must be running on the domain controller.

On a Linux computer, run the following command as root:

ntpdate -d -u  DC_hostname 

Example: ntpdate -d -u sales-dc

For more information, see Diagnose NTP on Port 123.

In addition, check the logs on the domain controller for errors from the source named w32tm, which is the Windows time service.

12.3. Ignore Inaccessible Trusts

An inaccessible trust can block you from successfully joining a domain. If you know that there are inaccessible trusts in your Active Directory network, you can set Likewise to ignore all the trusts before you try to join a domain. To do so, use the lwconfig tool to modify the values of the DomainManagerIgnoreAllTrusts setting.

First, list the available trust settings:

/opt/likewise/bin/lwconfig --list | grep -i trust

The results will look something like this. The setting at issue is DomainManagerIgnoreAllTrusts.

DomainManagerIgnoreAllTrusts
DomainManagerIncludeTrustsList
DomainManagerExcludeTrustsList

Second, list the details of the DomainManagerIgnoreAllTrusts setting to see the values it accepts:

[root@rhel5d bin]# ./lwconfig --details DomainManagerIgnoreAllTrusts
Name: DomainManagerIgnoreAllTrusts
Description: When true, ignore all trusts during domain enumeration.
Type: boolean
Current Value: false
Accepted Values: true, false
Current Value is determined by local policy.

Third, change the setting to true so that Likewise will ignore trusts when you try to join a domain.

[root@rhel5d bin]# ./lwconfig DomainManagerIgnoreAllTrusts true

Finally, check to make sure the change took effect:

[root@rhel5d bin]# ./lwconfig --show DomainManagerIgnoreAllTrusts
boolean
true
local policy

Now try to join the domain again. If successful, keep in mind that only users and groups who are in the local domain will be able to log on the computer.

In the example output above that shows the setting's current values, local policy is listed -- meaning that the policy is managed locally through lwconfig because a Likewise Enterprise group policy is not managing the setting. Typically, with Likewise Enterprise, you would manage the DomainManagerIgnoreAllTrusts policy by using the corresponding group policy, but you cannot apply group policies to the computer until after it is added to the domain. The corresponding Likewise group policy is named Lsass: Ignore all trusts during domain enumeration. For more information on the domain manager group policies to set whitelists and blacklists for trusts, see the Group Policy Administration Guide.

For information on the arguments of lwconfig, run the following command:

/opt/likewise/bin/lwconfig --help

12.4. Dealing with Common Error Messages

This section lists solutions to common errors that can occur when you try to join a domain.

12.4.1. Configuration of Krb5

Error Message:

Warning: A resumable error occurred while processing a module.
Even though the configuration of 'krb5' was executed, the configuration did not
fully complete. Please contact Likewise support.

Solution:

Delete /etc/krb5.conf and try to join the domain again.

12.4.2. Chkconfig Failed

This error can occur when you try to join a domain or you try to execute the domain-join command with an option but the netlogond daemon is not already running.

Error Message:

Error: chkconfig failed [code 0x00080019]

Description: An error occurred while using chkconfig to process the netlogond daemon, which must be added to the list of processes to start when the computer is rebooted. The problem may be caused by startup scripts in the /etc/rc.d/ tree that are not LSB-compliant.

Verification: Running the following command as root can provide information about the error:

chkconfig --add netlogond

Solution: Remove startup scripts that are not LSB-compliant from the /etc/rc.d/ tree.

12.5. Diagnose NTP on Port 123

When you use the Likewise domain-join utility to join a Linux or Unix client to a domain, the utility might be unable to contact the domain controller on Port 123 with UDP. The Likewise agent requires that Port 123 be open on the client so that it can receive NTP data from the domain controller. In addition, the time service must be running on the domain controller.

You can diagnose NTP connectivity by executing the following command as root at the shell prompt of your Linux machine:

ntpdate -d -u DC_hostname 

Example: ntpdate -d -u sales-dc

If all is well, the result should look like this:

[root@rhel44id ~]# ntpdate -d -u sales-dc
2 May 14:19:20 ntpdate[20232]: ntpdate 4.2.0a@1.1190-r Thu Apr 20 11:28:37 EDT 2006 (1)
Looking for host sales-dc and service ntp
host found : sales-dc.likewisedemo.com
transmit(192.168.100.20)
receive(192.168.100.20)
transmit(192.168.100.20)
receive(192.168.100.20)
transmit(192.168.100.20)
receive(192.168.100.20)
transmit(192.168.100.20)
receive(192.168.100.20)
transmit(192.168.100.20)
server 192.168.100.20, port 123
stratum 1, precision -6, leap 00, trust 000
refid [LOCL], delay 0.04173, dispersion 0.00182
transmitted 4, in filter 4
reference time:    cbc5d3b8.b7439581  Fri, May  2 2008 10:54:00.715
originate timestamp: cbc603d8.df333333  Fri, May  2 2008 14:19:20.871
transmit timestamp:  cbc603d8.dda43782  Fri, May  2 2008 14:19:20.865
filter delay:  0.04207  0.04173  0.04335  0.04178
 0.00000  0.00000  0.00000  0.00000
filter offset: 0.009522 0.008734 0.007347 0.005818
 0.000000 0.000000 0.000000 0.000000
delay 0.04173, dispersion 0.00182
offset 0.008734
2 May 14:19:20 ntpdate[20232]: adjust time server 192.168.100.20 offset 0.008734 sec

Output When There Is No NTP Service

If the domain controller is not running NTP on Port 123, the command returns a response such as no server suitable for synchronization found, as in the following output:

5 May 16:00:41 ntpdate[8557]: ntpdate 4.2.0a@1.1190-r Thu Apr 20 11:28:37 EDT 2006 (1)
Looking for host RHEL44ID and service ntp
host found : rhel44id.likewisedemo.com
transmit(127.0.0.1)
transmit(127.0.0.1)
transmit(127.0.0.1)
transmit(127.0.0.1)
transmit(127.0.0.1)
127.0.0.1: Server dropped: no data
server 127.0.0.1, port 123
stratum 0, precision 0, leap 00, trust 000
refid [127.0.0.1], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time:    00000000.00000000  Wed, Feb  6 2036 22:28:16.000
originate timestamp: 00000000.00000000  Wed, Feb  6 2036 22:28:16.000
transmit timestamp:  cbca101c.914a2b9d  Mon, May  5 2008 16:00:44.567
filter delay:  0.00000  0.00000  0.00000  0.00000
 0.00000  0.00000  0.00000  0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
 0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000
5 May 16:00:45 ntpdate[8557]: no server suitable for synchronization found

12.6. Turn Off Apache to Join a Domain

The Apache web server locks the keytab file, which can block an attempt to join a domain. If the computer is running Apache, stop Apache, join the domain, and then restart Apache.

Chapter 13. Configuring the Agent

13.1. Modify Settings with the Config Tool

To quickly change an end-user setting for the Likewise agent, you can run the lwconfig command-line tool as root:

/opt/likewise/bin/lwconfig

The syntax to change the value of a setting is as follows, where setting is replaced by the registry entry that you want to change and value by the new value that you want to set:

/opt/likewise/bin/lwconfig setting value

Here's an example of how to use lwconfig to change the AssumeDefaultDomain setting:

[root@rhel5d bin]# ./lwconfig --detail AssumeDefaultDomain 1
Name: AssumeDefaultDomain
Description: Apply domain name prefix to account name at logon
Type: boolean
Current Value: false
Accepted Values: true, false
Current Value is determined by local policy.

[root@rhel5d bin]# ./lwconfig AssumeDefaultDomain true 2

[root@rhel5d bin]# ./lwconfig --show AssumeDefaultDomain 3
boolean
true
local policy

1

Use the --detail option to view the setting's current value and to determine the values that it accepts.

2

Set the value to true.

3

Use the --show option to confirm that the value was set to true.

To view the settings that you can change with lwconfig, execute the following command:

/opt/likewise/bin/lwconfig --list

You can also import and apply a number of settings with a single command by using the --file option combined with a text file that contains the settings that you want to change followed by the values that you want to set. Each setting-value pair must be on a single line. For example, the contents of my flat file, named newRegistryValuesFile and saved to the desktop of my Red Hat computer, looks like this:

AssumeDefaultDomain true
RequireMembershipOf "likewisedemo\\support" "likewisedemo\\domain^admins"
HomeDirPrefix /home/ludwig
LoginShellTemplate /bash/sh

To import the file and automatically change the settings listed in the file to the new values, I would execute the following command as root:

/opt/likewise/bin/lwconfig --file /root/Desktop/newRegistryValuesFile

13.2. Add Domain Accounts to Local Groups with /etc/group

You can add domain users to your local groups on a Linux, Unix, and Mac OS X computer by placing an entry for the user or group in the /etc/group file. Adding an entry for an Active Directory user to your local groups can give the user local administrative rights. The entries must adhere to the following rules:

  • Use the correct case; entries are case sensitive.

  • Use a user or group's alias if the user or group has one in Active Directory.

  • If the user or group does not have an alias, you must set the user or group in the Likewise canonical name format of NetBIOSdomainName\SAMaccountName.

    Note: For users or groups with an alias, the Likewise canonical name format is the alias, which you must use; you cannot use the format of NetBIOS domain name\SAM account name.

So, for users and groups without an alias, the form of an entry is as follows:

root:x:0:LIKEWISEDEMO\kristeva

For users and groups with an alias, the form of an entry is as follows:

root:x:0:kris

In /etc/group, the slash character separating the domain name from the account name does not typically need to be escaped.

Tip: On Ubuntu, you can give a domain user administrative privileges by adding the user to the admin group as follows:

admin:x:119:LIKEWISEDEMO\bakhtin

On a Mac OS X computer, you can AD users to a local group with Apple's directory service command-line utility: dscl. In dscl, go to the /Local/Default/Groups directory and then add users to a group by using the append command.

13.3. Configure Entries in Your Sudoers Files

When you add Active Directory entries to your sudoers file -- typically, /etc/sudoers --  you must adhere to at least the following rules:

  • ALL must be in uppercase letters.

  • Use a slash character to escape the slash that separates the Active Directory domain from the user or group name.

  • Use the correct case; entries are case sensitive.

  • Use a user or group's alias if the user or group has one in Active Directory.

  • If the user or group does not have an alias, you must set the user or group in the Likewise canonical name format of NetBIOSdomainName\SAMaccountName (and escape the slash character).

    Note: For users or groups with an alias, the Likewise canonical name format is the alias, which you must use; you cannot use the format of NetBIOS domain name\SAM account name.

So, for users and groups without an alias, the form of an entry in the sudoers file is as follows:

DOMAIN\\username

DOMAIN\\groupname

Example entry of a group:

% LIKEWISEDEMO\\LinuxFullAdmins ALL=(ALL) ALL

Example entry of a user with an alias:

kyle ALL=(ALL) ALL

For more information about how to format your sudoers file, see your computer's man page for sudo.

Check a User's Canonical Name on Linux

To determine the canonical name of a Likewise user on Linux, execute the following command, replacing the domain and user in the example with your domain and user:

getent passwd likewisedemo.com\\hab

LIKEWISEDEMO\hab:x:593495196:593494529: Jurgen Habermas:/home/local/ LIKEWISEDEMO/ hab:/bin/ sh

In the results, the user's Likewise canonical name is the first field.

13.4. Set a Sudoers Search Path

Although Likewise searches a number of common locations for your sudoers file, on some platforms Likewise might not find it. In such cases, you can specify the location of your sudoers file by adding the following line to the Sudo GP Extension section of /etc/likewise/grouppolicy.conf:

SudoersSearchPath = /your/search/path

Example: SudoersSearchPath = "/opt/sfw/etc";

Here's an example in the context of the /etc/likewise/grouppolicy.conf file:

[{20D139DE-D892-419f-96E5-0C3A997CB9C4}]
Name = "Likewise Enterprise Sudo GP Extension";
DllName = "liblwisudo.so";
EnableAsynchronousProcessing = 0;
NoBackgroundPolicy = 0;
NoGPOListChanges = 1;
NoMachinePolicy = 0;
NoSlowLink = 1;
NoUserPolicy = 1;
PerUserLocalSettings = 0;
ProcessGroupPolicy = "ProcessSudoGroupPolicy";
ResetGroupPolicy = "ResetSudoGroupPolicy";
RequireSuccessfulRegistry = 1;
SudoersSearchPath = "/opt/sfw/etc";

13.5. Set Up AIX Audit Classes to Monitor Events

On AIX, you can set up audit classes to monitor the activities of users who log on with their Active Directory credentials. The file named /etc/likewise/auditclasses.sample is a template that you can use to set up audit classes for AD users.

To set up an audit class, make a copy of the file, name it /etc/likewise/auditclasses, and then edit the file to specify the audit classes that you want.

After you set up audit classes for a user, the auditing will take place the next time the user logs in.

The sample Likewise auditclasses file looks like this:

#
# Sample auditclasses file.
#
# A line with no label specifies the default audit classes for
# users that are not explicitly listed:
#
general, files
#
# A line starting with a username specifies the audit classes for
# that AD user.  The username must be specified as the "canonical"
# name for the user: either "DOMAIN\username" or just "username"
# if "--assumeDefaultDomain yes" was passed to domainjoin-cli
# with "--userDomainPrefix DOMAIN".  In Likewise Enterprise, if
# the user has an alias specified in the cell the alias name must
# be used here.
# 
DOMAIN\user1: general, files, tcpip
user2: general, cron
#
# A line starting with an @ specifies the audit classes for members
# of an AD group.  These classes are added to the audit classes
# for the user (or the default, if the user is not listed here).
# Whether to specify "DOMAIN\groupname" or just "groupname" follows
# the same rules as for users.
#
@DOMAIN\mail_users: mail
group2: cron

For information on AIX audit classes, see the IBM documentation for your version of AIX.

Chapter 14. Troubleshooting the Agent

Table of Contents

14.1. Likewise Daemons and Services
14.1.1. Troubleshoot Likewise Daemons with the Service Manager
14.1.2. Check the Status of the Authentication Daemon
14.1.3. Check the Status of the DCE/RPC Daemon
14.1.4. Check the Status of the Network Logon Daemon
14.1.5. Check the Status of the Input-Output Service
14.1.6. Restart the Authentication Daemon
14.1.7. Restart the DCE/RPC Daemon
14.1.8. Restart the Network Logon Daemon
14.1.9. Restart the Input-Output Service
14.2. Logging
14.2.1. Generate a Domain-Join Log
14.2.2. Generate an Authentication Agent Debug Log
14.2.3. Generate a PAM Debug Log
14.2.4. Generate a Directory Service Log on a Mac
14.2.5. Log Group Policy Debugging Data
14.2.6. Generate a Network Trace
14.3. Basics
14.3.1. Check the Version and Build Number
14.3.2. Determine a Computer's FQDN
14.3.3. Make Sure Outbound Ports Are Open
14.3.4. Check the File Permissions of nsswitch.conf
14.3.5. Configure SSH After Upgrading It
14.3.6. Upgrading an Operating System
14.4. Accounts
14.4.1. Allow Access to Account Attributes
14.4.2. A User's Settings Are Not Displayed in ADUC
14.4.3. Resolve an AD Alias Conflict with a Local Account
14.4.4. Fix the Shell and Home Directory Paths
14.4.5. Troubleshooting with the Get Status Command
14.4.6. Troubleshoot User Rights with Ldp.exe and Group Policy Modeling
14.4.7. Fix Selective Authentication in a Trusted Domain
14.5. Cache
14.5.1. Clear the Authentication Cache
14.5.2. Clear a Corrupted SQLite Cache
14.6. Kerberos
14.6.1. Fix a Key Table Entry-Ticket Mismatch
14.6.2. Fix KRB Error During SSO in a Disjoint Namespace
14.6.3. Eliminate Logon Delays When DNS Connectivity Is Poor
14.7. PAM
14.7.1. Dismiss the Network Credentials Required Message
14.8. Red Hat and CentOS
14.8.1. Modify PAM to Handle UIDs Less Than 500
14.9. SLED
14.9.1. A Note About the Home Directory on SLED 11
14.9.2. Updating PAM on SLED 11
14.10. AIX
14.10.1. Increase Max Username Length on AIX
14.10.2. Updating AIX
14.11. Mac OS X
14.11.1. Find the Likewise Service Manager Daemon on a Mac
14.12. FreeBSD
14.12.1. Keep Usernames to 16 Characters or Less
14.13. Solaris
14.13.1. Turn On Core Dumps on Solaris 10

This chapter contains information on how to troubleshoot the Likewise agent, including the authentication service, the input-output service, and the network logon daemon.

Additional troubleshooting information is in the following chapters:

  Troubleshooting Domain Join Problems

 Solve Logon Problems on Linux, Unix, or Mac

  Solve Logon Problems from Windows

  Troubleshooting SSH SSO Problems

  Troubleshooting the Group Policy Agent

  Monitoring Events with the Event Log

  Troubleshooting the Likewise Database

  Troubleshooting Samba Integration

  Likewise Tips and Tricks

  Command-Line Reference

For an overview of commands such as rpm and dpkg that can help troubleshoot Likewise packages on Linux and Unix platforms, see Package Management Commands.

14.1. Likewise Daemons and Services

14.1.1. Troubleshoot Likewise Daemons with the Service Manager

The Likewise Service Manager lets you troubleshoot all the Likewise services from a single command-line utility. You can, for example, check the status of the services and start or stop them. The service manager is the preferred method for restarting a service because it automatically identifies a service's dependencies and restarts them in the right order.

To list the status of the services, run the following command with superuser privileges at the command line:

/opt/likewise/bin/lwsm list

Here's an example:

[root@rhel5d bin]# /opt/likewise/bin/lwsm list
lwreg       running (standalone: 1920)
dcerpc      running (standalone: 2544)
eventlog    running (standalone: 2589)
lsass       running (standalone: 2202)
lwio        running (standalone: 2191)
netlogon    running (standalone: 2181)
npfs        running (io: 2191)
pvfs        stopped
rdr         running (io: 2191)
srv         stopped
srvsvc      stopped

To restart the lsass service, run the following command with superuser privileges:

/opt/likewise/bin/lwsm restart lsass

To view all the service manager's commands and arguments, execute the following command:

/opt/likewise/bin/lwsm --help

14.1.2. Check the Status of the Authentication Daemon

On Linux and Unix

You can check the status of the authentication daemon on a Unix or Linux computer running the Likewise agent by executing the following command at the shell prompt as the root user:

/opt/likewise/bin/lwsm status lsass

If the service is not running, execute the following command:

/opt/likewise/bin/lwsm start lsass

14.1.3. Check the Status of the DCE/RPC Daemon

The Likewise DCE/RPC daemon handles communication between Likewise clients and Microsoft Active Directory.

On Linux and Unix

You can check the status of dcerpcd on a Unix or Linux computer running the Likewise agent by executing the following command as the root user:

/opt/likewise/bin/lwsm status dcerpc

If the service is not running, execute the following command:

/opt/likewise/bin/lwsm start dcerpc

On Mac OS X

On a Mac OS X computer, you cannot use the status command, but you can monitor the daemon by using Activity Monitor:

  1. In Finder, click Applications, click Utilities, and then click Activity Monitor.

  2. In the list under Process Name, make sure dcerpcd appears. If the process does not appear in the list, you might need to start it.

  3. To monitor the status of the process, in the list under Process Name, click the process, and then click Inspect.

14.1.4. Check the Status of the Network Logon Daemon

The netlogond daemon detects the optimal domain controller and global catalog and caches the data.

On Linux and Unix

You can check the status of netlogond on a Unix or Linux computer running the Likewise agent by executing the following command as the root user:

/opt/likewise/bin/lwsm status netlogon

If the service is not running, execute the following command:

/opt/likewise/bin/lwsm start netlogon

On Mac OS X

On a Mac OS X computer, you cannot use the status command, but you can monitor the daemon by using Activity Monitor:

  1. In Finder, click Applications, click Utilities, and then click Activity Monitor.

  2. In the list under Process Name, make sure netlogond appears. If the process does not appear in the list, you might need to start it.

  3. To monitor the status of the process, in the list under Process Name, click the process, and then click Inspect.

14.1.5. Check the Status of the Input-Output Service

The Likewise input-output service  -- lwiod -- communicates over SMB with external SMB servers and internal processes.

On Linux and Unix

You can check the status of lwiod on a Unix or Linux computer running the Likewise agent by executing the following command as the root user:

/opt/likewise/bin/lwsm status lwio

If the service is not running, execute the following command:

/opt/likewise/bin/lwsm start lwio

On Mac OS X

On a Mac OS X computer, you cannot use the status command, but you can monitor the daemon by using Activity Monitor:

  1. In Finder, click Applications, click Utilities, and then click Activity Monitor.

  2. In the list under Process Name, make sure lwiod appears. If the process does not appear in the list, you might need to start it.

  3. To monitor the status of the process, in the list under Process Name, click the process, and then click Inspect.

14.1.6. Restart the Authentication Daemon

The authentication daemon handles authentication, authorization, caching, and idmap lookups. For more information, see About the Likewise Agent.

You can restart the Likewise authentication daemon by executing the following command at the shell prompt:

/opt/likewise/bin/lwsm restart lsass

To stop the daemon, type this command:

/opt/likewise/bin/lwsm stop lsass

To start the daemon, type this command:

/opt/likewise/bin/lwsm start lsass

14.1.7. Restart the DCE/RPC Daemon

The Likewise DCE/RPC daemon helps route remote procedure calls between computers on a network by serving as an end-point mapper. For more information, see About the Likewise Agent.

You can restart the Likewise DCE/RPC daemon by executing the following command at the shell prompt:

/opt/likewise/bin/lwsm restart dcerpc

To stop the daemon, type this command:

/opt/likewise/bin/lwsm stop dcerpc

To start the daemon, type this command:

/opt/likewise/bin/lwsm start dcerpc

14.1.8. Restart the Network Logon Daemon

The netlogond daemon determines the optimal domain controller and global catalog and caches the data. For more information and a list of start-order dependencies, see About the Likewise Agent.

You can restart the Likewise network logon daemon by executing the following command at the shell prompt:

/opt/likewise/bin/lwsm restart netlogon

To stop the daemon, type this command:

/opt/likewise/bin/lwsm stop netlogon

To start the daemon, type this command:

/opt/likewise/bin/lwsm start netlogon

14.1.9. Restart the Input-Output Service

The Likewise input-output service  -- lwiod -- communicates over SMB with SMB servers; authentication is with Kerberos 5.

You can restart the input-output service by executing the following command at the shell prompt:

/opt/likewise/bin/lwsm restart lwio

To stop the daemon, type this command:

/opt/likewise/bin/lwsm stop lwio

To start the daemon, type this command:

/opt/likewise/bin/lwsm start lwio

14.2. Logging

Logging can help identify and solve problems. There are debug logs for the following services in Likewise Open and Likewise Enterprise:

  • lsass, the authentication service. Generate a debug log for lsass when you need to troubleshoot authentication errors or failures.

  • PAM, the pluggable authentication modules used by Likewise. Create a debug log for PAM when you need to troubleshoot logon or authentication problems.

  • netlogon: Generate a debug log for netlogon, the site affinity service that detects the optimal domain controller and global catalog, when you need to troubleshoot problems with sending requests to domain controllers or getting information from the global catalog.

  • lwio: The input-output service that manages interprocess communication.

  • eventlog, the event collection service. Generate a debug log for eventlog to troubleshoot the collection and processing of security events.

  • lwreg, the Likewise registry service. Generate a debug log for lwreg to troubleshoot ill-fated configuration changes to the registry.

  • lwsm, the service manager.

  • The Mac OS X directory service plug-in

In addition, the following services are part of Likewise Enteprise only -- they are not relevant to troubleshooting problems with Likewise Open:

  • gpagent, the group policy agent. Generate a debug log for gpagent to troubleshoot the application or processing of group policy objects.

  • eventfwd, the event forwarding daemon. Generate a debug log to verify the service is properly receiving events and forwarding them to a collector server.

  • reapsysl, part of the data collection service. Capture a debug log for reapsysl to investigate the collection and processing of events.

  • lwsc, the smart card service. Gather logging information for the smart card service when card-insertion or card-removal behavior is other than expected.

  • lwpkcs11d, a daemon that aids in logging on and logging off with a smart card. Gather logging information about it when there is a problem logging on or logging off with a smart card.

The log messages are processed by syslog, typically through the daemon facility. Although the path and file name of the log vary by platform, they typically appear in a subdirectory of /var/log. Remember that when you change the log level of a Likewise service to debug, you must also add the following line to /etc/syslog.conf, save it, and then restart the syslog service by running service syslog restart at the command line:

*.debug /tmp/debug.log

Alternatively, you can use the logfile option to specify a location and name for the log file, as the procedure to generate an authentication debug log illustrates.

Log levels can be changed both temporarily and permanently. The following log levels are available for most Likewise services: debug, error, warning, info, verbose, and trace. The default is error. To troubleshoot, it is recommended that you change the level to debug. To conserve disk space, it is recommended that you set the log level back to error when you finish troubleshooting.

To temporarily change the log level, you can execute a command for the command line or you can stop the service and then start it up again, specifying the log level you want in the start command. To permanently change the log level, you must modify the service's entry in the Likewise registry.

Instantly Change the Authentication Service's Log Level from the Command Line

You can quickly set the Likewise log level for the Likewise authentication daemon by executing the following command and replacing level with one of the available logging levels: error, warning, info, verbose, debug, trace.

Changing the log level on the fly is useful to isolate and capture information when a command or operation fails. If, for example, you run a command and it fails, you can change the log level and then run the command again to get information about the failure.

/opt/likewise/bin/lw-set-log-level newLevel

Example: /opt/likewise/bin/lw-set-log-level debug

When you change the log level with the lw-set-log-level command, the log level is changed only until the service or the computer restarts. You can use the following command to view the current log level of the authentication service:

/opt/likewise/bin/lw-set-log-level

Syslog messages are logged through the daemon facility. The default setting is error.

Instantly Change the Log Level for Other Services

In /opt/likewise/bin, there are commands to change the log level of several other services:

Service

Logging Commands in /opt/likewise/bin

netlogon

lwnet-get-log-info

lwnet-set-log-level

Example: lwnet-set-log-level debug

Input-output

lwio-get-log-info

lwio-set-log-level

Example: lwio-set-log-level debug

Event forwarding

evtfwd-get-log-info

evtfwd-set-log-level

Example: evtfwd-set-log-level debug

Group policy

gp-set-log-level

Example: gp-set-log-level debug

System log reaper for the reporting services

rsys-get-log-info

rsys-set-log-level

Example: rsys-set-log-level debug

Change the Log Level to Debug Until the Service Restarts

The following example demonstrates how to change the log level to debug to help troubleshoot a Likewise service. The change is temporary: The service returns to the level specified in the registry when the service restarts. Although this example changes the log level for the site affinity service (netlogon), which detects the optimal domain controller and global catalog, you can use this method to change the log level for the following Likewise daemons: eventlogd, lsassd, lwiod, netlogond, gpagentd, reapsysld, eventfwdd. (See the topics on how to change the log level for the authentication service (lsass) or the group policy agent (gpagentd).)

  1. As root, stop the site affinity service with the Likewise service manager:

    /opt/likewise/bin/lwsm stop netlogon

  2. As root, restart the site affinity daemon and specify the log level and the target log file:

    /opt/likewise/sbin/netlogond --loglevel debug --logfile /tmp/netlogond.log --start-as-daemon

  3. After you finish troubleshooting, use the kill command to stop the daemon and then start it again with the service manager to return the log level to its default:

    /opt/likewise/bin/lwsm start netlogon

    Note: Leaving the log level at info, debug or verbose might result in disk space issues.

Permanently Change the Log Level by Editing the Registry

The following example demonstrates how to change the log level to debug by modifying a daemon's arguments in the Likewise registry. You can modify the log level in the registry if you want to permanently change a daemon's log level or log file destination: The log level that you set persists after you restart the service or the computer.

Although the example permanently changes the log level for the authentication service, you can use this method to change the log level and log file location for the following Likewise daemons: eventlogd, lsassd, lwiod, netlogond, gpagentd, reapsysld, eventfwdd.

In the registry, the default setting for lsass looks like this, viewed here by using the registry shell's ls command combined with the path to the lsass key:

/opt/likewise/bin/lwregshell ls '[HKEY_THIS_MACHINE\Services\lsass]'
[HKEY_THIS_MACHINE\Services\lsass]
"Arguments"="/opt/likewise/sbin/lsassd --syslog"
"Autostart"=dword:00000001
"Dependencies"="netlogon lwio lwreg rdr npfs"
"Description"="Likewise Security and Authentication Subsystem"
"Environment"=""
"FdLimit"=dword:00000400
"Path"="/opt/likewise/sbin/lsassd"
"Type"=dword:00000001

Notice that the default is logging target is syslog. You can change the value by executing the registry shell's set_value command from the command line, like this:

/opt/likewise/bin/lwregshell set_value '[HKEY_THIS_MACHINE\Services\lsass]' Arguments "/opt/likewise/sbin/lsassd --logfile /tmp/lsasslog.txt --loglevel debug"

The value of Arguments has been updated to the specified value:

/opt/likewise/bin/lwregshell ls '[HKEY_THIS_MACHINE\Services\lsass]'
[HKEY_THIS_MACHINE\\Services\lsass]
  "Arguments"    REG_SZ          "/opt/likewise/sbin/lsassd --logfile /tmp/lsasslog.txt --loglevel debug"
  "Autostart"    REG_DWORD       0x00000001 (1)
  "Dependencies" REG_SZ          "netlogon lwio lwreg rdr npfs"
  "Description"  REG_SZ          "Likewise Security and Authentication Subsystem"
  "Environment"  REG_SZ          ""
  "FdLimit"      REG_DWORD       0x00000400 (1024)
  "Path"         REG_SZ          "/opt/likewise/sbin/lsassd"
  "Type"         REG_DWORD       0x00000001 (1)

After you modify a registry setting for a Likewise service, you must refresh the corresponding service with the Likewise Service Manager for the changes to take effect.

Note: Permanently changing the log level to info, debug or verbose will likely result in issues with disk space over time.

14.2.1. Generate a Domain-Join Log

To help troubleshoot problems with joining a domain, you can use the command-line utility's logfile option with the join command. The logfile option captures information about the attempt to join the domain on the screen or in a file. When an attempt to join a domain fails, a log is generated by default at /var/log/likewise-join.log.

  • To display the information in the terminal, execute the following command; the dot after the logfile option denotes that the information is to be shown in the console:

    domainjoin-cli --logfile . join domainName userName

  • To save the information in a log file, execute the following command:

    domainjoin-cli --logfile path join domainName userName

    Example:

    domainjoin-cli --logfile /var/log/domainjoin.log join likewisedemo.com Administrator

14.2.2. Generate an Authentication Agent Debug Log

You can specify the level of logging for the Likewise authentication daemon's interaction with PAM. Running the authentication daemon in debug mode can help troubleshoot the lookup of a user or group ID as well as help solve other authentication problems.

The following log levels are available: debug, error, warning, info, verbose, and trace. The default is error. To troubleshoot, it is recommended that you change the level to debug.

The log messages are processed by syslog. Although the path and file name of the log vary by platform, they typically appear in a subdirectory of /var/log. Alternatively, you can use the logfile option to specify a location and name for the log file, as the following procedure demonstrates:

  1. As root, stop the authentication service.

  2. As root, restart the authentication service and specify the log level and the target log file:

    /opt/likewise/sbin/lsassd --loglevel debug --logfile /tmp/lsassd.log --start-as-daemon

  3. After you finish troubleshooting, use the kill command to stop the daemon and then start it again with the service manager to return the log level to its default.

    Note: Leaving the log level at info, debug or verbose might result in disk space issues over time.

14.2.3. Generate a PAM Debug Log

You can set the level of reporting in the PAM debug log for the Likewise authentication daemon on a Linux or Unix computer. PAM stands for pluggable authentication modules.

The log levels are disabled, error, warning, info, and verbose. The logged data is sent to your system's syslog message repository for security and authentication. The location of the repository varies by operating system. Here are the typical locations for a few platforms:

  • Ubuntu: /var/log/auth.log

  • Red Hat: /var/log/secure

  • Solaris: /var/log/authlog

  • Mac OS X: /var/log/secure.log

The following procedure demonstrates how to change the value of the PAM key's LogLevel entry with the lwconfig command-line utility.

First, use the details option to list the values that the DomainManagerIgnoreAllTrusts setting accepts:

/opt/likewise/bin/lwconfig --details PAMLogLevel
Name: PAMLogLevel
Description: Configure PAM lsass logging detail level
Type: string
Current Value: "disabled"
Acceptable Value: "disabled"
Acceptable Value: "error"
Acceptable Value: "warning"
Acceptable Value: "info"
Acceptable Value: "verbose"
Current Value is determined by local policy.

Now, as root change the setting to error so that Likewise will log PAM errors:

/opt/likewise/bin/lwconfig PAMLogLevel error

Finally, confirm that the change took effect:

/opt/likewise/bin/lwconfig --show PAMLogLevel
string
error
local policy

For more information on the arguments of lwconfig, run the following command:

/opt/likewise/bin/lwconfig --help

14.2.4. Generate a Directory Service Log on a Mac

To troubleshoot logon failures on a Mac OS X computer, you can generate a debug-level directory service log. For information on turning on debug-level logs, see Enabling Directory Service Debug Logging on the Apple support web site.

Using the killall -USR1 command that Apple suggests, however, puts the directory service into debug logging mode for only about 5 minutes. Instead, try using the following commands:

sudo touch /Library/Preferences/DirectoryService/.DSLogDebugAtStart
sudo killall DirectoryService

Reproduce the error and then scan the logs named DirectoryService.debug.log in /Library/Logs/DirectoryService. Look for messages containing the string LWEDS, which indicates that they are produced by the Likewise directory service plug-in.

Examine the logs from the time the user entered a password. If the logs suggest that there may be a networking issue, obtain a tcpdump from the time the password is entered until you notice the logon failure:

tcpdump -s0 -wnetwork.pcap

When you are done troubleshooting, turn off debug logging and restart the directory service by issuing the following commands:

sudo rm /Library/Preferences/DirectoryService/.DSLogDebugAtStart
sudo killall DirectoryService

14.2.5. Log Group Policy Debugging Data

You can generate a group policy agent debug log for Likewise Enterprise by running these commands in this order as root:

/opt/likewise/bin/lwsm stop gpagent
/opt/likewise/sbin/gpagentd --loglevel debug --logfile /tmp/gpagentd.log --start-as-daemon

When you are done logging the information, use the kill command to stop the service and return the log level to its default setting. Then start the group policy daemon with the Likewise service manager:

/opt/likewise/bin/lwsm start gpagent

14.2.6. Generate a Network Trace

Execute the following command in a separate session to dump network traffic as the root user and interrupt the trace with CTRL-C:

tcpdump -s 0 -i eth0 -w trace.pcap

The result should look something like this:

tcpdump: listening on eth0
28 packets received by filter
0 packets dropped by kernel

14.3. Basics

14.3.1. Check the Version and Build Number

Check the Version and Build Number of the Agent on Linux, Unix, or Mac

To check the version number of the Likewise agent, execute the following command:

cat /opt/likewise/data/VERSION

Another option is to execute the following command:

/opt/likewise/bin/lw-get-status

Check the Version and Build Number of the Agent with ADUC

You can check the version and build number of the Likewise agent from a Windows administration workstation that is connected to your domain controller:

  1. In Active Directory Users and Computers, right-click the Linux, Unix, or Mac computer that you want, and then click Properties.

  2. Click the Operating System tab. The build number is shown in the Service pack box.

Check the Build Number of the Agent

On Linux distributions that support RPM -- for example, Red Hat Enterprise Linux, Fedora, SUSE Linux Enterprise, OpenSUSE, and CentOS -- you can determine the version and build number of the agent (5.0.0.xxxx in the examples below)  by executing the following command at the shell prompt:

rpm -qa | grep likewise

The result shows the build version after the version number:

likewise-sqlite-5.0.0-1.26353.3513
likewise-libxml2-5.0.0-1.26353.3513
likewise-netlogon-5.0.0-1.26353.3513
likewise-openldap-5.0.0-1.26353.3513
likewise-pstore-5.0.0-1.26353.3513
likewise-passwd-5.0.0-1.26353.3513
likewise-domainjoin-5.0.0-1.26353.3513
likewise-lsass-5.0.0-1.26353.3513
likewise-krb5-5.0.0-1.26353.3513
likewise-base-5.0.0-1.26353.3513
likewise-rpc-5.0.0-1.26353.3513

On Unix computers and Linux distributions that do not support RPM, the command to check the build number varies by platform:

Platform

Command

Debian and Ubuntu

dpkg –S /opt/likewise/

Solaris

pkginfo | grep -i likewise

AIX

lslpp –l | grep likewise

HP-UX

swlist | grep -i likewise

14.3.2. Determine a Computer's FQDN

You can determine the fully qualified domain name of a computer running Linux, Unix, or Mac OS X by executing the following command at the shell prompt:

ping -c 1 `hostname`

On HP-UX

The command is different on HP-UX:

ping `hostname` -n 1

On Solaris

On Sun Solaris, you can find the FQDN by executing the following command (the computer's configuration can affect the results):

FQDN=`/ usr/lib/mail/ sh/ check-hostname|cut - d" " -f7`;echo $FQDN

See Also

Join Active Directory Without Changing /etc/hosts

14.3.3. Make Sure Outbound Ports Are Open

If you are using local firewall settings, such as iptables, on a computer running the Likewise agent, make sure the following ports are open for outbound traffic.

Note: The Likewise agent is a client only; it does not listen on any ports.

Port

Protocol

Use

53  

UDP/ TCP

DNS

88

UDP/TCP

Kerberos 5

123

UDP

NTP

137

UDP

NetBIOS Name Service

139  

TCP

NetBIOS Session (SMB)

389

UDP/TCP

LDAP

445

TCP

SMB over TCP

464

UDP/TCP

Machine password changes (typically after 30 days)

3268

TCP

Global Catalog search

Tip: To view the firewall rules on a Linux computer using iptables, execute the following command:

iptables - nL

14.3.4. Check the File Permissions of nsswitch.conf

For Likewise to work correctly, the /etc/nsswitch.conf file must be readable by user, group, and world. The following symptoms indicate that you should check the permissions of nsswitch.conf:

  • Running the id command with an AD account as the argument (example: id likewisedemo.com\kathy) works when it is executed as root, but when the same command is executed by the AD user, it returns only a UID and GID without a name.

  • Getting an "I have no name!" or "intruder alert" error message for non-root users.

  • On HP-UX, running the whoami command with an AD user account returns “Intruder alert.”

14.3.5. Configure SSH After Upgrading It

After SSH is upgraded, run the following command as root to make sure that the sshd_config file is set up properly to work with Likewise:

domainjoin-cli configure --enable ssh

14.3.6. Upgrading an Operating System

After upgrading an operating system or installing a kernel patch, you should rerun the domain-join command to make sure that the files related to the operating system, such as PAM and nsswitch, are configured properly to work with Likewise. Re-executing the domain-join command also updates the operatingSystemVersion value and the operatingSystemServicePack value in Active Directory so the Likewise reporting tool reflects the correct version numbers.

Another suggestion, nearly universal in scope, is to apply updates to test systems before you apply updates to production systems, giving you the opportunity to identify and resolve potential issues before they can affect production machines.

14.4. Accounts

14.4.1. Allow Access to Account Attributes

Likewise Enterprise is compatible with Small Business Server 2003. However, because the server locks down several user account values by default, you must create a group in Active Directory for your Unix computers, add each Likewise client computer to it, and configure the group to read all user information.

On other versions of Windows Server, the user account values are available by default. If, however, you use an AD security setting to lock them down, they will be unavailable to the Likewise agent.

To find Unix account information, the Likewise agent requires that the AD computer account for the machine running Likewise can access the attributes in the following table.

Attribute

Requirement

uid

Required when you use Likewise Enterprise in schema mode.

uidNumber

Required when you use Likewise Enterprise in schema mode.

gidNumber

Required when you use Likewise Enterprise in schema mode.

userAccountControl

Required for schema mode and non-schema mode. It is also required for unprovisioned mode, which means that you have not created a Likewise cell in Active Directory, as will be the case if you are using Likewise Open.

Allow Access to Account Attributes
  1. In Active Directory Users and Computers, create a group named Unix Computers.

  2. Add each Likewise client computer to the group.

  3. In the console tree, right-click the domain, choose Delegate Control, click Next, click Add, and then enter the group named Unix Computers.

  4. Click Next, select Delegate the following common tasks, and then in the list select Read all user information.

  5. Click Next, and then click Finish.

  6. On the target Unix, Linux, or Mac computer, restart the Likewise agent to reinitialize the computer account’s logon to Active Directory and to get the new information about group membership.

  7. Run /opt/likewise/lw-enum-users to verify that you can read user information.

See Also

About Schema Mode and Non-Schema Mode

14.4.2. A User's Settings Are Not Displayed in ADUC

If there is no group in a cell that can serve as the user's primary GID -- for instance, because the default primary group, domain users, has been removed from the cell -- the Likewise Settings tab for a user in ADUC will not display the user or group settings, as shown in the screen shot below. To display the settings, enable a group that the user is a member of.

14.4.3. Resolve an AD Alias Conflict with a Local Account

When you use Likewise to set an Active Directory alias for a user, the user can have a file-ownership conflict under the following conditions if the user logs on with the AD account:

  • The AD alias is the same alias as the original local account name.

  • The home directory assigned to the user in Active Directory is the same as the local user's home directory.

  • The owner UID-GID of the AD account is different from that of the local account.

To avoid such conflicts, by default Likewise includes the short AD domain name in each user's home directory. If the conflict nevertheless occurs, there are two options to resolve it:

  1. Make sure that the UID assigned to the user's AD alias is the same as that of the user's local account. See Specify a User's ID and Unix or Linux Settings.

  2. Log on as root and use the chown command to recursively change the ownership of the local account's resources to the AD user alias.

Change Ownership

Log on the computer as root and execute the following commands:

cd <users home directory root>

chown –R <AD user UID>:<AD primary group ID> *.*

Or: chown –R <short domain name>\\<account name>:<short domain name>\\<AD group name> *.*

See Also

Show Duplicate UIDs, GIDs, Login Names, and Group Aliases

14.4.4. Fix the Shell and Home Directory Paths

Symptom: A local directory is in the home directory path and the home directory path does not match the path specified in Active Directory or in /etc/password.

Example: /home/local/DOMAIN/USER instead of /home/DOMAIN/USER

The shell might also be different from what is set in Active Directory -- for example, /bin/ksh instead of /bin/bash.

Problem: The computer is not in a Likewise cell in Active Directory.

Solution: Make sure the computer is in a Likewise cell. For more information, see Associate a Cell with an OU or a Domain, or create a default cell.

A default cell handles mapping for computers that are not in an OU with an associated cell. The default cell can contain the mapping information for all your Linux and Unix computers. For instance, a Linux or Unix computer can be a member of an OU that does not have a cell associated with it. In such a case, the home directory and shell settings are obtained from the nearest parent cell or the default cell. If there is no parent cell and no default cell, the computer will not receive its shell and home directory paths from Active Directory.

See Also

Set the Default Home Directory and Login Shell

14.4.5. Troubleshooting with the Get Status Command

The /opt/likewise/bin/lw-get-status command shows whether the domain or the Likewise AD provider is offline. The results of the command include information useful for general troubleshooting.

/opt/likewise/bin/lw-get-status

Here's an example of the information the command returns:

[root@rhel5d bin]# /opt/likewise/bin/lw-get-status
LSA Server Status:
Compiled daemon version: 6.1.272.54796
Packaged product version: 6.1.272.54796
Uptime:        15 days 21 hours 24 minutes 1 seconds

[Authentication provider: lsa-activedirectory-provider]

        Status:        Online
        Mode:          Un-provisioned
        Domain:        LIKEWISEDEMO.COM
        Forest:        likewisedemo.com
        Site:          Default-First-Site-Name
        Online check interval:  300 seconds
        [Trusted Domains: 1]

        [Domain: LIKEWISEDEMO]

                DNS Domain:       likewisedemo.com
                Netbios name:     LIKEWISEDEMO
                Forest name:      likewisedemo.com
                Trustee DNS name: 
                Client site name: Default-First-Site-Name
                Domain SID:       S-1-5-21-3190566242-1409930201-3490955248
                Domain GUID:      71c19eb5-1835-f345-ba15-0595fb5b62e3
                Trust Flags:      [0x000d]
                                  [0x0001 - In forest]
                                  [0x0004 - Tree root]
                                  [0x0008 - Primary]
                Trust type:       Up Level
                Trust Attributes: [0x0000]
                Trust Direction:  Primary Domain
                Trust Mode:       In my forest Trust (MFT)
                Domain flags:     [0x0001]
                                  [0x0001 - Primary]

                [Domain Controller (DC) Information]

                        DC Name:              w2k3-r2.likewisedemo.com
                        DC Address:           192.168.92.20
                        DC Site:              Default-First-Site-Name
                        DC Flags:             [0x000003fd]
                        DC Is PDC:            yes
                        DC is time server:    yes
                        DC has writeable DS:  yes
                        DC is Global Catalog: yes
                        DC is running KDC:    yes

[Authentication provider: lsa-local-provider]

        Status:        Online
        Mode:          Local system
        Domain:        RHEL5D

14.4.6. Troubleshoot User Rights with Ldp.exe and Group Policy Modeling

The following Microsoft default domain policies and default domain controller policies can cause a Likewise client to fail to join a domain or to fail to enumerate trusts:

  • Access this computer from the network. Users and computers that interact with remote domain controllers require the access-this-computer-from-network user right. Users, computers, and service accounts can lose the user right by being removed from a security group that has been granted the right. Removing the administrators group or the authenticated users group from the policy can cause domain join to fail. Microsoft says, "There is no valid reason for removing Enterprise Domain Controllers group from this user right." For more information, see http://support.microsoft.com/kb/823659.

  • Deny access to this computer from the network. Including the domain computers group in the policy, for instance, causes domain-join to fail.

The symptoms of a user-right problem can include the following:

  • An attempt to join the domain is unsuccessful.

  • The Likewise authentication service, lsass, does not start.

  • The /opt/likewise/bin/lw-get-status command shows the domain or the AD provider as offline.

You can pin down the issue by using the ldp.exe tool to check whether you can access AD by using the machine account and machine password. Ldp.exe is typically included in the support tools (suptools.msi) for Windows and located on the Windows installation CD (Support folder, Tools subfolder). You might also be able to download the support tools that contain ldp.exe from the Microsoft web site.

To resolve a user-right issue, you can use group policy modeling in the GPMC to find the offending policy and then modify it with the GPOE.

  1. On the Likewise client, run the /opt/likewise/bin/lw-lsa ad-get-machine password command as root to get the machine password stored in Active Directory:

    /opt/likewise/bin/lw-lsa ad-get-machine password
    Machine Password Info:
      DNS Domain Name: LIKEWISEDEMO.COM
      NetBIOS Domain Name: LIKEWISEDEMO
      Domain SID: S-1-5-21-3190566242-1409930201-3490955248
      SAM Account Name: RHEL5D$
      FQDN: rhel5d.likewisedemo.com
      Join Type: 1
      Key Version: 0
      Last Change Time: 129401233790000000
      Password: i(2H2e41F7tHN275
    

  2. On a Windows administrative workstation that can connect to AD, start ldp.exe and connect to the domain. (See the LDP UI article for more information.)

  3. In LDP, on the Connection menu, click Bind, and then use the Likewise client's SAM account name and machine password from the output of the lw-lsa ad-get-machine password command to bind to the directory.

    If the attempt to bind with the machine account and the machine password fails because of invalid credentials, as shown in the LDP output below, go to the Group Policy Management Console and use group policy modeling to try to identify the policy causing the problem.

  4. In the GPMC, run the group policy modeling tool to pinpoint the offending policy and then modify the policy to grant the correct level of user right to the computer or user. For more information, see Group Policy Modeling.

    In the following screen shot, for example, the cause of the problem is that the deny-access-to-this-computer-from-the-network default domain policy contains the domain computers group.

14.4.7.  Fix Selective Authentication in a Trusted Domain

When you turn on selective authentication for a trusted domain, Likewise can fail to look up users in the trusted domain because the machine account is not allowed to authenticate with the domain controllers in the trusted domain. Here's how to grant the machine account access to the trusted domain:

  1. In the domain the computer is joined to, create a global group and add the computer's machine account to the group.

  2. In the trusted domain, in Active Directory Users and Computers, select the Domain Controllers container and open Properties.

  3. On the Security tab, click Advanced, click Add, enter the global group, and then click OK.

  4. In the Permission Entry box, under Apply onto, select Computer objects. Under Permissions, find Allowed to Authenticate and enable it. Click OK and then click Apply in the Advanced Security Settings box.

  5. If you have already joined the Likewise client computer to the domain, restart the Likewise authentication service:

    /opt/likewise/bin/lwsm restart lsass

14.5. Cache

14.5.1. Clear the Authentication Cache

There are certain conditions under which you might need to clear the cache so that a user's ID is recognized on a target computer.

By default, the user's ID is cached for 4 hours. If you change a user's UID for a Likewise cell with Likewise Enterprise, during the 4 hours after you change the UID you must clear the cache on a target computer in the cell before the user can log on. If you do not clear the cache after changing the UID, the computer will find the old UID until the cache expires.

There are three Likewise Enterprise group policies that can affect the cache time:

  • The Cache Expiration Time, which stores UID-SID mappings, user/group enumeration lists, getgrnam() and getpwnam(), and so forth. Its default expiration time is 4 hours.

  • The ID Mapping Cache Expiration Time, which caches the mapping tables for SIDs, UIDs, and GIDs. Its default is 1 hour. This policy applies only to Likewise Enterprise 4.1 or earlier.

  • The ID Mapping Negative Cache Expiration Time, which stores failed SID-UID-GID lookups to prevent an overload of resolution requests. Its default is 5 minutes. This policy applies only to Likewise Enterprise 4.1 or earlier.

Tip: While you are deploying and testing Likewise, set the cache expiration time of the Likewise agent's cache to a short period of time, such as 1 minute.

Clear the Cache on a Unix or Linux Computer

To delete all the users and groups from the Likewise AD provider cache on a Linux or Unix computer, execute the following command with superuser privileges:

/opt/likewise/bin/lw-ad-cache --delete-all

You can also use the command to enumerate users in the cache, which may be helpful in troubleshooting. Here's an example:

[root@rhel5d bin]# ./lw-ad-cache --enum-users
TotalNumUsersFound:      0
[root@rhel5d bin]# ssh likewisedemo.com\\hab@localhost
Password: 
Last login: Tue Aug 11 15:30:05 2009 from rhel5d.likewisedemo.com
[LIKEWISEDEMO\hab@rhel5d ~]$ exit
logout
Connection to localhost closed.
[root@rhel5d bin]# ./lw-ad-cache --enum-users
User info (Level-0):
====================
Name:     LIKEWISEDEMO\hab
Uid:      593495196
Gid:      593494529
Gecos:    <null>
Shell:    /bin/bash
Home dir: /home/LIKEWISEDEMO/hab
TotalNumUsersFound:      1
[root@rhel5d bin]# 

To view the command's syntax and arguments, execute the following command:

/opt/likewise/bin/lw-ad-cache --help

Clear the Cache on a Mac OS X Computer

On a Mac OS X computer, clear the cache by running the following command with superuser privileges in Terminal:

dscacheutil -flushcache

14.5.2. Clear a Corrupted SQLite Cache

To clear the cache when Likewise is caching credentials in its SQLite database and the entries in the cache are corrupted, use the following procedure for your type of operating system.

Clear the Cache on a Linux Computer
  1. Stop the Likewise authentication daemon by executing the following command as root:

    /opt/likewise/bin/lwsm lsass stop

  2. Clear the AD-provider cache and the local-provider cache by removing the following two files:

    rm -f /var/lib/likewise/db/lsass-adcache.db

    rm -f /var/lib/likewise/db/lsass-local.db

    Important: Do not delete the other .db files in the /var/lib/likewise/db directory.

  3. Start the Likewise authentication daemon:

    /opt/likewise/bin/lwsm lsass start

 

Clear the Cache on a Mac
  1. In Terminal, stop the Likewise authentication daemon by executing the following command as sudo:

    /opt/likewise/bin/lwsm lsass stop

  2. Clear the AD-provider cache and the local-provider cache by removing the following two files:

    sudo rm -f /var/lib/likewise/db/lsass-adcache.db

    sudo rm -f /var/lib/likewise/db/lsass-local.db

    Important: Do not delete the other .db files in the /var/lib/likewise/db directory.

  3. Restart the Likewise authentication daemon:

    /opt/likewise/bin/lwsm lsass start

Clear the Cache on a Unix Computer
  1. Stop the Likewise authentication daemon by executing the following command as root:

    /opt/likewise/bin/lwsm stop lsass

  2. Clear the AD-provider cache and the local-provider cache by removing the following two files:

    rm -f /var/lib/likewise/db/lsass-adcache.db

    rm -f /var/lib/likewise/db/lsass-local.db

    Important: Do not delete the other .db files in the /var/lib/likewise/db directory.

  3. Start the Likewise authentication daemon:

    /opt/likewise/bin/lwsm start lsass

14.6. Kerberos

The following resources can help troubleshoot time synchronization and other Kerberos issues:

14.6.1. Fix a Key Table Entry-Ticket Mismatch

Problem

When an AD machine account password changes two or more times during the lifetime of a domain user's credentials, the computer's entry that matches the Kerberos service ticket is dropped from the Kerberos key table. Even though the service ticket has not expired, an action that depends on the entry, such as reading the event log or using single sign-on, will fail.

To avoid issues with Kerberos key tables, keytabs, and single sign-on, the machine password expiration time must be at least twice the maximum lifetime for user tickets, plus a little more time to account for the permitted clock skew.

The expiration time for a user ticket is set by using an Active Directory group policy called Maximum lifetime for user ticket. The default user ticket lifetime is 10 hours; the default Likewise machine password lifetime is 30 days.

Causes

The machine account password can change more frequently than the user's AD credentials under the following conditions:

  1. Joining a domain two or more times.

  2. Setting the expiration time of the machine account password group policy to be less than twice the maximum lifetime of user tickets. For more information, see Set the Machine Account Password Expiration Time.

  3. Setting the local machine-password-lifespan for the lsass service in the Likewise registry to be less than twice the maximum lifetime for user tickets.

Solution

If a computer's entry is dropped from the Kerberos key table, you must remove the unexpired service tickets from the user’s credentials cache by reinitializing the cache. Here's how:

On Linux and Unix, reinitialize the credentials cache by executing the following command with the account of the user who is having the problem:

/opt/likewise/bin/kinit

On Mac, you must run both the native kinit command and the Likewise kinit command with the account of the user who is having the problem. (You must run both commands because the native ssh client uses the native credentials cache while the Likewise processes, such as those that access the event log, use the MIT credentials cache.)

/opt/likewise/bin/kinit

kinit

14.6.2. Fix KRB Error During SSO in a Disjoint Namespace

When you are working in a network with a disjoint namespace in which the Active Directory domain name is different from the DNS domain suffix for computers, you may need to modify the domain_realm section of /etc/krb5.conf on your target computer even though your DNS A and PTR records are correct for both DNS domains and can be found both ways.

The following error, in particular, indicates that you might have to modify your krb5.conf file before single sign-on (with SSH, for example) will work:

KRB ERROR BAD OPTION

Assume your computer's Active Directory domain is bluesky.likewisedemo.com and your computer's FQDN is somehostname.green.likewisedemo.com and you have already created the following entries in DNS:

_kerberos._tcp.green.likewisedemo.com 0 100 389 ad2.bluesky.likewisedemo.com
_kerberos._udp.green.likewisedemo.com 0 100 389 ad2.bluesky.likewisedemo.com

Meantime, on the target computer, the [domain_realm] entry of your /etc/krb5.conf file looks like this:

[domain_realm]
.bluesky.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM
bluesky.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM

To resolve the error, add the following two lines to the [domain_realm] entry of your /etc/krb5.conf file:

.green.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM
green.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM

After adding the two lines above, the complete [domain_realm] entry now looks like this:

[domain_realm]
.bluesky.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM
bluesky.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM
.green.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM
green.likewisedemo.com = BLUESKY.LIKEWISEDEMO.COM

Finally, make sure that you have a correct .k5login file and then try to log on again.

14.6.3. Eliminate Logon Delays When DNS Connectivity Is Poor

If connectivity to your DNS servers is tenuous or becomes unavailable, name resolution can time out, delaying the logon process. Because Active Directory is heavily dependent on a well-functioning DNS system, you should work to resolve your DNS issues.

If you cannot fix your DNS system, however, you can as a last resort set up a caching-forwarding name server on the Likewise client to eliminate the logon delay. For instance, you can set up a BIND server on each Linux or Unix computer on which you are running Likewise. Then you can configure BIND as a local caching resolver and add your nameserver addresses to the forwarder list, leaving /etc/resolv.conf with only the local loopback address:

search likewisedemo.com
nameserver 127.0.0.1

For instructions on how to set up BIND, see the BIND documentation.

14.7. PAM

For instructions on how to generate a PAM debug log, see the section on Logging.

14.7.1. Dismiss the Network Credentials Required Message

After leaving the screen saver on a Gnome desktop that is running the Gnome Display Manager, or GDM, you might see a pop-up notification saying that network authentication is required or that network credentials are required. You can ignore the notification. The GDM process that tracks the expiration time of a Kerberos TGT might not recognize the updated expiration time of a Kerberos TGT after it is refreshed by Likewise.

14.8. Red Hat and CentOS

14.8.1.  Modify PAM to Handle UIDs Less Than 500

By default, the configuration file for PAM system authentication – /etc/pam.d/system-auth – on Red Hat Enterprise Linux 5 and CentOS 5 contains the following line, which blocks a user with a UID value less than or equal to 500 from logging on to a computer running the Likewise agent. The symptom is a login failure with a never-ending password prompt.

auth  requisite  pam_succeed_if.so uid >= 500 quiet

Solution: Either delete the line from /etc/pam.d/system-auth or modify it to allow users with UIDs lower than 500:

auth  requisite  pam_succeed_if.so uid >= 50 quiet

For more information on the PAM test of account characteristics, see http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/sag-pam_succeed_if.html.

14.9. SLED

14.9.1. A Note About the Home Directory on SLED 11

SUSE Linux Enterprise Desktop 11 includes Likewise Enterprise. When a user gains access to SLED 11 through Nomad -- a remote desktop using RDP protocol with session management -- the default home directory specified in /lib/security/pam_lsass.so is ignored. To correct the issue, change /etc/pam.d/xrdp-sesman to include the following line:

session sufficient /lib/security/pam_lsass.so

14.9.2.  Updating PAM on SLED 11

SUSE Linux Enterprise Desktop 11 includes Likewise Enterprise. Novell has issued a PAM update (pam-config-0.68-1.22) for SLED 11 that modifies the common-session-pc file to include the following entry:

session optional pam_gnome_keyring.so auto_start_if=gdm

Because the PAM update makes a backup of the file and replaces it with the modified version, the changes that Likewise had made to the file are no longer present, which blocks new AD users from logging on. The following error messages may appear:

Could not update ICEauthority file /home/john/.ICEauthority
There is a problem with the configuration server.
(/user/lib/gconf/2/gconf-sanity-check-2 exited with status 256)

Solution: After you update PAM, run the following command as root:

/opt/likewise/bin/domainjoin-cli configure --enable pam

Or, you can make the changes manually: Open the backed up version of the common-session-pc file, add the following line to it, and then use it to overwrite the new version of the common-session-pc file:

session optional        pam_gnome_keyring.so    auto_start_if=gdm

14.10. AIX

14.10.1. Increase Max Username Length on AIX

By default, AIX is not configured to support long user and group names, which might present a conflict when you try to log on with a long Active Directory username. On AIX 5.3 and AIX 6.1, the symptom is that group names, when enumerated through the groups command, are truncated.

To increase the max username length on AIX 5.3, use the following syntax:

# chdev -l sys0 -a max_logname=MaxUserNameLength+1

Example:

# chdev -l sys0 -a max_logname=255

This command allocates 254 characters for the user and 1 for the terminating null.

The safest value to which you can set max_logname is 255.

You must reboot for the changes to take effect:

# shutdown –Fr

Note: AIX 5.2 does not support increasing the maximum user name length.

14.10.2.  Updating AIX

When you update AIX, the authentication of users, groups, and computers might fail because the AIX upgrade process overwrites changes that Likewise makes to system files. Specifically, upgrading AIX to version 6.1tl3 overwrites /lib/security/methods.cfg, so you must manually add the following code to the last lines of the file after you finish upgrading:

LSASS: 
   program = /usr/lib/security/LSASS

14.11. Mac OS X

14.11.1. Find the Likewise Service Manager Daemon on a Mac

To locate the Likewise service manager process on a Mac OS X computer, execute the following command in Terminal:

sudo launchctl list | grep likewise

On a Mac computer, the name of the daemon for the service manager is as follows:

com.likewisesoftware.lwsmd

14.12. FreeBSD

14.12.1. Keep Usernames to 16 Characters or Less

On FreeBSD, user names that are longer than 16 characters, including the domain name, exceed the FreeBSD username length limit. Attempts to connect by ssh, for example, to a FreeBSD computer with a user name that exceeds the limit can result in the following notification:

bvt-fbs72-64# ssh testuser1@localhost
Password:
Connection to localhost closed by remote host.
Connection to localhost closed.

The log for sshd, meanwhile, might show an error that looks something like this:

Oct  7 18:22:57 vermont02 sshd[66387]: setlogin(LIKEWISEDEMO\adm.kathy): 
Invalid argument
Oct  7 18:25:02 vermont02 sshd[66521]: setlogin(LIKEWISEDEMO\adm.kathy): 
Invalid argument

Although testuser1 is less than 16 characters, when you use the id command to check the account, something longer than 16 characters is returned:

[root@bvt-fbs72-64 /home/testuser]# id testuser1
uid=1100(BVT-FBS72-64\testuser1) gid=1801(BVT-FBS72-64\testgrp)
groups=1801(BVT-FBS72-64\testgrp)

The result of the id command exceeds the FreeBSD username length limit.

There are several solutions: set the default domain, change the user name to 16 characters or less, or with Likewise Enterprise use aliases. Keep in mind, though, that aliases will not solve the problem in relation to the Likewise local provider.

14.13. Solaris

14.13.1. Turn On Core Dumps on Solaris 10

If you are investigating a process that is crashing on Solaris 10 or Solaris Sparc 10, but a core dump is not being generated, it's probably because per-process core dumps are turned off. You can use the coreadm command to manage the core dumps. The settings are saved in the /etc/coreadm.conf file.

A configuration for core dumps with the per-process option turned off looks like this:

# coreadm
     global core file pattern:
     global core file content: default
       init core file pattern: core
       init core file content: default
            global core dumps: disabled
       per-process core dumps: disabled
      global setid core dumps: disabled
 per-process setid core dumps: disabled
     global core dump logging: disabled

You'll need per-process core dumps, though, to troubleshoot a process that is terminating unexpectedly. To turn on core dumps for a process, execute the following command as root:

coreadm -e process

For more information, see Core Dump Management on the Solaris OS and the man page for coreadm.

Chapter 15. Command-Line Reference

Table of Contents

15.1. lwsm: Manage Services
15.2. lwconfig
15.3. lwregshell: The Registry Shell
15.4. lw-edit-reg: Export the Registry to Your Editor
15.5. lw-set-log-level: Set the Log Level
15.6. lw-set-machine-name: Change the Hostname in the Local Provider
15.7. Find a User or a Group
15.8. Find a User by a SID
15.9. List Groups for a User
15.10. lw-enum-groups: List Groups
15.11. lw-enum-users: List Users
15.12. lw-get-status: View the Status of the Authentication Providers
15.13. Get the Current Domain
15.14. lw-get-dc-list: List Domain Controllers
15.15. lw-get-dc-name: Get Domain Controller Information
15.16. lw-get-dc-time: Get Domain Controller Time
15.17. lw-get-log-info
15.18. lw-get-metrics
15.19. Get Machine Account Information
15.20. Reload Changes to the Configuration File
15.21. lw-trace-info: Turn on Trace Markers in Log Messages
15.22. lw-update-dns: Dynamically Update DNS
15.23. lw-ad-cache: Manage the AD Cache
15.24. domainjoin-cli: Join or Leave a Domain
15.25. lw-ypcat
15.26. lw-ypmatch
15.27. lw-adtool: Modify Objects in AD
15.28. lwio: Input-Output Commands
15.28.1. lwio-copy: Copy Files Across Disparate Operating Systems
15.28.2. lwio-refresh: Reload the Input-Output Settings After Changes
15.28.3. lwio-set-log-level
15.28.4. lwio-get-log-info
15.29. Commands to Modify Local Accounts
15.29.1. lw-add-user: Add a Local User by Name or UID
15.29.2. lw-add-group: Add a Local Group Member by Name or GID
15.29.3. lw-del-user: Remove a Local User by Name or UID
15.29.4. lw-del-group: Remove a Local Group by Name or GID
15.29.5. lw-mod-user: Modify a Local User by Name or UID
15.29.6. lw-mod-group: Modify a Local Group's Members
15.30. Kerberos Commands
15.30.1. kdestroy: Destroy the Kerberos Ticket Cache
15.30.2. klist: View Kerberos Tickets
15.30.3. kinit: Obtain and Cache a TGT
15.30.4. kpasswd: Change a Password
15.30.5. ktutil: The Keytab File Maintenance Utility
15.30.6. Kvno: Acquire a Service Ticket and Print Key Version Number
15.31. Commands and Scripts Not for Customer Use
15.31.1. ConfigureLogin
15.31.2. dceidl
15.31.3. gpcron
15.31.4. gpcron.sh
15.31.5. gprsrtmnt.sh
15.31.6. init-base.sh
15.32. Likewise Enterprise Tools Installed on Windows Computers
15.32.1. Lwopt.exe

This chapter presents an overview of the commands in /opt/likewise/bin. Most of the commands are intended to be run as root. Additional troubleshooting information, some of which involves command-line utilities, is in Troubleshooting the Agent.

The group policy commands for Likewise Enterprise are not included in this chapter; they are in Troubleshooting the Group Policy Agent. The commands for managing the event log are in Monitoring Events with the Event Log.

For an overview of commands such as rpm and dpkg that can help you manage Likewise on Linux and Unix platforms, see Package Management Commands.

15.1. lwsm: Manage Services

The Likewise Service Manager lets you track and troubleshoot all the Likewise services with a single command-line utility. You can, for instance, check the status of the services and start or stop them. The service manager is the preferred method for restarting a service because it automatically identifies a service's dependencies and restarts them in the right order. In addition, you can use the service manager to set the logging destination and the log level.

To list the status of the services, run the following command with superuser privileges at the command line:

/opt/likewise/bin/lwsm list

Example:

[root@rhel5d bin]# /opt/likewise/bin/lwsm list
lwreg       running (standalone: 1920)
dcerpc      running (standalone: 2544)
eventlog    running (standalone: 2589)
lsass       running (standalone: 2202)
lwio        running (standalone: 2191)
netlogon    running (standalone: 2181)
npfs        running (io: 2191)
pvfs        stopped
rdr         running (io: 2191)
srv         stopped
srvsvc      stopped

To restart the lsass service, run the following command with superuser privileges:

/opt/likewise/bin/lwsm restart lsass

After you change a setting in the registry, you must use the service manager to force the service to begin using the new configuration by executing the following command with super-user privileges. This example refreshes the lsass service:

/opt/likewise/bin/lwsm refresh lsass

To view information about the lsass service, including its dependencies, run the following command:

/opt/likewise/bin/lwsm info lsass

Example:

[root@rhel5d bin]# /opt/likewise/bin/lwsm info lsass
Service: lsass
Description: Likewise Security and Authentication Subsystem
Type: executable
Autostart: no
Path: /opt/likewise/sbin/lsassd
Arguments: '/opt/likewise/sbin/lsassd' '--syslog'
Dependencies: netlogon lwio lwreg rdr npfs

To view all the service manager's commands and arguments, run the following command:

/opt/likewise/bin/lwsm --help

15.2. lwconfig

To quickly change an end-user setting in the registry for the Likewise agent, you can run the lwconfig command-line tool as root:

/opt/likewise/bin/lwconfig

For more information, see Modify Settings with the lwconfig Tool.

15.3. lwregshell: The Registry Shell

You can access and modify the Likewise registry by using the registry shell -- lwregshell. The shell works in a way that is similar to BASH. You can view a list of the commands that you can execute in the shell by entering help:

/opt/likewise/bin/lwregshell
\> help

You can also manage the registry by executing the registry's commands from the command line. For more information, see Configuring the Likewise Services with the Registry.

15.4. lw-edit-reg: Export the Registry to Your Editor

Executing the following command exports the contents of the Likewise registry to the editor specified by your EDITOR environment variable. You can use the lw-edit-reg command to quickly view the contents of the registry and make changes to the settings. Then, you can launch the registry shell and import the modified file so that your changes take effect.

/opt/likewise/bin/lw-edit-reg

If you have not set a default editor, the script searches for an available editor in the following order: gedit, vi, friends, emacs. On platforms without gedit, an error may occur. You can correct the error by setting the EDITOR environment variable to an available editor, such as vi:

export EDITOR=vi

15.5. lw-set-log-level: Set the Log Level

You can set the Likewise log level for the Likewise authentication daemon by executing the following command and replacing level with one of the available logging levels: error, warning, info, verbose, debug, trace.

/opt/likewise/bin/lw-set-log-level level

Example: /opt/likewise/bin/lw-set-log-level debug

The log level is changed only until the authentication service (lsass) or the computer restarts. Syslog messages are logged through the daemon facility. The default setting is error.

15.6. lw-set-machine-name: Change the Hostname in the Local Provider

After you change the hostname of a computer, you must also change the name in the Likewise local provider database so that the local Likewise accounts use the correct prefix. To do so, execute the following command as root, replacing hostName with the name that you want:

/opt/likewise/bin/lw-set-machine-name hostName

15.7.  Find a User or a Group

On a Unix or Linux computer that is joined to an Active Directory domain, you can check a domain user's or group's information by either name or ID. These commands can verify that the client can locate the user or group in Active Directory.

Find a User by Name

Execute the following command, replacing domain\\username with the full domain user name or the single domain user name of the user that you want to check:

/opt/likewise/bin/lw-find-user-by-name domain\\username

Example: /opt/likewise/bin/lw-find-user-by-name likewisedemo\\hab

You can optionally specify the level of detail of information that is returned. Example:

/opt/likewise/bin/lw-find-user-by-name --level 2 likewisedemo\\hab
User info (Level-2):
====================
Name:                       LIKEWISEDEMO\hab
UPN:                         hab@likewisedemo.com
Uid:                        593495196
Gid:                        593494529
Gecos:                      Jurgen Habermas
Shell:                      /bin/sh
Home dir:                   /home/LIKEWISEDEMO/hab
LMHash length:              0
NTHash length:              0
Local User:                 NO
Account disabled:           FALSE
Account Expired:            FALSE
Account Locked:             FALSE
Password never expires:     TRUE
Password Expired:           FALSE
Prompt for password change: YES

For more information, execute the following command:

/opt/likewise/bin/lw-find-user-by-name --help

Find a User by UID

To find a user by UID, execute the following command, replacing UID with the user's ID:

 /opt/likewise/bin/lw-find-user-by-id UID

Example:

/opt/likewise/bin/lw-find-user-by-id 593495196

Find a Group by Name

 /opt/likewise/bin/lw-find-group-by-name domain\\username

Example:

/opt/likewise/bin/lw-find-group-by-name likewisedemo.com\\dnsadmins

Find a Group by ID

 /opt/likewise/bin/lw-find-group-by-id GID

Example:

[root@rhel4d bin]# /opt/likewise/bin/lw-find-group-by-id 593494534
Group info (Level-0):
====================
Name:     LIKEWISEDEMO\schema^admins
Gid:      593494534
SID:      S-1-5-21-382349973-3885793314-468868962-518

Tip: To view this command's options, type the following command:

/opt/likewise/bin/lw-find-group-by-id --help

15.8. Find a User by a SID

On a Linux, Unix, or Mac OS X computer that is joined to a domain, you can find a user in Active Directory by his or her security identifier (SID). To find a user by SID, execute the following command as root, replacing SID with the user's security identifier:

 /opt/likewise/bin/lw-find-by-sid SID

Example:

[root@rhel4d bin]# /opt/likewise/bin/lw-find-by-sid S-1-5-21-382349973-3885793314-468868962-1180
User info (Level-0):
====================
Name:      LIKEWISEDEMO\hab
SID:      S-1-5-21-382349973-3885793314-468868962-1180
Uid:      593495196
Gid:      593494529
Gecos:     Jurgen Habermas
Shell:    /bin/ sh
Home dir: /home/ LIKEWISEDEMO/ hab

Tip: To view the command's options, type the following command:

/opt/likewise/bin/lw-find-by-sid --help

15.9. List Groups for a User

To find the groups that a user is a member of, execute the following command followed by either the user's name or UID:

/opt/likewise/bin/lw-list-groups-for-user

Example: /opt/likewise/bin/lw-list-groups-for-user 593495196

Here's the command and its result for the user likewisedemo\\hab:

[root@rhel5d bin]# ./lw-list-groups-for-user likewisedemo\\hab
Number of groups found for user 'likewisedemo\hab' : 2
Group[1 of 2] name = LIKEWISEDEMO\enterprise^admins (gid = 593494535)
Group[2 of 2] name = LIKEWISEDEMO\domain^users (gid = 593494529)

Tip: To view this command's options, type the following command:

/opt/likewise/bin/lw-list-groups-for-user --help

15.10. lw-enum-groups: List Groups

On a Linux, Unix, or Mac OS X computer that is joined to a domain, you can enumerate the groups in Active Directory and view their members, GIDs, and SIDs:

 /opt/likewise/bin/lw-enum-groups --level 1

The Likewise agent enumerates groups in the primary domain. Groups in trusted domains and linked cells are not enumerated. NSS membership settings in the registry do not affect the result of the command.

Tip: To view the command's options, type the following command:

/opt/likewise/bin/lw-enum-groups --help

15.11. lw-enum-users: List Users

On a Linux, Unix, or Mac OS X computer that is joined to a domain, you can enumerate the users in Active Directory and view their members, GIDs, and SIDs:

 /opt/likewise/bin/lw-enum-users

The Likewise agent enumerates users in the primary domain. Users in trusted domains and linked cells are not enumerated. NSS membership settings in the registry do not affect the result of the command.

Tip: To view the command's options, type the following command:

/opt/likewise/bin/lw-enum-users --help

To view full information about the users, include the level option when you execute the command:

/opt/likewise/bin/lw-enum-users --level 2

Example result for a one-user batch:

User info (Level-2):
====================
Name:                       LIKEWISEDEMO\sduval
UPN:                        SDUVAL@LIKEWISEDEMO.COM
Generated UPN:              NO
Uid:                        593495151
Gid:                        593494529
Gecos:                      Shelley Duval
Shell:                      /bin/sh
Home dir:                   /home/LIKEWISEDEMO/sduval
LMHash length:              0
NTHash length:              0
Local User:                 NO
Account disabled:           FALSE
Account Expired:            FALSE
Account Locked:             FALSE
Password never expires:     FALSE
Password Expired:           FALSE
Prompt for password change: NO

15.12. lw-get-status: View the Status of the Authentication Providers

Likewise includes two authentication providers:

  1. A local provider

  2. An Active Directory provider

If the AD provider is offline, you will be unable to log on with your AD credentials. To check the status of the authentication providers, execute the following command as root:

 /opt/likewise/bin/lw-get-status

A healthy result should look like this:

LSA Server Status:
Agent version: 5.4.0
Uptime:        22 days 21 hours 16 minutes 29 seconds
[Authentication provider: lsa-local-provider]
        Status:   Online
        Mode:     Local system
[Authentication provider: lsa-activedirectory-provider]
        Status:   Online
        Mode:     Un-provisioned
        Domain:   likewisedemo.com
        Forest:   likewisedemo.com
        Site:     Default-First-Site-Name

An unhealthy result will not include the AD authentication provider or will indicate that it is offline. If the AD authentication provider is not listed in the results, restart the authentication daemon.

If the result looks like the line below, check the status of the Likewise daemons to make sure they are running.

Failed to query status from LSA service.  The LSASS server is not responding.

To check the status of the daemons, run the following command as root:

/opt/likewise/bin/lwsm list

15.13. Get the Current Domain

This command retrieves the Active Directory domain to which the computer is connected. The command's location is as follows:

/opt/likewise/bin/lw-lsa ad-get-machine account

15.14. lw-get-dc-list: List Domain Controllers

This command lists the domain controllers for a target domain. You can delimit the list in several ways, including by site. The command's location is as follows:

/opt/likewise/bin/lw-get-dc-list

Example usage:

[root@rhel5d bin]# ./lw-get-dc-list likewisedemo.com
Got 1 DCs:
===========
DC 1: Name = 'steveh-dc.likewisedemo.com', Address = '192.168.100.132'

To view the command's syntax and arguments, execute the following command:

/opt/likewise/bin/lw-get-dc-list --help

15.15. lw-get-dc-name: Get Domain Controller Information

This command displays the name of the current domain controller for the domain you specify. The command can help you select a domain controller. The command's location is as follows:

/opt/likewise/bin/lw-get-dc-name DomainName

To select a domain controller, run the following command as root until the domain controller you want is displayed. Replace DomainName with the name of your domain:

/opt/likewise/bin/lw-get-dc-name DomainName --force

15.16. lw-get-dc-time: Get Domain Controller Time

This command displays the time of the current domain controller for the domain that you specify. The command can help you determine whether there is a Kerberos time-skew error between a Likewise client and a domain controller. The command's location is as follows:

/opt/likewise/bin/lw-get-dc-time

Example:

[root@rhel5d bin]# ./lw-get-dc-time likewisedemo.com
DC TIME: 2009-09-08 14:54:18 PDT

15.17. lw-get-log-info

This command displays the logging status of the Likewise authentication service. The location of the command is as follows:

/opt/likewise/bin/lw-get-log-info

Example output:

[root@rhel5d bin]# ./lw-get-log-info 
Current log settings:
=================
LSA Server is logging to syslog
Maximum allowed log level: error

15.18. lw-get-metrics

This command displays local security events from the Likewise event log. For information about using the log, see Monitoring Events. The location of the command is as follows:

/opt/likewise/bin/lw-get-metrics

Example output:

[root@rhel5d bin]# ./lw-get-metrics 
Failed authentications:       3
Failed user lookups by name:  34
Failed user lookups by id:    0
Failed group lookups by name: 0
Failed group lookups by id:   0
Failed session opens:         32
Failed session closures:      33
Failed password changes:      0
Unauthorized access attempts: 0

To view the command's options, execute the following command:

/opt/likewise/bin/lw-get-metrics --help

15.19. Get Machine Account Information

You can print out the machine account name, machine account password, SID, and other information by running the following command as root.

/opt/likewise/bin/lw-lsa ad-get-machine account domainDNSName

Example: /opt/likewise/bin/lw-lsa ad-get-machine account likewisedemo.com

15.20. Reload Changes to the Configuration File

After you change a setting in the registry for the Likewise agent, you must force the agent to load the change by executing the following command with super-user privileges:

 /opt/likewise/bin/lw-refresh-configuration

15.21. lw-trace-info: Turn on Trace Markers in Log Messages

This command turns on trace markers in the messages logged by the lwiod and lsassd daemons. You can use the command to obtain more debugging information than that provided by the log level for debugging.

/opt/likewise/bin/lw-lsa trace-info

Example usage:

/opt/likewise/bin/lw-lsa trace-info --set user-group-queries:0,authentication:1 --get user-group-administration

To view this command's options, type the following command:

/opt/likewise/bin/lw-lsa trace-info --help

15.22. lw-update-dns: Dynamically Update DNS

This command registers an IP address for the computer in DNS. The command is useful when you want to register A and PTR records for your computer and the DHCP server is not registering them.

/opt/likewise/bin/lw-update-dns

Here's an example of how to use it to register an IP address:

/opt/likewise/bin/lw-update-dns --ipaddress 192.168.100.4 --fqdn corp.likewisedemo.com

If your system has multiple NICs and you are trying to register all their IP addresses in DNS, run the command once with multiple instances of the ipaddress option:

/opt/likewise/bin/lw-update-dns --fqdn corp.likewisedemo.com --ipaddress 192.168.100.4 --ipaddress 192.168.100.7 --ipaddress 192.168.100.9

To troubleshoot, you can add the loglevel option with the debug parameter to the command:

/opt/likewise/bin/lw-update-dns --loglevel debug --fqdn corp.likewisedemo.com --ipaddress 192.168.100.4 --ipaddress 192.168.100.7

For more information on the command's syntax and arguments, execute the following command:

/opt/likewise/bin/lw-update-dns --help

15.23. lw-ad-cache: Manage the AD Cache

This command manages the Likewise cache for Active Directory users and groups on Linux and Unix computers. The command's location is as follows:

/opt/likewise/bin/lw-ad-cache

You can use the command to clear the cache. The command's arguments can delete from the cache a user, a group, or all users and groups. The following example demonstrates how to delete all the users and groups from the cache:

/opt/likewise/bin/lw-ad-cache --delete-all

Tip: To reclaim disk space from SQLite after you clear the cache when you are using the non-default SQLite caching option, execute the following command as root, replacing fqdn with your fully qualified domain name:

/opt/likewise/bin/sqlite3 /var/lib/likewise/db/lsass-adcache.db.fqdn vacuum

You can also use the lw-ad-cache command to enumerate users in the cache, which may be helpful in troubleshooting. Example:

[root@rhel5d bin]# ./lw-ad-cache --enum-users
TotalNumUsersFound:      0
[root@rhel5d bin]# ssh likewisedemo.com\\hab@localhost
Password: 
Last login: Tue Aug 11 15:30:05 2009 from rhel5d.likewisedemo.com
[LIKEWISEDEMO\hab@rhel5d ~]$ exit
logout
Connection to localhost closed.
[root@rhel5d bin]# ./lw-ad-cache --enum-users
User info (Level-0):
====================
Name:     LIKEWISEDEMO\hab
Uid:      593495196
Gid:      593494529
Gecos:    <null>
Shell:    /bin/bash
Home dir: /home/LIKEWISEDEMO/hab
TotalNumUsersFound:      1
[root@rhel5d bin]# 

To view all the command's syntax and arguments, execute the following command:

/opt/likewise/bin/lw-ad-cache --help

Clear the Cache on a Mac OS X Computer

On a Mac OS X computer, clear the cache by running the following command with superuser privileges in Terminal:

dscacheutil -flushcache

15.24. domainjoin-cli: Join or Leave a Domain

domainjoin-cli is the command-line utility for joining or leaving a domain. For instructions on how to use it, see Join Active Directory with the Command Line.

15.25.  lw-ypcat

This command is the Likewise NIS ypcat function for group passwd and netgroup maps.

/opt/likewise/bin/lw-ypcat

Example usage:

/opt/likewise/bin/lw-ypcat -d likewisedemo.com -k map-name

To view the command's syntax and arguments, execute the following command:

/opt/likewise/bin/lw-ypcat --help

15.26.  lw-ypmatch

This command is the Likewise NIS ypmatch function for group passwd and netgroup maps.

/opt/likewise/bin/lw-ypmatch

Example usage:

/opt/likewise/bin/lw-ypmatch -d likewisedemo.com -k key-name map-name

To view the command's syntax and arguments, execute the following command:

/opt/likewise/bin/lw-ypmatch --help

15.27. lw-adtool: Modify Objects in AD

Likewise Enterprise includes a tool to modify objects in Active Directory from the command line of a Linux, Unix, or Mac OS X computer. Located at /opt/likewise/bin/lw-adtool, the tool has two interrelated functions:

  • Query and modify objects in Active Directory.

  • Find and manage objects in Likewise cells.

You can view a list of these two categories by executing the following command:

/opt/likewise/bin/lw-adtool --help -a

Here's what the ouput of the command looks like:

[root@rhel5d bin]# ./lw-adtool --help -a

  List of Actions

  Generic Active Directory actions:
  --------------------------------

  add-to-group - add a domain user/group to a security group.
  delete-object - delete an object.
  disable-user - disable a user account in Active Directory.
  enable-user - enable a user account in Active Directory.
  lookup-object - retrieve object attributes.
  move-object - move/rename an object.
  new-computer - create a new computer object.
  new-group - create a new global security group.
  new-ou - create a new organizational unit.
  new-user - create a new user account.
  remove-from-group - remove a user/group from a security group.
  reset-user-password - reset user's password.
  search-computer - search for computer objects, print DNs.
  search-group - search for group objects, print DNs.
  search-object - search for any type of objects using LDAP filter.
  search-ou - search for organizational units, print DNs
  search-user - search for users, print DNs.

  Likewise cell management actions:
  --------------------------------

  add-to-cell - add user/group to a Likewise cell.
  delete-cell - delete a Likewise cell.
  edit-cell - modify Likewise cell properties.
  edit-cell-group - modify properties of a cell's group.
  edit-cell-user - modify properties of a cell's user.
  link-cell - link Likewise cells.
  lookup-cell - retrieve Likewise cell properties.
  lookup-cell-group - retrieve properties of cell's group.
  lookup-cell-user - retrieve properties of cell's user.
  new-cell - create a new Likewise cell.
  remove-from-cell - remove user/group from a Likewise cell.
  search-cells - search for Likewise cells.
  unlink-cell - unlink Likewise cells.

To get information about the options for each action, use the following syntax:

/opt/likewise/bin/lw-adtool --help -a <ACTION>

Here's an example with the information that is returned:

/opt/likewise/bin/lw-adtool --help -a new-user

Usage: lw-adtool [OPTIONS] (-a |--action) new-user <ARGUMENTS>

new-user - create a new user account.

Acceptable arguments ([X] - required):

      --dn=STRING                    DN/RDN of the parent container/OU containing the
                                     user. (use '-' for stdin input)
      --cn=STRING                    Common name (CN) of the new user. (use '-' for
                                     stdin input)
      --logon-name=STRING            Logon name of the new user.  (use '-' for stdin
                                     input) [X]
      --pre-win-2000-name=STRING     Pre Windows-2000 logon name.
      --first-name=STRING            First name of the new user.
      --last-name=STRING             Last name of the new user.
      --description=STRING           Description of the user.
      --password=STRING              User's password. (use '-' for stdin input)
      --no-password-expires          The password never expires. If omitted - user
                                     must change password on next logon.
      --account-enabled              User account will be enabled. By default it is
                                     disabled on creation

Notes on Using the Tool

Privileges: When you run the tool, you must use an Active Directory account with privileges that allow you to perform the command's action. The level of privileges that you need is set by Microsoft Active Directory and is typically the same as performing the corresponding action in Microsoft Active Directory Users and Computers. For example, to add a user to a security group, you must be a member of a security group, such as the enterprise administrators security group, that has privileges to perform the action.

For more information on Active Directory privileges, permissions, and security groups, see the following references on the Microsoft Technet web site: Active Directory Privileges, Active Directory object permissions, Active Directory Users, Computers, and Groups, Securing Active Directory Administrative Groups and Accounts.

Options There are short and long options. You separate arguments from options with either space or equal sign. If you are not sure about the results of an action you want to execute, run it in read-only mode first (-r). Also it can be useful to set log level to TRACE (-l 5) to see all the execution steps the tool is taking. Authentication SSO by default if the machine is domain-joined. Otherwise, KRB5 via a cached ticket, keytab file, or name/password (unless secure authentication is turned-off (--no-sec)) Name resolution In most cases you can reference objects by FQDN, RDN, UPN, or just names that make sense for a specific action. Use “-“ if you want the tool to read values from stdin. This allows you to combine commands via pipes, e.g. search and lookup actions. Mu