Likewise Open

Likewise Open simplifies the necessary configuration needed to authenticate a Linux machine to an Active Directory domain. Based on winbind, the likewise-open package takes the pain out of integrating Kubuntu authentication into an existing Windows network.

Installation

Det finns två sätt att använda Likewise Open, kommandoradsverktyget likewise-open och likewise-open-gui. Detta avsnitt fokuserar på kommandoradsverktyget.

För att installera paketet likewise-open, öppna en terminalprompt och skriv:

sudo apt-get install likewise-open

Starting with Kubuntu 9.04, Likewise Open 5.0 is available in the Universe repository. However, since upgrading from Likewise Open 4.1 currently requires the system to leave the domain and re-join, a separate package for version five was created.

För att installera Likewise Open 5.0 skriv:

sudo apt-get install likewise-open5

Warning

Installing likewise-open5 over an existing likewise-open (4.1) installation will replace it. The domain will have to be rejoined after install.

Ansluta till en domän

The main executable file of the likewise-open package is /usr/bin/domainjoin-cli, which is used to join a computer to the domain. Before joining a domain, the following are needed:

  • Åtkomst till en Active Directory användare som har lämpliga rättigheter för att ansluta till domänen.

  • The Fully Qualified Domain Name (FQDN) of the domain being joined. If the AD domain does not match a valid domain such as example.com, it is likely that it is in the form of domainname.local.

  • DNS for the domain set up properly. In a production AD environment, this is typically the case. Proper Microsoft DNS is needed so that client workstations can determine that the Active Directory domain is available.

    If there is not a Windows DNS server on the network, see the section called “Microsoft DNS” for details.

För att ansluta till en domän, skriv från en terminalprompt:

sudo domainjoin-cli join example.com Administrator

Note

Replace example.com with the proper domain name, and Administrator with the appropriate user name.

There will be a prompt for the user's password. If all goes well, a SUCCESS message should be printed to the console.

Note

Efter att anslutit till domänen, är det nödvändigt att starta om innan du försöker autentisera mot domänen.

After successfully joining an Kubuntu machine to an Active Directory domain, any valid AD user can be used to authenticate. To login, the user name must be entered as 'domain\username'. For example to ssh to a server joined to the domain, enter:

ssh 'example\steve'@hostname

Note

If configuring a Desktop, the user name will need to be prefixed with domain\ in the graphical logon as well.

To make likewise-open use a default domain, the following statement can be added to /etc/samba/lwiauthd.conf:

winbind use default domain = yes

Starta sedan om demonen likewise-open:

sudo /etc/init.d/likewise-open restart

Note

Once configured for a default domain, the 'domain\' is no longer required. Users can login using only their username.

Verktyget domainjoin-cli kan också användas för att lämna en domän. Från en terminal:

sudo domainjoin-cli leave

Andra verktyg

Paketet likewise-open kommer med några andra verktyg som kan vara användbara för att samla information om Active Directory miljön. Dessa verktyg används för att ansluta datorn till domänen och är samma som är med i paketen samba-common och winbind:

  • lwinet: Returnerar information om nätverket och domänen.

  • lwimsg: Tillåter interaktion med demonen likewise-winbindd.

  • lwiinfo: Visar information om olika delar av en domän.

För närmare detaljer hänvisas du till respektive verktygs manualsida.

Problemlösning

  • If the client has trouble joining the domain, check that the Microsoft DNS is listed first in /etc/resolv.conf. For example:

    nameserver 192.168.0.1
    
  • För ytterligare information när du ansluter till en domän, använd --loglevel verbose eller --advanced alternativen till verktyget domainjoin-cli:

    sudo domainjoin-cli --loglevel verbose join example.com Administrator
    
  • Om en AD-användare har problem att logga in, kontrollera /var/log/auth.log för detaljer.

  • When joining an Kubuntu Desktop workstation to a domain, it may be necessary to edit /etc/nsswitch.conf if the AD domain uses the .local syntax. In order to join the domain, the "mdns4" entry should be removed from the hosts option. For example:

    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
    

    Ändra ovanstående till:

    hosts: files dns [NOTFOUND=return]
    

    Starta därefter om nätverket genom att skriva:

    sudo /etc/init.d/networking restart
    

    It should now be possible to join the Active Directory domain.

Microsoft DNS

Följande är instruktioner för att installera DNS på en AD-domänkontrollant som kör Windows Server 2003, men instruktionerna bör vara liknande för andra versioner:

  • Click Start->Administrative Tools->Manage Your Server. This will open the Server Role Management utility.

    1. Klicka på Add or remove a role

    2. Klicka på Next

    3. Välj "DNS Server"

    4. Klicka på Next

    5. Klicka en gång till på Next för att fortsätta

    6. Välj "Create a forward lookup zone" om det inte redan är valt.

    7. Klicka på Next

    8. Säkerställ att "This server maintains the zone" är valt och klicka Next.

    9. Ange domännamnet och klicka på Nästa

    10. Klicka på Next till "Allow only secure dynamic updates"

    11. Ange IP för DNS-servrarna att vidarebefordra förfrågningar till eller Välj "No, it should not forward queries" och klicka Next.

    12. Klicka på Finish

    13. Klicka på Finish

    DNS är nu installerat och kan ytterligare konfigureras genom att använda Microsoft Management Console DNS tillägg.

  • Nästa steg, konfigurera servern till att använda sig själv för DNS-förfrågningar:

    1. Klicka på Start

    2. Control Panel

    3. Network Connections

    4. Högerklicka på "Local Area Connection"

    5. Klicka på Properties

    6. Dubbelklicka på "Internet Protocol (TCP/IP)"

    7. Ange serverns IP-adress som "Preferred DNS server"

    8. Klicka OK

    9. Klicka OK igen för att spara inställningarna

Referenser

På webbplatsen för Likewise finns ytterligare information.

För fler alternativ till domainjoin-cli se manualsidan: man domainjoin-cli.