Module: realm

This module is used to deal with all AD related things:

  • Discovering domains

  • Joining domains

  • Leaving domains

  • Clearing the local user cache

  • Pulling kerberos tickets using the computer account

Members

linuxmusterLinuxclient7.realm.clearUserCache()[source]

Clears the local user cache

Returns

True on success, False otherwise

Return type

bool

linuxmusterLinuxclient7.realm.discoverDomains()[source]

Searches for avialable domains on the current network

Returns

Tuple (success, list of available domains)

Return type

tuple

linuxmusterLinuxclient7.realm.getDomainConfig(domain)[source]

Looks up all relevant properties of a domain: - domain controller IP - domain name

Parameters

domain (str) – The domain to check

Returns

Tuple (success, dict with domain config)

Return type

tuple

linuxmusterLinuxclient7.realm.getJoinedDomains()[source]

Returns all joined domains

Returns

Tuple (success, list of joined domians)

Return type

tuple

linuxmusterLinuxclient7.realm.isJoined()[source]

Checks if the computer is joined to a domain

Returns

True if it is joined to one or more domains, False otherwise

Return type

bool

linuxmusterLinuxclient7.realm.join(domain, user)[source]

Joins the computer to an AD

Parameters
  • domain (str) – The domain to join

  • user (str) – The admin user used for joining

Returns

True on success, False otherwise

Return type

bool

linuxmusterLinuxclient7.realm.leave(domain)[source]

Leave a domain

Parameters

domain (str) – The domain to leave

Returns

True on success, False otherwise

Return type

bool

linuxmusterLinuxclient7.realm.leaveAll()[source]

Leaves all joined domains

Returns

True on success, False otherwise

Return type

bool

linuxmusterLinuxclient7.realm.pullKerberosTicketForComputerAccount()[source]

Pulls a kerberos ticket using the computer account from /etc/krb5.keytab

Returns

True on success, False otherwise

Return type

bool

linuxmusterLinuxclient7.realm.verifyDomainJoin()[source]

Checks if the domain join actually works.

Returns

True if it does, False otherwise

Return type

bool