156. NisServer

NIS Server, input and output functions.

156.1. Summary of Module Globals

List of Global Functions

  • Client - Calls NIS client configuration writing

  • EnsureDirectory - Ensures that the domain directory exists.

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

  • GetAllMaps - All tables that ypserv Makefile knows about

  • GetModified - Functions which returns if the settings were modified

  • GetSaveList - Returns a list of what to save

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

  • Read - Read all NIS server settings.

  • Remove - Removes file or directory and log errors

  • SaveSecurenets - Save securenets list

  • SaveSlaves - Save list of slaves by calling appropriate any agent

  • SaveVariables - Saves config variables according to workflow

  • SetModified - Function sets internal variable, which indicates, that any settings were modified, to "true"

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

  • Write - Write all NIS server settings

  • YPDaemons - Starts or stop daemons

  • YPGetMaps - Gets the YP maps from master for slave

  • YPMake - Creates initial database

  • addError - Adds an error to error_msg

  • addErrorDetail - Adds an error to error_details

  • getMaster - Gets the master server (name or IP?) from any of this server's maps

  • isYPMaster -

  • isYPServerInstalled -

List of Global Variables

  • dhcp_changes_domain - If DHCP client could change domain name (#28727)

  • domain - The domain we are serving. (for simplicity, we assume a single domain) US ".etc.defaultdomain"

  • maps - Maps to be served

  • merge_passwd - Merge passwd and shadow to one map? Makefile: string true|false

  • mingid - Minimal GID to include in the user maps

  • minuid - Minimal UID to include in the user maps

  • modified - Data was modified?

  • nisclient_local - NIS client is configured localy (with current machine as server)

  • nopush - Don't push the changes to slave servers. (useful if there aren't any) Makefile: string true|false

  • old_domainname - For warning if the domain was changed. TODO delegate to the client module?

  • pwd_chfn - YPPWD_CHFN - allow changing the full name?

  • pwd_chsh - YPPWD_CHSH - allow changing the login shell?

  • pwd_srcdir - YPPWD_SRCDIR - source directory for passwd data

  • required_packages - Packages to be installed for this module to operate

  • securenets -

  • start_ypbind - Start also the client? (only when client is configured locally)

  • start_yppasswdd - Start also the password daemon?

  • start_ypxfrd - Start also the map transfer daemon?

  • ui_master_ip - If we are a slave, where is the master? (it may actually be a hostname, TODO solve like in the client using nsswitch)

  • ui_what - What kind of server to run: `master, `slave, `none

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

  • ypservers - Slave servers

156.2. Global Functions

156.2.1. Client

Calls NIS client configuration writing

Return value

  • void

156.2.2. EnsureDirectory

Ensures that the domain directory exists.

Function parameters

  • string directory

Return value

  • boolean - false if not and cannot be created

156.2.3. Export

Dump the nisServer settings to a single map (For use by autoinstallation.)

Return value

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

156.2.4. GetAllMaps

All tables that ypserv Makefile knows about

Return value

  • list<string>

156.2.5. GetModified

Functions which returns if the settings were modified

Return value

  • boolean - settings were modified

156.2.6. GetSaveList

Returns a list of what to save

Function parameters

  • symbol workflow

Return value

  • list<map> - a list of maps: <pre>$[ "save_label": ..., "progress_label": ..., "function": @see CallFunction01 ]</pre>

156.2.7. Import

Get all nisServer settings from the first parameter (For use by autoinstallation.)

Function parameters

  • map settings

Return value

  • boolean - True on success

156.2.8. Read

Read all NIS server settings.

Return value

  • boolean - true on success

156.2.9. Remove

Removes file or directory and log errors

Function parameters

  • any file

Return value

  • void

156.2.10. SaveSecurenets

Save securenets list

Return value

  • void

156.2.11. SaveSlaves

Save list of slaves by calling appropriate any agent

Return value

  • void

156.2.12. SaveVariables

Saves config variables according to workflow

Function parameters

  • any which

Return value

  • void

156.2.13. SetModified

Function sets internal variable, which indicates, that any settings were modified, to "true"

Return value

  • void

156.2.14. Summary

Create a textual summary and a list of unconfigured cards

Return value

  • list - summary of the current configuration

156.2.15. Write

Write all NIS server settings

Return value

  • boolean - true on success

156.2.16. YPDaemons

Starts or stop daemons

Function parameters

  • any workflow

Return value

  • void

156.2.17. YPGetMaps

Gets the YP maps from master for slave

Return value

  • void

156.2.18. YPMake

Creates initial database

Return value

  • void

156.2.19. addError

Adds an error to error_msg

Function parameters

  • string s

Return value

  • void

156.2.20. addErrorDetail

Adds an error to error_details

Function parameters

  • string s

Return value

  • void

156.2.21. getMaster

Gets the master server (name or IP?) from any of this server's maps

Return value

  • string - nil if no map is found or it has no YP_MASTER_NAME

156.2.22. isYPMaster

Return value

  • boolean - Determines if the current host is YP master or not

156.2.23. isYPServerInstalled

Return value

  • boolean - Checks if the YP server software is installed by querying RPM for ypserv

156.3. Global Variables

156.3.1. dhcp_changes_domain

If DHCP client could change domain name (#28727)

156.3.2. domain

The domain we are serving. (for simplicity, we assume a single domain) US ".etc.defaultdomain"

156.3.3. maps

Maps to be served

156.3.4. merge_passwd

Merge passwd and shadow to one map? Makefile: string true|false

156.3.5. mingid

Minimal GID to include in the user maps

156.3.6. minuid

Minimal UID to include in the user maps

156.3.7. modified

Data was modified?

156.3.8. nisclient_local

NIS client is configured localy (with current machine as server)

156.3.9. nopush

Don't push the changes to slave servers. (useful if there aren't any) Makefile: string true|false

156.3.10. old_domainname

For warning if the domain was changed. TODO delegate to the client module?

156.3.11. pwd_chfn

YPPWD_CHFN - allow changing the full name?

156.3.12. pwd_chsh

YPPWD_CHSH - allow changing the login shell?

156.3.13. pwd_srcdir

YPPWD_SRCDIR - source directory for passwd data

156.3.14. required_packages

Packages to be installed for this module to operate

156.3.15. securenets

securenet
  network: string
  netmask: string
* or
  hash: "#"
  (optional) comment: string

156.3.16. start_ypbind

Start also the client? (only when client is configured locally)

156.3.17. start_yppasswdd

Start also the password daemon?

156.3.18. start_ypxfrd

Start also the map transfer daemon?

156.3.19. ui_master_ip

If we are a slave, where is the master? (it may actually be a hostname, TODO solve like in the client using nsswitch)

156.3.20. ui_what

What kind of server to run: `master, `slave, `none

156.3.21. write_only

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

156.3.22. ypservers

Slave servers

156.4. Module Requirements

156.4.1. Module Imports

  • DNS
  • FileUtils
  • NetworkInterfaces
  • Nis
  • Nis
  • Progress
  • Service
  • SuSEFirewall
  • Summary

156.4.2. Module Includes