Part of samba
Module | backend | Functions for setting up a Samba configuration (LDB and LDAP backends). |
Module | common | Functions for setting up a Samba configuration. |
Module | descriptor | Functions for setting up a Samba configuration (security descriptors). |
Module | sambadns | DNS-related provisioning |
From the __init__.py module:
Class | InvalidNetbiosName | A specified name was not a valid NetBIOS name. |
Class | MissingShareError | Undocumented |
Class | ProvisionNames | Undocumented |
Class | ProvisionPaths | Undocumented |
Class | ProvisionResult | Result of a provision. |
Class | ProvisioningError | A generic provision error. |
Function | check_install | Check whether the current install seems ok. |
Function | create_default_gpo | Create the default GPO for a domain |
Function | create_gpo_struct | Undocumented |
Function | create_krb5_conf | Write out a file containing zone statements suitable for inclusion in a named.conf file (including GSS-TSIG configuration). |
Function | create_phpldapadmin_config | Create a PHP LDAP admin configuration file. |
Function | determine_netbios_name | Determine a netbios name from a hostname. |
Function | fill_samdb | Undocumented |
Function | find_provision_key_parameters | Get key provision parameters (realm, domain, ...) from a given provision |
Function | findnss | Find a user or group from a list of possibilities. |
Function | get_last_provision_usn | Get USNs ranges modified by a provision or an upgradeprovision |
Function | get_max_usn | This function return the biggest USN present in the provision |
Function | getpolicypath | Return the physical path of policy given its guid. |
Function | guess_names | Guess configuration settings to use. |
Function | interface_ips_v4 | return only IPv4 IPs |
Function | interface_ips_v6 | return only IPv6 IPs |
Function | make_smbconf | Create a new smb.conf file based on a couple of basic settings. |
Function | provision | Provision samba4 |
Function | provision_become_dc | Undocumented |
Function | provision_fill | Undocumented |
Function | provision_paths_from_lp | Set the default paths for provisioning. |
Function | sanitize_server_role | Sanitize a server role name. |
Function | secretsdb_self_join | Add domain join-specific bits to a secrets database. |
Function | set_dir_acl | Undocumented |
Function | set_gpos_acl | Set ACL on the sysvol/<dnsname>/Policies folder and the policy folders beneath. |
Function | set_provision_usn | No summary |
Function | setsysvolacl | Set the ACL for the sysvol share and the subfolders |
Function | setup_idmapdb | Setup the idmap database. |
Function | setup_name_mappings | setup reasonable name mappings for sam names to unix names. |
Function | setup_privileges | Setup the privileges database. |
Function | setup_registry | Setup the registry. |
Function | setup_samdb | Setup a complete SAM Database. |
Function | setup_samdb_partitions | Setup the partitions for the SAM database. |
Function | setup_samdb_rootdse | Setup the SamDB rootdse. |
Function | setup_secretsdb | Setup the secrets database. |
Function | setup_self_join | Join a host to its own domain. |
Function | update_provision_usn | Update the field provisionUSN in sam.ldb |
Parameters | samdb | An LDB object connected to the sam.ldb file |
secretsdb | An LDB object connected to the secrets.ldb file | |
idmapdb | An LDB object connected to the idmap.ldb file | |
paths | A list of path to provision object | |
smbconf | Path to the smb.conf file | |
lp | A LoadParm object | |
Returns | A list of key provision parameters |
This field is used to track range of USN modified by provision and upgradeprovision. This value is used afterward by next provision to figure out if the field have been modified since last provision.
Parameters | samdb | An LDB object connect to sam.ldb |
low | The lowest USN modified by this upgrade | |
high | The highest USN modified by this upgrade | |
id | The invocation id of the samba's dc | |
replace | A boolean indicating if the range should replace any existing one or appended (default) |
Parameters | samdb | An LDB object connect to sam.ldb |
low | The lowest USN modified by this upgrade | |
high | The highest USN modified by this upgrade | |
id | The invocationId of the provision |
Parameters | samdb | A LDB object pointing to the sam.ldb |
basedn | A string containing the base DN of the provision (ie. DC=foo, DC=bar) | |
Returns | The biggest USN in the provision |
Parameters | sam | An LDB object pointing to the sam.ldb |
Returns | a dictionnary which keys are invocation id and values are an array of integer representing the different ranges |
Parameters | lp | Loadparm context |
session_info | Session information | |
credentials | Credentials |
Parameters | nssfn | NSS Function to try (should raise KeyError if not found) |
names | Names to check. | |
Returns | Value return by first names list. |
Parameters | lp | Loadparm context. |
dnsdomain | DNS Domain name |
Parameters | samdb | SamDB object. |
idmap | IDmap db object. | |
sid | The domain sid. | |
domaindn | The domain DN. | |
root_uid | uid of the UNIX root user. | |
nobody_uid | uid of the UNIX nobody user. | |
users_gid | gid of the UNIX users group. | |
wheel_gid | gid of the UNIX wheel group. |
Alternatively, provision() may call this, and then populate the database.
Notes | This will wipe the Sam Database! | |
This function always removes the local SAM LDB file. The erase parameter controls whether to erase the existing data, which may not be stored locally but in LDAP. |
Parameters | secretsdb | Ldb Handle to the secrets database |
machinepass | Machine password |
Parameters | path | Path to the secrets database. |
session_info | Session info. | |
credentials | Credentials | |
lp | Loadparm context | |
Returns | LDB handle for the created secrets database | |
Note |
|
Parameters | path | Path to the privileges database. |
session_info | Session info. | |
credentials | Credentials | |
lp | Loadparm context | |
Returns | LDB handle for the created secrets database |
Parameters | path | Path to the registry database |
session_info | Session information | |
credentials | Credentials | |
lp | Loadparm context |
Parameters | path | path to the idmap database |
session_info | Session information | |
credentials | Credentials | |
lp | Loadparm context |
Parameters | sysvolpath | Path to the sysvol folder |
dnsdomain | DNS name of the AD domain | |
guid | The GUID of the policy | |
Returns | A string with the complete path to the policy folder |
Parameters | sysvolpath | Physical path for the sysvol folder |
dnsdomain | DNS domain name of the AD domain | |
policyguid | GUID of the default domain policy | |
policyguid_dc | GUID of the default domain controler policy |
Note | This will wipe the main SAM database file! |
Parameters | sysvol | Physical path for the sysvol folder |
dnsdomain | The DNS name of the domain | |
domainsid | The SID of the domain | |
domaindn | The DN of the domain (ie. DC=...) | |
samdb | An LDB object on the SAM db | |
lp | an LP object |
Parameters | samdb | An LDB object on the SAM db |
netlogon | Physical path for the netlogon folder | |
sysvol | Physical path for the sysvol folder | |
gid | The GID of the "Domain adminstrators" group | |
domainsid | The SID of the domain | |
dnsdomain | The DNS name of the domain | |
domaindn | The DN of the domain (ie. DC=...) |
Parameters | role | Server role |
Returns | Sanitized server role (one of "member server", "domain controller", "standalone") | |
Raises | ValueError | If the role can not be interpreted |
Note | caution, this wipes all existing data! |