233. Samba

Data for configuration of samba-client, input and output functions.

233.1. Authors

  • Stanislav Visnovsky <visnov@suse.cz>

233.2. Summary of Module Globals

List of Global Functions

  • AdjustSharesServices - adjust the services for sharing

  • AutoPackages - Return required packages for auto-installation

  • Export - Dump the samba-client settings to a single map (For use by autoinstallation.)

  • GetDHCP - Check if dhcp.conf is included in smb.conf

  • GetGuessAccess - check if shares guest access is allowed

  • GetHostsResolution - Read /etc/nsswitch.conf and check if WINS is used for hosts resolution

  • GetMaxShares - get number of max shares from smb.conf; 0 mean shares are not enabled

  • GetModified - Data was modified?

  • GetPAMMountVolumes - Return the list of 'volume' entries from pam_mount.conf.xml

  • GetSSHSupport - Get the current status of ssh single-sign-on support

  • GetWinbind - Get a winbind status

  • GetWinbindCaching - Get the current status of winbind caching

  • GetWorkgroup - Get a host workgroup

  • Import - Get all samba-client settings from the first parameter (For use by autoinstallation.)

  • Read - Read all samba-client settings

  • ReadMkHomeDir - Read the state of mkhomedir in /etc/pam.d/common-session (bug #143519)

  • ReadPAMMount - Read the data from /etc/security/pam_mount.conf.xml regarding mounting user's home directories

  • ReadSSHSupport - Read the current status of ssh single-sign-on support (fate #303415)

  • ReadSharesSetting - Read user shares settings

  • SetDHCP - Set the support of DHCP (include dhcp.conf in smb.conf)

  • SetGuessAccess - Set the new value for guest access (#144787)

  • SetHostsResolution - Set the new value for hosts resolution

  • SetMkHomeDir - Set the new value of mkhomedir

  • SetPAMMountVolumes - Set the new list of 'volume' entries

  • SetSSHSupport - Set the new value for sh single-sign-on support

  • SetShares - set the new values for user shares

  • SetStartFAM - update the information if FAM should be started

  • SetWinbind - Set a windind status

  • SetWinbindCaching - Set the new value for winbind caching (see bug #143927)

  • SetWorkgroup - Set a host workgroup

  • ShortSummary - Create shorter textual summary and a list of unconfigured options

  • Summary - Create a textual summary and a list of unconfigured options

  • UpdatedArchPackages - Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter

  • Write - Write all samba-client settings

  • WriteHostsResolution - Write /etc/nsswitch.conf if modified

  • WriteMkHomeDir - Write the new value of pam_mkhomedir to /etc/pam.d/common-session

  • WritePAMMount - Write the changes to /etc/security/pam_mount.conf.xml

  • WriteSSHSupport - Write the new value for sh single-sign-on support (fate #303415)

  • WriteShares - create the shares directory with correct rights

List of Global Variables

  • globals_configured - Are globals already configured (for AutoYaST)

  • mkhomedir - if pam_mkhomedir is set in /etc/pam.d/commond-session

  • modified - Data was modified?

  • password_data - map with user name and password (used for autoinstallation only)

  • start_fam - If FAM should be started

  • winbind_enabled - Should be winbind enabled?

  • write_only - Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.

233.3. Global Functions

233.3.1. AdjustSharesServices

adjust the services for sharing

Function parameters

  • boolean write_only

Return value

  • boolean

233.3.2. AutoPackages

Return required packages for auto-installation

Return value

  • map - of packages to be installed and to be removed

233.3.3. Export

Dump the samba-client settings to a single map (For use by autoinstallation.)

Return value

  • map - Dumped settings (later acceptable by Import ())

233.3.4. GetDHCP

Check if dhcp.conf is included in smb.conf

Return value

  • boolean

233.3.5. GetGuessAccess

check if shares guest access is allowed

Return value

  • boolean

233.3.6. GetHostsResolution

Read /etc/nsswitch.conf and check if WINS is used for hosts resolution

Return value

  • boolean

233.3.7. GetMaxShares

get number of max shares from smb.conf; 0 mean shares are not enabled

Return value

  • integer

233.3.8. GetModified

Data was modified?

Return value

  • boolean - true if modified

233.3.9. GetPAMMountVolumes

Return the list of 'volume' entries from pam_mount.conf.xml

Return value

  • list<map>

233.3.10. GetSSHSupport

Get the current status of ssh single-sign-on support

Return value

  • boolean

233.3.11. GetWinbind

Get a winbind status

Return value

  • boolean - booleand a winbind status

233.3.12. GetWinbindCaching

Get the current status of winbind caching

Return value

  • boolean

233.3.13. GetWorkgroup

Get a host workgroup

Return value

  • string - a new workgroup

233.3.14. Import

Get all samba-client settings from the first parameter (For use by autoinstallation.)

Function parameters

  • map settings

Return value

  • boolean - True on success

233.3.15. Read

Read all samba-client settings

Return value

  • boolean - true on success

233.3.16. ReadMkHomeDir

Read the state of mkhomedir in /etc/pam.d/common-session (bug #143519)

Return value

  • boolean

233.3.17. ReadPAMMount

Read the data from /etc/security/pam_mount.conf.xml regarding mounting user's home directories

Return value

  • boolean

233.3.18. ReadSSHSupport

Read the current status of ssh single-sign-on support (fate #303415)

Return value

  • boolean

233.3.19. ReadSharesSetting

Read user shares settings

Return value

  • boolean

233.3.20. SetDHCP

Set the support of DHCP (include dhcp.conf in smb.conf)

Function parameters

  • boolean new

Return value

  • boolean - if status was changed

233.3.21. SetGuessAccess

Set the new value for guest access (#144787)

Function parameters

  • boolean guest

Return value

  • boolean

233.3.22. SetHostsResolution

Set the new value for hosts resolution

Function parameters

  • boolean resolve

Return value

  • boolean

233.3.23. SetMkHomeDir

Set the new value of mkhomedir

Function parameters

  • boolean new_value

Return value

  • boolean

233.3.24. SetPAMMountVolumes

Set the new list of 'volume' entries

Function parameters

  • list<map> new_volumes

Return value

  • void

233.3.25. SetSSHSupport

Set the new value for sh single-sign-on support

Function parameters

  • boolean enable

Return value

  • boolean

233.3.26. SetShares

set the new values for user shares

Function parameters

  • integer max

  • string group

Return value

  • boolean

233.3.27. SetStartFAM

update the information if FAM should be started

Function parameters

  • boolean fam

Return value

  • boolean - current fam status

233.3.28. SetWinbind

Set a windind status

Function parameters

  • boolean status

Return value

  • void

233.3.29. SetWinbindCaching

Set the new value for winbind caching (see bug #143927)

Function parameters

  • boolean enable

Return value

  • boolean

233.3.30. SetWorkgroup

Set a host workgroup

Function parameters

  • string group

Return value

  • void

233.3.31. ShortSummary

Create shorter textual summary and a list of unconfigured options

Return value

  • string - summary of the current configuration

233.3.32. Summary

Create a textual summary and a list of unconfigured options

Return value

  • string - summary of the current configuration

233.3.33. UpdatedArchPackages

Return list of architecture specific packages (derived from package list given as parameter) merged with the packages in parameter

Function parameters

  • list<string> packages

Return value

  • list<string>

233.3.34. Write

Write all samba-client settings

Function parameters

  • boolean write_only

Return value

  • boolean - true on success

233.3.35. WriteHostsResolution

Write /etc/nsswitch.conf if modified

Return value

  • boolean

233.3.36. WriteMkHomeDir

Write the new value of pam_mkhomedir to /etc/pam.d/common-session

Function parameters

  • boolean enabled

Return value

  • boolean

233.3.37. WritePAMMount

Write the changes to /etc/security/pam_mount.conf.xml

Return value

  • boolean

233.3.38. WriteSSHSupport

Write the new value for sh single-sign-on support (fate #303415)

Function parameters

  • boolean enable

Return value

  • boolean

233.3.39. WriteShares

create the shares directory with correct rights

Return value

  • boolean

233.4. Global Variables

233.4.1. globals_configured

Are globals already configured (for AutoYaST)

233.4.2. mkhomedir

if pam_mkhomedir is set in /etc/pam.d/commond-session

233.4.3. modified

Data was modified?

233.4.4. password_data

map with user name and password (used for autoinstallation only)

233.4.5. start_fam

If FAM should be started

233.4.6. winbind_enabled

Should be winbind enabled?

233.4.7. write_only

Write only, used during autoinstallation. Don't run services and SuSEconfig, it's all done at one place.

233.5. Module Requirements

233.5.1. Module Imports

  • Arch
  • Autologin
  • FileUtils
  • Mode
  • NetworkConfig
  • Nsswitch
  • Package
  • Pam
  • Progress
  • Report
  • SambaAD
  • SambaConfig
  • SambaNetJoin
  • SambaNmbLookup
  • SambaWinbind
  • Service
  • String
  • SuSEFirewall
  • Summary

233.5.2. Module Includes