Skip to content

Shufflepuck/pymacad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status codecov.io

pymacad

Acknowledgments

This python package is based on KerbMinder (http://github.com/pmbuko/KerbMinder).

pymacad.ad

I would suggest to use from pymacad import ad -- then call using ad.xxx

### Example

>>> from pymacad import ad
>>> ad.bound()
False
>>> ad.accessible('TEST.COM')
False
>>> ad.accessible('FTI.IO')
True

Functions

ad.bound()

checks if computer is bound to AD

  • returns True or False
  • raises subprocess.CalledProcessError

ad.principal(user)

gets principal from AD. If no user is specified, uses the current user.

  • Returns principal
  • Raises NotBound, NotReachable or subprocess.CalledProcessError

ad.accessible(domain)

checks if domain can be joined.

  • Returns True or False
  • raises subprocess.CalledProcessError

ad.searchnodes()

returns a list of available directories

ad.adnode()

returns the first Active Directory node or None

ad.get_domain_dns()

returns the DNS of domain, or raises NotBound

ad.membership(user)

Returns a list of groups belonging to this user Raises NotBound

ad.realms()

Returns a list of Kerberos realms, or NotBound

ad.smb_home()

Returns the home URL of the user, or an empty string.

Exceptions

  • pymacad.ad.NotReachable
  • pymacad.ad.NotBound
  • subprocess.CalledProcessError

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages