YaST2 Developers Documentation: Configuration of NIS server

Configuration of NIS server

modules/NisServer.ycp
NIS Server, input and output functions.
  • Martin Vidner
  • Dan Vesely

This module has an unstable interface.

Representation of the configuration of nisServer. Input and output routines.

Imports

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

Structures

Global Variables

Global Functions

Local Functions

global modified -> boolean

Data was modified?

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 write_only -> boolean

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

global domain -> string

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

global old_domainname -> string

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

global ui_what -> symbol

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

global ui_master_ip -> string

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

global maps -> list<string>

Maps to be served

global minuid -> integer

Minimal UID to include in the user maps

global mingid -> integer

Minimal GID to include in the user maps

global merge_passwd -> boolean

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

global nopush -> boolean

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

global ypservers -> list<string>

Slave servers

global securenets -> list<map>

Structure securenet

  network: string
  netmask: string
* or
  hash: "#"
  (optional) comment: string
global start_ypbind -> boolean

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

global nisclient_local -> boolean

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

global start_ypxfrd -> boolean

Start also the map transfer daemon?

global start_yppasswdd -> boolean

Start also the password daemon?

global pwd_srcdir -> string

YPPWD_SRCDIR - source directory for passwd data

global pwd_chfn -> boolean

YPPWD_CHFN - allow changing the full name?

global pwd_chsh -> boolean

YPPWD_CHSH - allow changing the login shell?

global dhcp_changes_domain -> boolean

If DHCP client could change domain name (#28727)

global required_packages -> list<string>

Packages to be installed for this module to operate

global GetAllMaps () -> list<string>

All tables that ypserv Makefile knows about

global Read () -> boolean

Read all NIS server settings.

Return value:
true on success
global getMaster () -> string

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

Return value:
nil if no map is found or it has no YP_MASTER_NAME
global isYPMaster () -> boolean

Return value:
Determines if the current host is YP master or not
global isYPServerInstalled () -> boolean

Return value:
Checks if the YP server software is installed by querying RPM for ypserv
global addError (string s) -> void

Adds an error to error_msg

Parameters:
s message, ending with a newline
global addErrorDetail (string s) -> void

Adds an error to error_details

Parameters:
s message, ending with a newline
local CallFunction01 (list<any> f) -> void

Kind-of-compatible replacement for term evaluation. Either f[0] is void(), or f[0] is void(any) and f[1] is any Not called, bug #37146

Parameters:
f
global Write () -> boolean

Write all NIS server settings

Return value:
true on success
global Remove (any file) -> void

Removes file or directory and log errors

Parameters:
file what to remove
global EnsureDirectory (string directory) -> boolean

Ensures that the domain directory exists.

Parameters:
directory the path
Return value:
false if not and cannot be created
global YPGetMaps () -> void

Gets the YP maps from master for slave

global SaveSecurenets () -> void

Save securenets list

global SaveSlaves () -> void

Save list of slaves by calling appropriate any agent

global SaveVariables (any which) -> void

Saves config variables according to workflow

Parameters:
which workflow one of `slave, `master
global YPDaemons (any workflow) -> void

Starts or stop daemons

Parameters:
workflow what to start or save: `master, `slave, `none
global YPMake () -> void

Creates initial database

global Client () -> void

Calls NIS client configuration writing

global GetSaveList (symbol workflow) -> list<map>

Returns a list of what to save

Parameters:
workflow what workflow was chosen (`none, `slave, `master)
Return value:
a list of maps:
$[
   "save_label": ...,
   "progress_label": ...,
   "function": @see CallFunction01
 ]
global Import (map settings) -> boolean

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

Parameters:
settings The YCP structure to be imported.
Return value:
True on success
global Export () -> map

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

Return value:
Dumped settings (later acceptable by Import ())
global Summary () -> list

Create a textual summary and a list of unconfigured cards

Return value:
summary of the current configuration