155. Nis

NIS client configuration data, I/O functions.

155.1. Summary of Module Globals

List of Global Functions

  • AutoPackages - Return needed packages and packages to be removed during autoinstallation.

  • BrItem - Makes an item for the short summary. I guess the users module wants to avoid paragraph breaks.

  • DomainChanged - If the domain has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.

  • Export - Dump the NIS settings to a map, for autoinstallation use.

  • Fake - Make up data for screnshots. To be used instead of @ref Read .

  • GetDomain -

  • GetModified - Functions which returns if the settings were modified

  • GetServers -

  • Import - Get all the NIS configuration from a map. When called by nis_auto (preparing autoinstallation data) the map may be empty.

  • ProbePackages - Detect which packages have to be installed and return a descriptive string for a plain text pop-up.

  • Read - Reads NIS settings from the SCR

  • Set - Set module data

  • SetDomain - Set the NIS domain.

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

  • SetServers - Set the servers from a string

  • ShortSummary - Create a short textual summary with configuration abstract It is called by "authentication/user sources" dialog in yast2-users

  • Summary -

  • Touch - A convenient shortcut for setting touched.

  • UsersByLdap - Used in the UI when NIS is turned on.

  • Write - Saves NIS configuration.

  • WriteNssConf - Configures the name service switch for the user databases according to chosen settings

  • WriteOnly - Only write new configuration w/o starting any scripts

  • check_address_nis - Check syntax of a network address (ip4 or name), names only if nsswitch.conf does not have hosts: nis

  • check_nisdomainname - Check syntax of a NIS domain name

  • valid_address_nis - Describe a valid address - ip4 or name, names only if nsswitch.conf does not have hosts: nis

  • valid_nisdomainname -

List of Global Variables

  • YpbindErrors - Output of "rcypbind start", if there was an error. Read only. This is currently used only in nis-server for its more advanced error reporting. (Bug 14706)

  • _autofs_allowed - If no, automounter will not be affected.

  • _start_autofs - Start automounter and import the settings from NIS. (Bug 6092)

  • broken_server - You should set this to "yes" if you have a NIS server in your network, which binds only to high ports over 1024. Since this is a security risk, you should consider to replace the NIS server with another implementation.

  • default_broadcast - Broadcast for the default domain? (New in ypbind-1.12)

  • dhcp_possible - Is the domain AND yp.conf served by DHCP? This is independent of dhcp_wanted: dhcpcd*.pid exists and dhcpcd*.info contains NISSERVERS and NISDOMAIN. It is used to warn the user if he wants to turn DHCP on but the config is not provided.

  • dhcp_restart - If dhcp_wanted changes, we need to restart the DHCP client

  • dhcp_wanted - Whether sysconfig/network/dhcp says to get the domain AND yp.conf by DHCP. It will be turned off if dhcp_possible is off (the user can override it)

  • dhcpcd_running - #35654: if the server is running and sysconfig wants NIS data, it's ok to FitIntoSingle

  • global_broadcast - If this option is set, ypbind will ignore /etc/yp.conf and use a broadcast call to find a NIS server in the local subnet. You should avoid to use this, it is a big security risk.

  • install_packages - Read only, set by ProbePackages. Use as an argument to DoInstallAndRemove

  • local_only - If this option is set, ypbind will only bind to the loopback interface and remote hosts cannot query it.

  • multidomain_broadcast - Servers for a multiple-domain configuration. Whether a broadcast will be done if the servers don't respond. Keys are domains, values are booleans. The domains must be the same as for multidomain_servers

  • multidomain_servers - Servers for a multiple-domain configuration. Keys are domains, values are lists of servers (strings). The domains must be the same as for multidomain_broadcast

  • options - Extra options for ypbind. Here you can add options like "-ypset", "-ypsetme", "-p port" or "-no-ping".

  • required_packages - Required packages for this module to operate

  • servers - IP addresses of NIS servers.

  • start - Should ypbind be started at boot? If not, other settings are not touched.

  • touched - Has the configuration been changed? Can be used as an argument to Popup::ReallyAbort

155.2. Global Functions

155.2.1. AutoPackages

Return needed packages and packages to be removed during autoinstallation.

Return value

  • map - of lists.

155.2.2. BrItem

Makes an item for the short summary. I guess the users module wants to avoid paragraph breaks.

Function parameters

  • string title

  • string value

Return value

  • string - [b]title[/b]: value[br]

155.2.3. DomainChanged

If the domain has changed from a nonempty one, it may only be changed at boot time. Use this to warn the user.

Return value

  • boolean - whether changed by SetDomain

155.2.4. Export

Dump the NIS settings to a map, for autoinstallation use.

Return value

  • map - $["start":, "servers":[...], "domain":]

155.2.5. Fake

Make up data for screnshots. To be used instead of @ref Read .

Return value

  • void

155.2.6. GetDomain

Return value

  • string - Get the NIS domain.

155.2.7. GetModified

Functions which returns if the settings were modified

Return value

  • boolean - settings were modified

155.2.8. GetServers

Return value

  • string - Access the servers as a string

155.2.9. Import

Get all the NIS configuration from a map. When called by nis_auto (preparing autoinstallation data) the map may be empty.

Function parameters

  • map settings

Return value

  • boolean - success

155.2.10. ProbePackages

Detect which packages have to be installed and return a descriptive string for a plain text pop-up.

Return value

  • string - "" or "Foo will be installed.\nBar will be installed.\n"

155.2.11. Read

Reads NIS settings from the SCR

Return value

  • boolean - success

155.2.12. Set

Set module data

Function parameters

  • map settings

Return value

  • void

155.2.13. SetDomain

Set the NIS domain.

Function parameters

  • string new_domain

Return value

  • void

155.2.14. SetModified

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

Return value

  • void

155.2.15. SetServers

Set the servers from a string

Function parameters

  • string servers_s

Return value

  • void

155.2.16. ShortSummary

Create a short textual summary with configuration abstract It is called by "authentication/user sources" dialog in yast2-users

Return value

  • string - summary of the current configuration

155.2.17. Summary

Return value

  • string - Html formatted configuration summary

155.2.18. Touch

A convenient shortcut for setting touched.

Function parameters

  • boolean really

Return value

  • void

Example 39. 

 Nis::Touch (Nis::var != ui_var);


155.2.19. UsersByLdap

Used in the UI when NIS is turned on.

Return value

  • boolean

155.2.20. Write

Saves NIS configuration.

Return value

  • boolean - true on success

155.2.21. WriteNssConf

Configures the name service switch for the user databases according to chosen settings

Return value

  • boolean - success?

155.2.22. WriteOnly

Only write new configuration w/o starting any scripts

Return value

  • boolean - true on success

155.2.23. check_address_nis

Check syntax of a network address (ip4 or name), names only if nsswitch.conf does not have hosts: nis

Function parameters

  • string a

Return value

  • boolean - true if correct

155.2.24. check_nisdomainname

Check syntax of a NIS domain name

Function parameters

  • string domain

Return value

  • boolean - true if correct

155.2.25. valid_address_nis

Describe a valid address - ip4 or name, names only if nsswitch.conf does not have hosts: nis

Return value

  • string - a description

155.2.26. valid_nisdomainname

Return value

  • string - describe a valid NIS domain name

155.3. Global Variables

155.3.1. YpbindErrors

Output of "rcypbind start", if there was an error. Read only. This is currently used only in nis-server for its more advanced error reporting. (Bug 14706)

155.3.2. _autofs_allowed

If no, automounter will not be affected.

155.3.3. _start_autofs

Start automounter and import the settings from NIS. (Bug 6092)

155.3.4. broken_server

You should set this to "yes" if you have a NIS server in your network, which binds only to high ports over 1024. Since this is a security risk, you should consider to replace the NIS server with another implementation.

155.3.5. default_broadcast

Broadcast for the default domain? (New in ypbind-1.12)

155.3.6. dhcp_possible

Is the domain AND yp.conf served by DHCP? This is independent of dhcp_wanted: dhcpcd*.pid exists and dhcpcd*.info contains NISSERVERS and NISDOMAIN. It is used to warn the user if he wants to turn DHCP on but the config is not provided.

155.3.7. dhcp_restart

If dhcp_wanted changes, we need to restart the DHCP client

155.3.8. dhcp_wanted

Whether sysconfig/network/dhcp says to get the domain AND yp.conf by DHCP. It will be turned off if dhcp_possible is off (the user can override it)

155.3.9. dhcpcd_running

#35654: if the server is running and sysconfig wants NIS data, it's ok to FitIntoSingle

155.3.10. global_broadcast

If this option is set, ypbind will ignore /etc/yp.conf and use a broadcast call to find a NIS server in the local subnet. You should avoid to use this, it is a big security risk.

155.3.11. install_packages

Read only, set by ProbePackages. Use as an argument to DoInstallAndRemove

155.3.12. local_only

If this option is set, ypbind will only bind to the loopback interface and remote hosts cannot query it.

155.3.13. multidomain_broadcast

Servers for a multiple-domain configuration. Whether a broadcast will be done if the servers don't respond. Keys are domains, values are booleans. The domains must be the same as for multidomain_servers

155.3.14. multidomain_servers

Servers for a multiple-domain configuration. Keys are domains, values are lists of servers (strings). The domains must be the same as for multidomain_broadcast

155.3.15. options

Extra options for ypbind. Here you can add options like "-ypset", "-ypsetme", "-p port" or "-no-ping".

155.3.16. required_packages

Required packages for this module to operate

155.3.17. servers

IP addresses of NIS servers.

155.3.18. start

Should ypbind be started at boot? If not, other settings are not touched.

155.3.19. touched

Has the configuration been changed? Can be used as an argument to Popup::ReallyAbort

155.4. Module Requirements

155.4.1. Module Imports

  • Address
  • Autologin
  • IP
  • Message
  • Nsswitch
  • Package
  • Progress
  • Report
  • Service
  • SuSEFirewall
  • Summary
  • Wizard

155.4.2. Module Includes