YaST2 Developers Documentation: Configuration of NIS client

Configuration of NIS client

modules/Nis.ycp
NIS client configuration data, I/O functions.
  • Jan Holesovsky
  • Dan Vesely
  • Martin Vidner

This module has an unstable interface.

Imports

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

Global Variables

Global Functions

Local Variables

Local Functions

global SetModified () -> void

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

global GetModified () -> boolean

Functions which returns if the settings were modified

Return value:
settings were modified
global required_packages -> list<string>

Required packages for this module to operate

global start -> boolean

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

global servers -> list <string>

IP addresses of NIS servers.

global GetServers () -> string

Return value:
Access the servers as a string
global SetServers (string servers_s) -> void

Set the servers from a string

Parameters:
servers_s a whitespace separated list
global default_broadcast -> boolean

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

global multidomain_servers -> map<string,list>

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

See
multidomain_broadcast
global multidomain_broadcast -> map<string,boolean>

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

See
multidomain_servers global_broadcast
global global_broadcast -> boolean

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.

See
multidomain_broadcast default_broadcast
global getNetconfigValues () -> void

Read Netconfig configuration

global setNetconfigValues () -> boolean

Write the netconfig configuration

global DomainChanged () -> boolean

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:
whether changed by SetDomain
global GetDomain () -> string

Return value:
Get the NIS domain.
global SetDomain (string new_domain) -> void

Set the NIS domain.

Parameters:
new_domain a new domain
global dhcpcd_running -> boolean

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

global dhcp_restart -> boolean

If dhcp_wanted changes, we need to restart the DHCP client

global local_only -> boolean

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

global broken_server -> boolean

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.

global options -> string

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

global _autofs_allowed -> boolean

If no, automounter will not be affected.

global _start_autofs -> boolean

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

global YpbindErrors -> string

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)

global check_nisdomainname (string domain) -> boolean

Check syntax of a NIS domain name

Parameters:
domain a domain name
Return value:
true if correct
global valid_nisdomainname () -> string

Return value:
describe a valid NIS domain name
local hosts_by_nis -> boolean

If the hostname resolution is done over NIS, names cannot be used to specify servers.

local users_by_ldap -> boolean

Using NIS and LDAP simultaneously is not supported (#36981).

global UsersByLdap () -> boolean

Used in the UI when NIS is turned on.

global valid_address_nis () -> string

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

Return value:
a description
global check_address_nis (string a) -> boolean

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

Parameters:
a an address
Return value:
true if correct
global touched -> boolean

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

global Touch (boolean really) -> void

A convenient shortcut for setting touched.

Parameters:
really if true, set Nis::touched
Example
 Nis::Touch (Nis::var != ui_var);
global install_packages -> list<string>

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

global ProbePackages () -> string

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

Return value:
"" or "Foo will be installed.\nBar will be installed.\n"
global Set (map settings) -> void

Set module data

Parameters:
settings
global Import (map settings) -> boolean

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

Parameters:
settings $["start": "domain": "servers":[...] ]
Return value:
success
global Export () -> map

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

Return value:
$["start":, "servers":[...], "domain":]
local ListItem (string title, any value) -> string

Summarizes a list of data

Parameters:
title passed to Summary::AddHeader
value a list (of scalars, lists or maps)
Return value:
Summary-formatted description
global Summary () -> string

Return value:
Html formatted configuration summary
global BrItem (string title, string value) -> string

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

Parameters:
title
value
Return value:
[b]title[/b]: value[br]
global ShortSummary () -> string

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

Return value:
summary of the current configuration
global Read () -> boolean

Reads NIS settings from the SCR

Return value:
success
global Fake () -> void

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

local HasPlus (string file) -> boolean

Parameters:
file a pathname
Return value:
is there a nis inclusion?
local WritePlusesTo (string file, string what) -> boolean

If a file does not contain a NIS entry, add it.

Parameters:
file pathname
what a "+" line without a '\n'
Return value:
success?
local HavePlus () -> boolean

Do we need compat? Is there a plus in any of the user databases?

Return value:
true/false
local WritePluses () -> boolean

Add "+" lines to system files so that NIS entries get merged in. (Formerly this was done in SuSEconfig.ypclient)

Return value:
success?
global WriteNssConf () -> boolean

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

Return value:
success?
global WriteOnly () -> boolean

Only write new configuration w/o starting any scripts

Return value:
true on success
global Write () -> boolean

Saves NIS configuration.

Return value:
true on success
global AutoPackages () -> map

Return needed packages and packages to be removed during autoinstallation.

Return value:
of lists.