Configuration of samba-server |
modules/Samba-server.ycp |
Data for configuration of samba-server, input and output functions. |
|
|
Representation of the configuration of samba-server.
Input and output routines.
Imports
- DNS
- Directory
- Hostname
- Ldap
- Ldap
- NetworkDevices
- Progress
- Report
- Report
- Report
- Require
- Samba
- SambaSecrets
- SambaServerPassdb
- Service
- Spooler
- Summary
- URL
- YaPI::LdapServer
Includes
- samba-client/routines.ycp
- samba-server/routines.ycp
Global Variables
Global Functions
Local Variables
|
|
|
global required_packages -> list<string>
|
|
list of required packages
Abort function
return boolean return true if abort
global Abort () -> boolean
|
|
Abort function
- Return value:
global modified -> boolean
|
|
Data was modified?
global write_only -> boolean
|
|
Write only, used during autoinstallation.
Don't run services and SuSEconfig, it's all done at one place.
role of the server: `standalone, `bdc, `pdc
Is service enabled?
global domain_master -> string
|
|
domain master
global preferred_master -> string
|
|
preferred master
global add_machine_script -> string
|
|
add machine script
global share_homes -> boolean
|
|
Should be [homes] section present
global share_printers -> boolean
|
|
Should be [printers] section present
global load_printers -> boolean
|
|
load printers
global LDAP_admin_dn -> string
|
|
LDAP admin dn
global LDAP_suffix -> string
|
|
LDAP suffix
global shares -> map<string, map<string,any> >
|
|
all shares
global removed_shares_options -> map<string, list<string> >
|
|
removed options from shares
global printer_status -> map<string, boolean>
|
|
status of all available printers
global role2name -> map<symbol, string>
|
|
mapping of name to role
global name2role -> map<string, symbol>
|
|
mapping of role2name
local removed_shares -> map<string, map<string,any> >
|
|
list of shares to be removed
local system_printers -> list<string>
|
|
list of all system printers
Just ensure a translation do exist
local default_printers -> map<string, any>
|
|
default settings for [printers]
local default_printer_share -> map<string, any>
|
|
default settings for a single printer share
local default_homes -> map<string, any>
|
|
default settings for [homes]
global Modified () -> boolean
|
|
Data was modified?
- Return value:
global Read () -> boolean
|
|
Read all samba-server settings
- Return value:
global Write () -> boolean
|
|
Write all samba-server settings
- Return value:
global WriteSettings () -> boolean
|
|
Write all samba-server settings
- Return value:
global Import (map settings) -> boolean
|
|
Get all samba-server settings from the first parameter
(For use by autoinstallation.)
- Parameters:
settings |
The YCP structure to be imported. |
- Return value:
Dump the samba-server settings to a single map
(For use by autoinstallation.)
- Return value:
|
Dumped settings (later acceptable by Import ()) |
global Summary () -> string
|
|
Create a textual summary and a list of unconfigured options
- Return value:
|
summary of the current configuration |
global enableServer (boolean on) -> boolean
|
|
Turn on/off SAMBA server services (smb and nmb).
- Parameters:
- Return value:
global setDescription (string description) -> void
|
|
Set the server description
- Parameters:
description |
a new description |
Get the server description string.
- Return value:
|
the string or nil, if not set |
global enablePrinters (boolean on) -> void
|
|
Turn on/off [printers]
- Parameters:
global enableAllSystemPrinters () -> void
|
|
Turn on all system printers. Will enable [printers] as well.
global enableHomes (boolean on) -> void
|
|
Turn on/off [homes]
- Parameters:
global enableNetlogon (boolean on) -> void
|
|
Turn on/off [netlogon] and domain logons
- Parameters:
global setAsPDC () -> boolean
|
|
Configure as PDC. Does NOT set role.
- Return value:
global setAsBDC () -> boolean
|
|
Configure as BDC. Does NOT set role.
- Return value:
global setAsStandalone () -> boolean
|
|
Configure as a standalone server (no domain logons) Does NOT set role.
- Return value:
global setRole (symbol new_role) -> boolean
|
|
Configure for a given role. Calls setAsPDC, setAsBDC and setAsStandalone
Setup role variable.
- Parameters:
- Return value:
global setLDAPAdminDN (string dn) -> void
|
|
Set the LDAP server administration DN.
- Parameters:
global setLDAPSuffix (string suffix) -> void
|
|
Set the LDAP server suffix
- Parameters:
global ReloadSettings () -> boolean
|
|
Reload settings for smbd and nmbd. Calls the initscripts with restart
to switch backend if necessary.
- Return value:
global ReadLDAPSettings () -> void
|
|
Read LDAP-related settings.
global WriteLDAPSettings () -> void
|
|
Write LDAP-related settings.
global setLDAPAdminPassword (string password) -> string
|
|
Setup LDAP admin password using smbpasswd -w. Switches backend to LDAP first.
- Parameters:
password |
the new password |
- Return value:
|
nil for success, error message otherwise |
global testLDAPS (string server, string search_base) -> boolean
|
|
Test LDAPS connection to the server using ldapsearch.
- Parameters:
server |
the LDAPS server |
search_base |
base to be tested
|
- Return value:
global disableAllPrinters () -> void
|
|
Disable all printers.
global enablePrinterNames (list<string> enable_names) -> void
|
|
Enable printers in a list. If possible, use [printers] section
- Parameters:
enable_names |
list of printer names to be enabled |
global SystemPrintersEnabled () -> boolean
|
|
Are some of the system printers enabled?
- Return value:
global removeShare (string name) -> boolean
|
|
Removes the share's configuration.
- Parameters:
- Return value:
|
true on success, false if the share does not exist |
global addShare (string name, map<string,any> options) -> boolean
|
|
Adds a new share.
- Parameters:
name |
name of a share |
options |
configuration of the share |
- Return value:
|
true on success, false if the share already exists |
global enableShare (string name, boolean on) -> boolean
|
|
Enable/disable a share, does not remove its configuration.
- Parameters:
name |
name of a share |
on |
should be enabled? |
- Return value:
|
true on success, false if the share does not exist |
global updateShare (string name, map<string,any> options) -> boolean
|
|
Update the share configuration,
- Parameters:
name |
name of a share |
options |
new options of the share |
- Return value:
|
true on success, false if the share does not exist |
global roleName (symbol role) -> string
|
|
Map role to a localized text.
- Parameters:
- Return value:
global DetermineRole () -> symbol
|
|
Find out the role of a server using the read settings
- Return value:
|
the role it appears to be |
global AutoPackages () -> map<string,list<string> >
|
|
Return required packages for auto-installation
- Return value:
|
of packages to be installed and to be removed |
|