YaST2 Developers Documentation: Configuration of samba-server



functions
files
intro

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

Info:

Abort function return boolean return true if abort

global Abort () -> boolean

Abort function

Return value:
blah blah lahjk

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.

global role -> symbol

role of the server: `standalone, `bdc, `pdc

local service -> boolean

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

Info:

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:
true if modified

global Read () -> boolean

Read all samba-server settings

Return value:
true on success

global Write () -> boolean

Write all samba-server settings

Return value:
true on success

global WriteSettings () -> boolean

Write all samba-server settings

Return value:
true on success

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:
True on success

global Export () -> map

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:
on should be enabled?
Return value:
true on success

global setDescription (string description) -> void

Set the server description

Parameters:
description a new description

Info:

Get the server description string.

Return value:
the string or nil, if not set

global enablePrinters (boolean on) -> void

Turn on/off [printers]

Parameters:
on should be enabled?

global enableAllSystemPrinters () -> void

Turn on all system printers. Will enable [printers] as well.

global enableHomes (boolean on) -> void

Turn on/off [homes]

Parameters:
on should be enabled?

global enableNetlogon (boolean on) -> void

Turn on/off [netlogon] and domain logons

Parameters:
on should be enabled?

global setAsPDC () -> boolean

Configure as PDC. Does NOT set role.

Return value:
true on success

global setAsBDC () -> boolean

Configure as BDC. Does NOT set role.

Return value:
true on success

global setAsStandalone () -> boolean

Configure as a standalone server (no domain logons) Does NOT set role.

Return value:
true on success

global setRole (symbol new_role) -> boolean

Configure for a given role. Calls setAsPDC, setAsBDC and setAsStandalone Setup role variable.

Parameters:
new_role the new role
Return value:
true on success

global setLDAPAdminDN (string dn) -> void

Set the LDAP server administration DN.

Parameters:
dn administration dn

global setLDAPSuffix (string suffix) -> void

Set the LDAP server suffix

Parameters:
suffix suffix dn

global ReloadSettings () -> boolean

Reload settings for smbd and nmbd. Calls the initscripts with restart to switch backend if necessary.

Return value:
true on success

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:
true on success

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:
true if yes

global removeShare (string name) -> boolean

Removes the share's configuration.

Parameters:
name name of a share
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:
role symbol of the role
Return value:
localized role name

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

YaST2 Developers Documentation