155. NisServer

NIS Server, input and output functions.

155.1. Authors

  • Martin Vidner <mvidner@suse.cz>

  • Dan Vesely <dan@suse.cz>

155.2. 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

155.3. Global Functions

155.3.1. Client

Calls NIS client configuration writing

Return value

  • void

155.3.2. EnsureDirectory

Ensures that the domain directory exists.

Function parameters

  • string directory

Return value

  • boolean - false if not and cannot be created

155.3.3. Export

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

Return value

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

155.3.4. GetAllMaps

All tables that ypserv Makefile knows about

Return value

  • list<string>

155.3.5. GetModified

Functions which returns if the settings were modified

Return value

  • boolean - settings were modified

155.3.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>

155.3.7. Import

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

Function parameters

  • map settings

Return value

  • boolean - True on success

155.3.8. Read

Read all NIS server settings.

Return value

  • boolean - true on success

155.3.9. Remove

Removes file or directory and log errors

Function parameters

  • any file

Return value

  • void

155.3.10. SaveSecurenets

Save securenets list

Return value

  • void

155.3.11. SaveSlaves

Save list of slaves by calling appropriate any agent

Return value

  • void

155.3.12. SaveVariables

Saves config variables according to workflow

Function parameters

  • any which

Return value

  • void

155.3.13. SetModified

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

Return value

  • void

155.3.14. Summary

Create a textual summary and a list of unconfigured cards

Return value

  • list - summary of the current configuration

155.3.15. Write

Write all NIS server settings

Return value

  • boolean - true on success

155.3.16. YPDaemons

Starts or stop daemons

Function parameters

  • any workflow

Return value

  • void

155.3.17. YPGetMaps

Gets the YP maps from master for slave

Return value

  • void

155.3.18. YPMake

Creates initial database

Return value

  • void

155.3.19. addError

Adds an error to error_msg

Function parameters

  • string s

Return value

  • void

155.3.20. addErrorDetail

Adds an error to error_details

Function parameters

  • string s

Return value

  • void

155.3.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

155.3.22. isYPMaster

Return value

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

155.3.23. isYPServerInstalled

Return value

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

155.4. Global Variables

155.4.1. dhcp_changes_domain

If DHCP client could change domain name (#28727)

155.4.2. domain

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

155.4.3. maps

Maps to be served

155.4.4. merge_passwd

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

155.4.5. mingid

Minimal GID to include in the user maps

155.4.6. minuid

Minimal UID to include in the user maps

155.4.7. modified

Data was modified?

155.4.8. nisclient_local

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

155.4.9. nopush

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

155.4.10. old_domainname

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

155.4.11. pwd_chfn

YPPWD_CHFN - allow changing the full name?

155.4.12. pwd_chsh

YPPWD_CHSH - allow changing the login shell?

155.4.13. pwd_srcdir

YPPWD_SRCDIR - source directory for passwd data

155.4.14. required_packages

Packages to be installed for this module to operate

155.4.15. securenets

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

155.4.16. start_ypbind

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

155.4.17. start_yppasswdd

Start also the password daemon?

155.4.18. start_ypxfrd

Start also the map transfer daemon?

155.4.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)

155.4.20. ui_what

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

155.4.21. write_only

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

155.4.22. ypservers

Slave servers

155.5. Module Requirements

155.5.1. Module Imports

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

155.5.2. Module Includes