Module Expr Str Import alias Import alias Import alias Import alias FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body Expr Str FunctionDef arguments args defaults body Return Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Slice Num AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore NameLoad Assign NameStore Call NameLoad If CompareEq SubscriptLoad NameLoad Index Str Num body Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call NameLoad If UnaryOpNot SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr Str Str Raise Call NameLoad Str Assign NameStore ListLoad Str Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args defaults body Expr Str Expr Call NameLoad Return SubscriptLoad Call AttributeLoad NameLoad attr Str Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore ListLoad Str Str Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Return Call AttributeLoad NameLoad attr Str decorator_list
N/A N/A Functions for interacting with Active Directory and local accounts N/A casper_tools N/A config N/A shell_tools N/A sys_tools bind_to_ad N/A N/A loaner hostname N/A False None N/A N/A 
    bind_to_ad()

    Bind the machine to Active Directory
    Unbinds if bound, then binds machine to Active Directory
     __bind N/A N/A N/A N/A N/A N/A N/A shell_tools run N/A 
      dsconfigad -f -a %s -u "%s" -p %s -domain %s -ou %s,%s
     N/A N/A bind_name N/A 13 N/A config LDAP_USER N/A config LDAP_PASSWORD N/A config BIND_DOMAIN N/A config BIND_OU N/A config BIND_DC N/A N/A N/A N/A shell_tools run N/A dsconfigad -f -r -force -u '%s' -p '%s' N/A N/A config LDAP_USER N/A config LDAP_PASSWORD N/A N/A N/A sys_tools configure_time N/A bind_name N/A N/A sys_tools get_computer_name N/A hostname N/A N/A bind_name hostname N/A bind N/A __bind N/A N/A N/A bind N/A status 70 N/A N/A N/A N/A sys_tools log account_tools-bind_to_ad Restarting opendirectoryd N/A N/A N/A shell_tools run killall opendirectoryd N/A N/A N/A sys_tools sleep secs 3 N/A bind N/A __bind N/A N/A N/A bind N/A success N/A N/A N/A N/A sys_tools log account_tools-bind_to_ad Unable to bind to AD N/A N/A Exception Unable to bind to Active Directory N/A bind_settings N/A dsconfigad -mobile enable dsconfigad -mobileconfirm disable N/A setting bind_settings N/A N/A N/A N/A shell_tools run N/A %s setting N/A create_mobile_account N/A N/A ad_account N/A N/A N/A 
    create_mobile_account()

    Create a mobile managed AD account for the ad_account
     N/A managed_app /System/Library/CoreServices/ManagedClient.app/ N/A unix_cma Contents/Resources/createmobileaccount N/A N/A N/A shell_tools run N/A %s%s -n %s N/A managed_app unix_cma ad_account N/A N/A make_admin ad_account N/A flush_ad_cache N/A N/A N/A N/A N/A 
    flush_ad_cache()

    Flush the local AD cache
     N/A N/A N/A shell_tools run dscacheutil -flushcache N/A is_bound_to_ad N/A N/A N/A N/A N/A 
    is_bound_to_ad()

    Return the machine's AD bind status
     N/A N/A flush_ad_cache N/A N/A N/A N/A shell_tools run id an_ad_user N/A success N/A make_admin N/A N/A username N/A N/A N/A 
    make_admin()

    Add user to the admin group
     N/A dscl_base dscl . -append /Local/Default/Groups N/A admin_commands N/A /admin GroupMembership /staff GroupMembership /_lpadmin GroupMembership N/A command admin_commands N/A N/A N/A N/A shell_tools run N/A %s%s %s N/A dscl_base command username N/A trigger_casper_ad_bind N/A N/A N/A N/A N/A 
    trigger_casper_ad_bind()

    Binds the machine via a casper AD bind trigger
     N/A N/A N/A casper_tools trigger_policy your_casper_bind_trigger N/A