Most parts of the opsi software are open source.
The parts of opsi that are not open source are still under a co-funded development. Information about these parts can be found here:
opsi cofunding projects

For licenses to use opsi in the context of closed software please contact the uib gmbh.

The names opsi, opsi.org, open pc server integration and the opsi logo are registered trade marks of uib gmbh.

2. Introduction

2.1. Who should read this manual?

This manual is written for all who want to gain a deeper insight into the mechanisms and the tools of the client management system opsi ("open pc server integration").

It presents a complete HOWTO for the use of opsi while emphasizing the understanding of the technical background. The decision maker who decides on using opsi as well as the system administrator who works with it will get a solid foundation for their tasks.

2.2. Notations

Angle brackets < > mark abstract names. In a concrete context any marked <abstract name> must be replaced by some real name. Example: The file share, where opsi places the software packets, may abstractly be noted as <opsi-depot-share>. If the real fileshare is /var/lib/opsi/depot, then you have to replace the abstract name by exactly this string. The location of the packet <opsi-depot-share>/ooffice becomes
/var/lib/opsi/depot/ooffice.

Example snippets from program code or configuration files use a Courier font, with a background color:

depoturl=smb://smbhost/sharename/path

3. Overview of opsi

Tools for automated software distribution and operating system installation are
important and necessary tools for standardization, maintainability and cost saving of larger PC networks. Normally the application of such tools comes along with substantial royalties, whereas opsi as an open source tool affords explicit economics. Expenses thereby arise only from performed services like consulting, training and maintenance, and perhaps from low cofunding rates if you like to use some of the non free modules.

Although the software itself and the handbooks are free of charge, the process of introducing any software distribution tool is still an investment. To get the benefit without throwbacks and without a long learning curve consulting and education of the system administrators by a professional partner is recommended. uib offers all these services around opsi.

The opsi system as developed by uib depends on Linux-servers. They are used for
remote installation and maintenance of the client OS and the client software packets ("PC-Server-Integration"). It is based as far as possible on free available tools (GNUtools, SAMBA etc.). The complete system all together is named opsi (Open PC-Server-Integration) and with its configurability is a very interesting solution for the administration challenges of a large computer park.

3.1. Experience

opsi is derived from a system, which is in use since the middle of the 90’s with more than 2000 Client-PCs in different locations of a state authority. Since that time it has continuously been adapted to the changing Microsoft operating system world. As a product opsi is now accessible for a broad range of interested users.

You can find an geographical overview of the registered opsi-installations at:
opsi-map

3.4. Structure

The configuration of opsi requires some data management. All non-server components are using a web service for data exchange with the opsi server. They exchange data via the opsiconfd, and the opsiconfd forwards the data to the backend manager which passes the data into the selected backend.

The backend configuratin will be found at the files in ther directories
/etc/opsi/backendManager and /etc/opsi/backends.

Figure 2. Scheme: backend layers and access control

The configuration files in /etc/opsi/backends define the backends.

Which backend is used for which data, is configured in the file
/etc/opsi/backendManager/dispatch.conf.

The file /etc/opsi/backendManager/acl.conf defines who has access to which
methods.

Below the directory /etc/opsi/backendManager/extend.d there could be files
which defines extended opsi methods. So you will find here for example the files which define the action based (legacy) methods by mapping them to the object based methods (/etc/opsi/backendManager/extend.d/20_legacy.conf).

A more detailed reference of these configuration files you will find at

4. opsi-Management GUI: opsi-configed

4.1. Requirements and operation

Important

Since version 4.0.7.5.22, the opsi-configed requires at least Java 1.8
It works with the data from a running opsiconfd at least of version 4.0.6.

You find the current version of the opsi-configed as an opsi-package for local installation on download.uib.de.
In non-opsi systems the opsi-configed can be simply installed by copying the required jar archive files as contained e.g. in the opsi-package.
In order to automate this, the setup program opsi-configed-setup.exe can be used (from http://download.uib.de/opsi4.0/helper/ )

The current stable version of the opsi-configed is as well contained in the opsi-server installation, and is maintained
by means of the Linux distribution methods. This version of the program has the identical code with the corresponding local version, but is primarily used
as a Java Webstart application. It may be executed

If the server has a graphical desktop, the opsi-configed can be started as well directly on the server via a desktop menu entry or
in a shell by /usr/bin/opsi-configed.

With non-gui servers there exist only the special non-gui start options

--version

--help bzw. -h

--querysavedsearch [SAVEDSEARCH_NAME] bzw. -qs [SAVEDSEARCH_NAME]

--swaudit-pdf FILE_WITH_CLIENT_IDS_EACH_IN_A_LINE [OUTPUT_PATH]

If the additional required jar archives exist in the path the opsi-configed can be started simply by java -jar configed.jar.

With java -jar configed.jar --help you’ll get a list of the command line options
.

-l LOC --locale LOC Set locale LOC (format: <language>_<country>)-h HOST --host HOST Configuration server HOST to connect to
-u NAME --user NAME User for authentication
-p PASSWORD --password PASSWORD password for authentication
-c CLIENT --client CLIENT CLIENT to preselect
-g CLIENTGROUP --group CLIENTGROUP CLIENTGROUP to preselect
-t INDEX --tab INDEX Start with tab number INDEX, index counting starts with 0, works only if a CLIENT is preselected
-d PATH --logdirectory PATH Directory for the log files
-r REFRESHMINUTES --refreshminutes REFRESHMINUTES Refresh data every REFRESHMINUTES (where this feature is implemented, 0 = never)
-qs [SAVEDSEARCH_NAME] --querysavedsearch [SAVEDSEARCH_NAME] On command line: tell saved host searches list resp. the search result for [SAVEDSEARCH_NAME])
--gzip [y/n] Activate gzip transmission of data from opsi server yes/no
--sslversion PREFERRED_SSL_VERSION Try to use this SSL/ TLS version
--ssh-key SSHKEY full path with filename from sshkey used for authentication on ssh server
--ssh-passphrase PASSPHRASE passphrase for given sshkey used for authentication on ssh server
--version Tell configed version
--collect_queries_until_no N Collect the first N queries; N = -1 (default, no collect), 0 = infinite
--help Give this help
--loglevel L Set logging level L, L is a number >= 0, <= 5
--halt Use first occurring debug halt point that may be in the code
--sqlgetrows Force use sql statements by getRawData
--nosqlrawdata Avoid getRawData
--localizationfile EXTRA_LOCALIZATION_FILENAME Use EXTRA_LOCALIZATION_FILENAME as localization file, the file name format has to be: configed_LOCALENAME.properties
--localizationstrings Show internal labels together the strings of selected localization
--swaudit-pdf FILE_WITH_CLIENT_IDS_EACH_IN_A_LINE [OUTPUT_PATH] export pdf swaudit reports for given clients (if no OUTPUT_PATH given, use home directory)

Logging of the opsi-configed

By default, the opsi-configed uses its log level 3 "Info". The level can be raised to 4 "Check" or 5 "Debug".

To change the log level the command line option --loglevel [LEVEL] can be used. It is not recommended to set level 5 as long as not the start process needs to be inspected.
For, with level 5, the produced log file is very large; it is difficult to get loaded and viewed. When the opsi-configed is running and a potential error situation
is expected the log level can be raised via the menu entry Help/ConfigEditor log level.

Level 4 can be helpful since with it, the service calls are logged. With luck, level 5 offers a detailled view of actions.

Since version 4.0.7.6.12 the logfiles are deposed by default in the user home directory. In Windows the folder

c:\Users\[User name]\AppData\Roaming\opsi.org\log

In Linux the default logfiles folder is the (hidden) subfolder ".configed" in the user home directory.

The current logfile is named configed.log, the up to 3 preceding versions are configed_0.log, configed_1.log, configed_2.log.

The logging directory can be changed via the command line option "-d".

The current logfile path is displayed at the Help menu, entry "Current logfile".
The filename can there be retrieved in order to use it in an open file dialog of a viewer program or can be directly opened by the default application for .log files.

Choosing the language

The opsi-configed tries to use the language following the OS defined locale. If the matching translation file is missing
English is used as default language. If terms in translations file are missing the expressions of the Englisch translation are used as
default.

When calling the opsi-configed you can set a locale via the command line option

-l resp. --locale

On principle, the locale has the format language_region, each component with two characters, eg. en_US of de_DE. It suffices to give the
two character language code since there no region specific variants prepared.

In a running opsi-configed the language can be switched via the menu item
File/International. A change triggers a re-initialization of the program with a (nearly complete) rebuilding of
the visual components in the new language.

Finally the call parameter

--localizationfile

can be used for directly prescribing a localiziation file. The additional parameter

--localizationstrings

has the effect that the display of the localized expressions is combined with displaying the terms for which expressions should be
given. This can be used for producing and testing a localization file.

Custom start values with Java Web Start

When starting via Java Web Start you can apply the same parameters as if the configed is started as a local application
but with a slightly different syntax. It has the form:

It’s a standard http parameter syntax where the option names are used omitting the dashes.

4.2. Login

Figure 3. opsi-configed: login mask

The opsi-configed tries to connect to the opsi server via https.
The login is done with the given parameters opsi server[:Port] (default port 4447 – opsiconfd)
and the user/password pair of the opsi-config-server account. For a successful login the provided user
has to be a member of the unix group opsiadmin.

In the local user profile, the opsi-configed saves certain session info in order to rebuild the essential working
context after a restart, in particular a selected client group. Since version 4.0.7 the session data is used to produce a selection list
of opsi servers to which you were connected (e.g. a productive one and a second one for experimental purposes). The last server used
gets the highest place, and can be directly used again.

The gzip compression in HTTP protocol reduces the amount of data being transferred at the expense of an extended processing time,
this is due to the fact that the data must be compressed and uncompressed.
It has been observed that the reaction times tend to be shorter without compression in the local network,
as the effects normally surpass the prolonged processing time. For transmissions over the WAN, it tends to be the opposite.
In the practice, little difference is noticed on LAN connections, but relevant differences are noticed on WAN connections, so the Gzip option is enabled by default.

The feature check which clients are reachable runs in the background and shows the results in the client table.
It can be enabled from the login screen mask or via command line parameter.
The default refresh interval is 0 min (= deactivated). It should be observed though that a too short refresh interval produces
a lot of network waiting states which can slow down the opsi server.

4.3. Copy & Paste, Drag & Drop

You may copy the selected entries from nearly every section of the opsi-configed to the clipboard using the standard key combinations (Ctrl-Insert, Ctrl-C). This may be used to transfer interesting data to other programs.

For most of the tables you may also use Drag & Drop to copy the data e.g. to Excel or a

To switch between the different usage modes of the opsi-configed, use the buttons
in the upper right corner of the opsi-configed frame. Since version 4.0.4, there are six buttons.

Figure 4. opsi-configed: Usage modes

The first three buttons allow you to change the editing target of the main window: client configuration,
server configuration. On the other hand, each of the buttons group actions, product actions and license management
starts a special window to manage the specific objects or actions.

These windows can as well be opened via the main menu item windows (since opsi-configed version 4.0.7).

4.5. Depot selection

All opsi-depotservers that are integrated with your server, are listed in the upper left corner
of the opsi-configed. By default the depot on your opsi-config-server
is selected and the clients belonging to this opsi-depot are shown.

You can select multiple Depots at the same time and edit their clients together.
However, only the selected depots are synchronized with each other.
Trying to edit clients from asynchronous depots together will be rejected with an
appropriate warning and the corresponding error message.

As of version 4.0.5, there is no need to carry out a complete data-reload
when switching to a different depot-server,
that means, when you select a depot its data is loaded immediately.
In addition, there are the following buttons:

(=+) : Marks all depots with identical product stocks.

(++) : Marks all depots (you can also use Ctrl-a)

Figure 5. opsi-configed: depot selection

4.6. Cient selection

After a successful login, the main window pops up and shows the tab Client selection.
This tab shows a list of known clients from the selected opsi-depot resp. the clients
which are selected using the tree view control on the left side of the opsi-configed.

Since version 4.0.4, the opsi-configed saves on the local machine, for the current user,
the current depot server and group selection. If the opsi-configed is restarted,
you can continue working at the point where you were.

Please note, that group selection is preserved when changing depot selection. In order to
see all clients in the other depot the group selection has to be changed appropriately.

Figure 6. opsi-configed: client selection mask

You may select a line of the list not only by manual scrolling and selecting but also
by a String search. This requires that you enter a String into the search field at the top of the list

How the search works is determined by the selected elements in two drop down lists:

Via field selection you can choose if

all fields (more precisely, all fields that are for this temporary configuration represented as columns) are searched (default), or

only one field (and which one) is searched.

Concerning the method of search you may select between the options (since 4.0.7):

Full-text: the search string is used in a similar way to a web search on a certain search engine for example in the standard manner; i. e., if the input contains several keywords
(delimited by blanks) then the word elements will be a match if any of the input parts are fully contained in some of the columns.

Full-text (complete string): the search string is used like using a web search on a search engine the search string embraced by citation marks;

e. a table line will match if the complete input string is part of one of the columns content.

Start-text search: a table line will be a match if the column text starts with the search string.

Regular expression: the search string is interpreted as a so called regular expression; i.e., a line will be a match
if the input string produces a match according to the rules of regular expressions (as described in the java doc for java.util.regex.Pattern).

The enter key produces the next search hit. If there is no match it advances the mark to next line.

More selection functions based on String search are shown in the context menu
of the search field.

Figure 7. opsi-configed: Search function in the client selection list

Examples of Search Patterns

All PCs which have a name or a description containing the character sequence Miller with capital M or with m are found by using the pattern

.*iller.*

The dot in " .* " means "arbitrary character", the asterisk " * " means "arbitrary number of occurrences (of the beforehand designated element)". That is

.*iller.*

it matches, if anything (any number of any characters) come before iller and anything after iller.
Since "any number" may be zero

Home of Miller

matches where no character follows after iller.

But to ensure that we do not mark Tiller as correct a more precise pattern would be

.*[Mm]iller.*

Several characters enclosed in brackets are interpreted as the searched value must contain one of the enumerated characters. With this more precise pattern, every string is recognized which
contains either Miller oder miller but no other string.

Here is yet another example, a pattern search for products:

0.-opsi.*standard

matches for all products which have a name beginning with "0", followed by an arbitrary character, followed by -opsi, followed by arbitrary characters (in arbitrary number); finished by standard.

To ensure that the second character is a number symbol, i. e. one of the characters "0", "1", "2", "3", "4", "5" , "6", "7", "8", "9", one can write

0[0123456789]-opsi.*standard

As short hand for [0123456789] one can use, since it is a complete partial sequence of the sequence of all characters, [0-9]. Therefore the search pattern reduces to

0[0-9]-opsi.*standard

Matching products e.g.

03-opsi-abo-standard

or

05_opsi-linux_standard

More informations on the topic can be found in the java api doc, key word
"java.util.regex.Pattern".

The clients list

The clients list has per default the columns client name, description, on, IP address and last seen.

client name is the full qualified hostname which is the client name including the domain name

description is a free selectable description which you can edit in the top right hand side of the window

On shows after clicking the button Check which clients are connected the
result of this query. This feature runs in the background and shows the results in the client table.
It can be enabled from the login screen mask or via command line parameter.
The default refresh interval is 0 min (= deactivated).

Figure 8. opsi-configed: Button Check which clients are connected

Figure 9. opsi-configed: Client reachable

Figure 10. opsi-configed: Client unreachable

IP address shows the IP number to which the opsi server resolves the client name.

last seen shows the date and a time of the last client connect to the opsiconfd web service

Some columns are deactivated by default:

session infos (data is retrieved from the operating system running on the specific client)

Inventory No (displaying some optionally entered data)

created (date and time of client creation)

opsi mac address (hardware address of the client as used by opsi)

You may activate these columns using the context menu. The configuration of the columns being displayed may be changed using the entry configed.host_displayfields in the
server configuration.

Figure 11. opsi-configed: change the default for visible columns in the clients list

Adding the column session infos enables the button "request session infos from all clients" in the button panel.

Figure 12. opsi-configed: Button Sessioninfo

When this button is clicked the opsiconfd tries to connect to all clients and to retrieve data of the
active user sessions. From the result, the account names are shown in the column session infos.
Instead of using the button you may start the request only for the selected clients via the context menu
or the main menu entry OpsiClient. By doing this, network timeouts are avoided.

Since the search function for the client list works (if not configured otherwise) on all displayed columns
you may now find out which is the client belonging to a logged in user (with known account name).

To sort the clients by a certain column click on the top header of that column.

Selecting clients

You can select one or multiple clients to work with. The client view can be restricted to the selected clients by clicking the funnel icon or from the menu by Grouping / Show only selected clients.

A selected client group can be saved with the icon Save grouping or from the menu by Grouping / save group with a free selectable name.

You can use the mouse to add the selected clients to an existing group (by dragging them to an existing group which is displayed in the tree view).

In the client selection dialog (as called via menu Selection / Define search) clients can be selected using a variety of criteria based on their configurations.

Figure 13. opsi-configed: Selection dialog

E.g., it is possible to search for opsi installed products as well as software found by the opsi software audit. You may as well search for
PCs satisfying certain hardware conditions. Criteria may be combined by logical AND or OR operations and may be negated by
a NOT (which is produced by a click on the Not-Field before the property field).
Search strings can be given as fixed strings combined with asterisks * as wildcard symbols.

Search definitions can be saved and then again used via the menu item Selection/Use saved search definition.

Figure 14. opsi-configed: Saved Search

It is also possible to run a saved search from the command line when the opsi-configed editor is started. By including the flag "-qs" and the name of the saved search, the configuration editor will start
with the saved search results. If the name is omitted, then a list of available searches will be displayed.

To detect failed installations, the menu item Selection offers Failures with product and Failures occurred (today, since yesterday, …), since version 4.0.5 .
Choose the first setting to get a list of all products. If you select a single product, all clients will be shown, where the installation of this product failed.
When choosing for instance Failures occured - today, all the clients will be marked, where an product installation failed today.

Figure 15. opsi-configed: Failed Actions

4.7. Client selection and hierarchical groups using the tree view

Clients can be grouped in a convenient way by using the tree view control placed on the left side of opsi-configed frame.

Basic concepts

The tree view control has three base nodes groups, directory and client list.
Alls clients of the selected depots are displayed in the group client list.

The nodes groups and directory are different in so far as each client can have any number of locations in the groups subtree
but has a unique location in the directory subtree;
as long as there was no other assignment to subgroup of directory a client is automatically placed into the group NOT_ASSIGNED.

If you select a client, all groups to which the client belongs will get color marked icons.

Figure 16. opsi-configed: Tree view with clients and groups

How to …

By a click one a node (or a group) all clients beyond this node will be shown in the Clients tab, but none of these clients is selected for processing.

By a click one a client, this client will be shown in the Clients tab and selected for processing. You may also use this way to change the selected client while you are in a other tab like product configuration without coming back to the clients tab.

You may use Ctrl-click and Shift-click to select multiple clients.
This tree view control show the groups which are created according the chapter

You may also create groups by using the context menu above ALL or any existing group.

Figure 17. opsi-configed: Using the context menu to create a new subgroup

You will be asked for the new groups name.

Figure 18. opsi-configed: Dialog: Group name

A group can be populated with clients using Drag&Drop by

copying clients from the Clients tab to the group in the tree view
(left mouse button)

copying clients from the tree view control below the node ALL to group in the tree view (left mouse button)

moving clients from a group in the tree view control to a other group in the tree view (left mouse button)

copying clients from a group in the tree view control to a other group in the tree view (Ctrl-left mouse button)

A group can

be moved to a different location via drag & drop.

The context menu of a group item can be used

to create a subgroup;

to edit the group properties;

to delete the group together with its subgroups and all client assignments of them;

to remove all client assignments while keeping the group and its subgroups;

to display the the contained clients and select them in one step.

4.8. Client processing / Client actions

Using the menu OpsiClient or the context menu in the Clients tab you may choose from a lot of client specific operations

Figure 19. opsi-configed: : context menu Clients Tab

Install By Shutdown, Uefi Boot and WAN Configuration

Several client standard configurations can be applied directly in the client information panel which is located on the right side
of the clients page. Please observe that UEFI support and WAN configuration both are currently based on non free extension modules.
If these modules are not active the corresponding buttons are disabled.

Install By Shutdown:
In Section 9.17, “opsi Installation on Shutdown (free)” , the method do switch to Install by Shutdown installation is described en detail. You can automatically
trigger this configuration by pushing the On-Button for InstallByShutdown. Observe that this requires a opsi-client-agent reinstall or reconfigure.
Alas, the state of the configuration can currently only be seen in the product property `on_shutdown_install`of the opsi-client-agent product.

Uefi Boot:
The state of checkbox Uefi Boot indicates, if a client is configured for UEFI boot. It is activated the value of the client host parameter
clientconfig.dhcpd.filename is changed to linux/pxelinux.cfg/elilo.efi geändert. (For more infos cf Section 9.6, “opsi with UEFI / GPT”)

WakeOnLan (Wake selected clients)

Choosing this menu entry, you will send the selected clients a WakeOnLan signal.

Since version 4.0.7 you can choose

if the network signal is meant to be sent to the selected clients at once

which delay should be between the waking of two clients

when the process shall start (via a scheduler).

If a client is assigned to a depot server which is not the configserver then the Wake On Lan signal is not directly sent to the client,
but the opsi-configed tries to establish a HTTPS connection to the opsiconfd of the depot server which in turn sends the Wake On Lan package to the client inside its network segment.

Figure 21. opsi-configed: Scheduler for Wake On Lan

It should be observed that it is the opsi-configed which triggers the actions, therefore the program must not be shut down in the meantime.

Fire opsiclientd event (Push Installation)

This menu entry is used to send to the opsi-client-agent on the selected clients a command to fire the event
which is selected in the submenu. The standard event is "on demand" which means the demanded action is started at once.
Be aware that this may have the effect that the client is rebooting without any warning.

To incorporate additional events (which should be configured in the opsiclientd.conf) into the submenu you have to edit the
config configed.opsiclientd_events via the tab (server) host parameters.

All messages will be shown on the active desktop. If the client isn’t reachable, you will get a message.

What happens exactly if you fire the event on_demand can be configured in the event on_demand configuration.

Sending messages (Show popup message)

Choosing the menu entry Show popup message you will get a small edit window where you can type in your message.

Figure 22. opsi-configed: opsi message edit mask

By clicking on the red tick you will send the message to the selected clients.

At the selected clients a message window will appear.

Figure 23. opsi-configed: opsi message display dialog

Session info for selected clients

The selected clients get the signal to communicte their session information. The data is shown in the session info column
(if visible).

For WAN-Clients: Delete package cache

On WAN clients there are occasional problems with the package cache synchronization. This function resets the cache.

Call external remote control tools for selected clients

The option Remote Control Software call in the client context menu as well as the client main menu (since opsi-configed version 4.0.1.11) is very powerful. It can be used
to use any command that the operating system offers, parametrized e.g. by the client name.

As an example there are configurations automatically generated which can be used to send a ping to the selected client: one
ping command that works in Windows environment and one command that requires a Linux X environment. Please observe:
opsi-configed calls obviously the command in its environment, i.e., we need the Linux command when the opsi-configed
is running in Linux.

Figure 24. opsi-configed: Choice of Remote Control call

The selection window has three parts. The upper part lists the names of the existing commands. It follows a line, which shows
the selected command and offers the chance to edit it (if this is allowed). Additionally, the line contains the buttons
to execute or abandon the action. The third
text area of the window captures any messages that are returned by the operating system when
calling the command.

These calls offer a quasi infinite range of opportunities. For example, a command can be configured to open
a Remote Desktop connection to the selected client (if it allows such connections). On a Windows system, such a command
is

cmd.exe /c start mstsc /v:%host%

In a Linux environment the following command can be used:

rdesktop -a 16 %host%

In these examples serves %host% as a variable, which opsi-configed automatically replaces
by the value for the selected host. Other variables that can be analogously used in the commands are:

%ipaddress%

%hardwareaddress%

%opsihostkey%

%inventorynumber%

%depotid%

%configserverid%

If the command is marked by the additional server configuration entry editable as true,
then the command line allows ad hoc editing. For example, you may supply a requested password or vary
the command as needed.

Caution

If there is some command declared as editable then in fact any program addressed
at the client computer can be called by changing the editable command.

If more than one client is selected the command will be executed in a own thread for each client.

To define a command example, at minimum an entry configed.remote_control.example
(or configed.remote_control.example.command) must be generated. The value of property has to be the command
(in which the variables %host%, %ipaddress% etc. can be used). Additionally, an entry configed.remote_control.example.description
can be defined. The value of this entry will be shown as tooltip (if not existing, the command itself will serve as tooltip content).
Furthermore, a Boolean entry configed.remote_control.example.editable can be added. If its value is set to false the command
cannot be edited in the selection window.

Figure 25. opsi-configed: Editing of remote control commands in the server properties editor

Shutdown / reboot of selected clients

You may send the selected clients a shutdown or reboot signal. You have to confirm this command at the opsi-configed.

Caution

If the client received the signal, it will going down with out any more questions.

Delete, create, rename and move clients

You may delete the selected clients from the opsi-server.

If you choose to create a client, an input mask opens. There you enter or confirm the required data – client name without domain specification, domain name, depot server name. You may add a textual description for this client and notes on this client.

Figure 26. opsi-configed: creating a client

The mask also contains fields for an optional declaration of the IP-number and the ethernet (MAC) address of a client. If the backend is activated for the configuration of a local dhcp-server (which is not the default setting), this information will be used to make the new client known to the dhcp-server. Otherwise the MAC address will be saved in the backend and the IP-number will be discarded.

When creating clients you can directly for the new client specify to which group it should belong,
as well as which netboot product should be directly set on setup. In addition, you can activate
directly the Install by shutdown, UEFI Boot and the (standard) WAN configuration from the beginning.
These settings can easily be made in the Hosts-List.
These configurations are only available since the version 4.0.5.8.1 .

Since opsi 4.0.4 it is possible to disable the options for creation and deletion of an opsi client.
This is used if the client creation should be managed by a different service, eg. the UCS service.

For the configuration of these options, a host parameter (config) is provided. It is named configed.host_actions_disabled and
offers the list values

add client

remove client

(multiple selection allowed). The default is the empty selection meaning that no option is disabled.

The default setting can be changed so that adding and removing clients from the opsi-configed is disabled:

Moving a client to a different depot-server. If clicked the following windows appears with a list of existing depot-servers

Figure 27. opsi-configed: change the depot of a client

4.9. Product configuration

Switching to the tab Product configuration you get a list of available software packages with its installation status and action status for the selected clients.

Figure 28. opsi-configed: product configuration mask

Since opsi 4.0.4 a search function is added.

With the search function, products can be searched by product names and (if desired) in combination with special values in the fields of the product table (like searching the client table).
Therefore a search string can be entered. The search starts immediately and the first matching line is marked . If there is no match to be found (or characters are removed from the search string), the first line of the table is marked.

The context menu offers some more options.

Figure 29. opsi-configed: Product search with context menu

To get a better overview, activating the filter function reduces the product view to the selected products only.
The selections stays active until the filter is disabled by clicking the filter button again.

If there is a different status for the selected clients this will be marked grey (undefined). The list of the selected clients is shown at right on top.

You can also sort the product list by clicking at the column header.

This are the columns:

Status is the last announced state of the product and can hold the values installed, not_installed, unknown. The table shows an empty cell if the value is not_installed to improve the usability of the view. The cell becomes grey if a multitude of selected clients is selected and does not share a common value (grey coloring represents the pseudo value mixed).

Report informs about the progress or the result of the last action using the pattern <action result> (<last action>). During an installation process there may be indicated installing, afterward e. g. failed(setup) or success (uninstall).

The column Requested action holds the information which action is to be executed. Possible values are none (shown by an empty cell) and the action types for which scripts are defined in the product package (possible values are setup, uninstall, update, once, always, custom).

The field Version displays the software version number combined with the opsi package number of the software package installed on the client.

There are two more columns which can be activated via the context menu:

Priority class displays a priority value that is assigned to the product (highest priority +100, lowest priority -100). It influences the product order when products are installed (by virtue of the product_sort_algorithm)

The position column displays the product ordering forecast for installation sequences.

Choose a software product to get more product information in the right part of the window like:

Complete product name: full product name of that software package.

Software/package version: software version-version of the opsi package of the software package (specified in the opsi installation package).

Product description: free text to describe the software.

Hints: free text with advices and caveats for handling the package.

Requirements: A list of other products which the selected product (say A) depends on combined with the type of dependency: required means that A requires the other product (B), but it doesn’t matter whether B is installed before or after A. pre-required means B has to be installed before A. post-required means B needs to be installed A. on deinstall means this action should take place if A be de-installed.

Configuration for client: It is possible to define additional properties for a product. Their values can be evaluated in a setup script to configure the product per client. Because of the intrinsic complexity of a property definition there is a specific GUI element for displaying and editing the table of properties:

4.10. Property tables with list editor windows

A property table is a two-column table. In each row, the first column contains a property name,
the second column displays the assigned property value(s).

It may be configured that a tool tip is displayed showing some information on the meaning of the property and the default value.

Figure 30. opsi-configed: property table with tooltip

If you click at a value a window pops up: the list editor for this property.
It shows a value resp. a list of preconfigured values with the current value (resp. a combination of values) as selected.

Figure 31. opsi-configed: list editor, selection list

Clicking a new value changes the selection.

If the property value list is editable (new values may be added to the existing list resp. existing values changed) the window comes up with an edit field for the new or modified values.

Figure 32. opsi-configed: list editor, edit field

The most comfortable way to get a new value that is a variant of an existing one
is double clicking the existing value in the list. This copies it into the edit field where it can be modified.

As soon as the edit field contains a new value – not yet occurring in the value list –
the plus button will be activated with it the new value can be added to the list of values.

If multiple values are allowed – as it should be e.g. for the property additional drivers – a value may be added to the set of selected values by Ctrl-Click .
The very same action removes a selected value from the set. The minus button empties the selection set completely.

When the list has been edited the green check mark turns to red as usual in the opsi-configed. Clicking it takes the new selection as new property value (and finishes editing). Clicking the blue cancel button stops editing and resets the original value.

Hidden Password Property Values

A property value that is a password should not be directly displayed.

Until this feature will be constructed as a special value type in some coming release the hack is used that a property value
will only be displayed if the user explicitly requests it in cases (since version 4.0.7 ):

the property key text contains the string password

the property key text starts with the string secret

E.g., the value of the property root_password in the Linux netboot products is displayed as a sequence of stars (until the user does the edit click and explicitly confirms to showing the password).

4.11. Netboot products

The products on tab Netboot products are mainly used to install the client OS (operating system) and are listed and configured like the products on tab Product configuration.

If for the selected client(s) a netboot product is set to setup, the correspondent bootimage will be loaded and executed at the next client reboot.

Figure 33. opsi-configed: mask to start the bootimage

This is usually done to initiate an OS installation or any other bootimage task (like a memory test etc.)

4.12. Hardware information

With this tab you get the last detected hardware information for this client (only available if a single client is selected).

Automatic driver upload

The two offered byAudit driver paths are composed of the manufacturer and the product or the model, which are respectively read from the computer and the mainboard. By clicking the right button to upload a driver, a new window will be displayed to add more settings.

Figure 35. opsi-configed: Hardware information - driver upload

If you open the opsi-configed on a Linux system, it is not directly possible to carry out a driver upload because the connection is carried out via a Share. This needs to be made manually. However, the methods or directory structures are an essential aspect of the drivers integration for linux users as well as for windows users.

Without further settings, the driver upload of a Windows computer, works only if the connection to the Share is enabled.

Among other things, information must be given in a new window, like to which Windows product should the driver be prepared, which drivers are to be uploaded and with which method or the directory in which the driver integration takes place. The target directory is accordingly changed with the selection of another method. The previously selected byAudit driver path can be found again by default in the selected method byAudit, that specifically integrates the selected driver for the type of machine.

Following methods and directories are possible:

standard: For the drivers which are found in ./drivers/drivers/, the driver will be matched to the corresponding hardware using the PCI IDs (i.e. USB- or HD_Audio-ID) in the description file, and then integrated into the Windows setup as needed. It may be the case that the drivers found by opsi in this location do not necessarily work with your hardware. For the drivers which are found in ./drivers/drivers/, the driver will be matched to the corresponding hardware using the PCI IDs (i.e. USB- or HD_Audio-ID) in the description file, and then integrated into the Windows setup as needed. This is the fall back directory for all clients.

preferred: In the case that you have to support special hardware, and you can find the additional drivers from the manufacturers, then use the following procedure to include them in the installation. Place the additional drivers in their own directory under: ./drivers/drivers/preferred (the naming and depth of the directory structure is not important). Drivers that are found in the directory ./drivers/drivers/preferred will be integrated into the Windows setup, assuming that opsi finds a suitable match to the drive hardware based off of the PCI IDs (i.e. USB or HD_Audo-ID) in the description file. Problems can occur when the same PCI ID of the drivers is found in preferred. In this case, a direct mapping of the drivers to the devices is needed.

excluded: It could happen that the manufacturers include different drivers for different operating systems (i.e. Vista vs. Win7) or different configurations (ie. SATA vs. SATA RAID). The create_driver_links.py cannot make this distinction. If you think the wrong driver has been installed, then move the driver to the drivers/exclude directory and then call create_driver_links.py again. Drivers in the directory drivers/exclude are not used during the integration.

additional: When installing additional drivers based on the PCI-IDs or USB-IDs, they should be installed under the directory ./drivers/drivers/additional (where name and depth of the directory structure is not important). You can map one or more drivers to a client using the Product-Property additional_drivers and a list of driver directories under ./drivers/drivers/additional. The directories specified by additional_drivers are searched recursively until all drivers are found. This method can be used to make a specific directory based on the client type (i.e. dell-optiplex-815).

byAudit: The previously described mechanisms that directly map drivers to devices is automated since the 4.0.2 Release 2 of opsi. Opsi will search the directory ./drivers/drivers/additional/byAudit for a director name that matches the field Vendor that was given in the Hardware Inventory. This Vendor directory will be search for a Model directory that corresponds to what is seen in Hardware Inventory. If this directory is found, then it will be manually assigned to the product property additional_drivers. The directory name byAudit is case sensitive. The directory names for Vendor and Model are not case sensitive (Dell and dELL are treated the same way).

Some manufacturers use model names that are very delicate to this method, since some special characters such as / are not allowed to be used in files or directory names.
An example for a model name could be: "5000/6000/7000".
A directory with this name is not allowed because of the special characters. Since the third Service Release from opsi 4.0.3 the following special characters: < > ? " : | \ / * were replaced internally with an underscore "_" character.
With this change can the above example be replaced with: "5000_6000_7000" the directory will automatically be shown, even though the directory structure information in the hardware inventory is not visually the same.

Important

After the driver upload please execute create_driver_links in the opsi-depot-server.

4.13. Software inventory

With this tab you get the last known software information for this client (only available if a single client is selected).

4.14. Logfiles: Logs from client and server

The client specific log files are stored on the server and visible with the opsi-configed via the Tab log files.

The level up to which the log lines are seen can be chosen by a slider (wheel mouse enabled), so that errors can be easily found.

It’s also possible to search in the log file (to continue the search press F3 or Ctrl-L = last search repeated).

Figure 37. opsi-configed: Display of the log file in the opsi-configed

4.15. Product default properties

To change the default values of the products for one or more opsi-depots, there is a tab, called Product default-properties.
This is only available if you select Properties of depots (which is the second button at the top right hand side).
In the main table, all products are listed with the product version as well as the package version.

If a product is selected, at the top of the right side (as is customary for the client product configuration)
general information about the product packages is shown. Below is the list of all depots,
that have installed the selected product. The table below with the property keys and values
is also known from the client product configuration.

Figure 38. opsi-configed: product default properties

You can select a single depot or multiple depots to change the default values
(which are also called the depot values) of the product.
As the default, all available depots are preselected. With the usual shortcuts
(Ctrl-a, Ctrl-Click or Shift-Click) multiple or all clients can be selected.
If the property value is shown grayed (see Figure 38, “opsi-configed: product default properties” - “gui_language”),
the values for that property differ on the selected depots.
On the right side of the depots are three buttons:

(=+): Mark all depots that have identical values
All depots, that have the same default values, are marked.

(++): All depots are marked.

(globe): set the package default values
The original package default values of the products will be set for the selected depot(s).

If the client related value is shown as identical with its (server based) default value this may be be
because there does not exist a client specific data base entry or because the client value is identical
with the server default value. In the first case the client value changes when the server default value
gets new contents, in the second case the client remains unchanged.

In order to work comfortable with this situation since opsi-configed version 4.0.7.6.5 the context menus
of the client host properties offer the options (1) to remove the specific client values, so that from now on
only the current server values are decisive, (2) to fix the specific client values to the current server values.

if the currently presented client value iis not identical with the server default value it is given in a bold font.

There are configurations objects for which client values can be created and edited but in fact only the server
objects are used. In most cases, the current configed does not show them any more in the client parameters view.

To get more structure the configurations objects are categorized in some (predefined)
groups. The groups are listed in a tree-like manner on the left part of the panel. The entry name/value pairs
belonging to the selected group are shown in the right part of the panel. Wheel mouse scrolling is enabled
as well on the left as on the right side.

Management of user rights and roles

Starting with version 4.0.7.5 the opsi-configed includes the user roles function.

Caution

In order to use this feature the module user roles must be activated in the modules_-file.

In the interface, in the overview of the server host parameters, the category user
shows the availability of the function (not necessarily active).
The user branch of the properties tree starts with a boolean entry

user.{}.register

with default value false.

The other entries at this location represent the default values for the user-specific configurations of the server console (cf. Section 4.20, “Server-Console”).

To activate the user role extension you need to:

Set the value of user. {}.register to true.

Load a modules file that has the userroles extension temporarily or permanently activated.

When the user-role extension is activated, an entry is created in the properties tree for the logged-in user.
The default settings used for the administration of rights are like the "classic" requirements for an administrator,
that means, that this user has no restriction whatsoever. E.g., for a user named admindepot1 the following entries are generated:

admindepot1 is not restricted to read-only access to the server (a pure read-only access might be appropriate for a help desk staff member);

depot restrictions do not exist or are not taken into account;

consequently, the list of depots available to the user can stay empty
(and if some depots are entered, this has no effect);

the user is allowed to edit config server settings of all kinds.

In the case that the access of admindepot1 is to be restricted to the computers in the depot server depot1, the following should be set:

host.depotaccess.configured is to be set to true;

the value "depot1" is to be put into the list host.depotaccess.depots.

After a complete data reload, clients from other depots are not more visible to admindepot1
(and also only the depot settings for depot1 are accessible).

Caution

admindepot1 him/herself can change this settings as long as she/he owns the privilege host.opsiserver.write

In order to complete the restriction, it therefore is required to set

host.opsiserver.write to false.

Caution

The privileges which are set in this way restrict only the functionality of the opsi-configed.
Until further notice, they have no effect if the JSON-RPC interface of the opsi-server is accessed by other means.

4.17. Depot configuration

In the mode Properties of depots you will see the tab Depots. There is a drop down menu to select the depot. After selecting the depot you may change the properties of the opsi-depot.

An .opsi file (opsi package) can be selected or entered and can be uploaded to the opsi server; the default upload directory on the server is the network (samba) share named opsi_workbench. The button click starts installing the package on the server, like invoking the opsi-package-manager.

The WinPE files and install files for an Windows product (Windows Vista and above) can be uploaded to the server product directory (share opsi_depot), so that windows products do not have to be managed from the server side.

Figure 43. opsi-configed: package and product actions

4.20. Server-Console

Caution

Some of the following features require at least python-opsi version 4.0.7.38,
in particular defining you own commands as described in Section 4.21, “Define commands” and using them via configed.

With version 4.0.7.5, the configed is extended with a new main menu entry, the "Server Console". At this place some options are bundled to access the opsi-server via a SSH-Connection.
It is as well possible to start a terminal as well as menu items are offered of some predefined commands on the opsi-server.

Figure 44. opsi-configed: Menu: Server Console

Connection data and permissions

If not otherwise configured, it is tried to build a SSH connection with the same user/server pair for which to configed login was done.

Should this not be the case the connection can be also started via a SSH key (possibly with a password) when the configed starts.
In this case, the following start parameters can be used:

--ssh-key PATH: e.g. --ssh-key /home/user/.ssh/id_rsa

--ssh-passphrase PASSPHRASE: e.g. --ssh-passphrase Password

The settings can be changed or adjust under the menu entry "Connection Information".

The visibility of menu items in the server console menu is controlled by a series of server host parameters in the user section. If the user roles feature is used
(cf. the section called “Management of user rights and roles”) the configs are specifically set for each user (the default values for a newly created user entry are taken from the top user level).

In order to be able to use different functions, the appropriate server settings must be activated.

SSH-Terminal

With the Terminal, Linux commands can be run from the connected SSH-Server.
In addition to the possibility to replace the input with asterisks (*), which is strongly recommended for the input of passwords, a process can also be canceled by clicking the "End process / connection" button or by pressing "Ctrl + C".
Just like in the Terminal, the "TAB" can be used to complete commands. Warning: Paths will not be completed - only Linux system commands.
Besides it is also possible to specify data sources, that before the execution can be replaced by concrete data. More about this functionality:
Section 4.21, “Define commands” - Item: Datasources)

Figure 45. opsi-configed: SSH-Terminal

Predefined commands with input masks

Under the menu group "opsi" a few commands are available independently of the self-defined commands with their own input interface. These simplify the handling of various scripts.

Download from data …
Any data file which can be downloaded from the Internet can also be downloaded by the "wget"-command and stored in a certain path on the Server. This could be used for example to download opsi-packages from download.uib.de

Create opsi product file …
Prerequisite for this command is an opsi-utils package with version >= 4.0.7.7. Using this menu item, an opsi package can be created, specifying the directory upon which must be stored. In addition, can the found versions (package and product version) be displayed and overwritten with a button. And also, a md5sum and/or a zsync file can be created.

Set opsi-rights …
This menu item maps the opsi command opsi-set-rights. After entering a specific (optional) path in which the script is to be executed, the root password is prompted and the script is executed in a separate window.

Package-Installation …
With this command, opsi packages can be installed on all depots or in one depot using "opsi-package-manager". You can also specify the server path to the package where the opsi package is located.
By selecting a package from the Internet, the functionality of "File download …" command is taken up and then the downloaded package is installed on the depot.
Additionally, the parameters "--update" and "--setup" of the opsi-package-manager are implemented.
If the zsync and md5 files of an opsi package are to be downloaded, the switch "zsync and md5 include" can be activated.
Then the url of the packages is added accordingly and the additional files are also obtained.

Deployment opsi-client-agent …
If you want to add existing computers to opsi, the opsi-client-agent must be installed on the target computer. If you select the clients in the configed and execute this command, the client names are copied into the corresponding field. If the command is to be executed on several clients in a single call, the login data must be the same on all the participating computers.
Attention: The location of the script have to be: "/var/lib/opsi/depot/opsi-client-agent/opsi-deploy-client-agent"
Detailed information can be found in the opsi-getting-started manual on the First steps chapter.

TIP:
Some user interfaces include a selection component for paths in the directory structure. If the button "Find
Subdirectories" is activated, all directories or files that are contained in the specified path will be listed. To visualize further sections, you can press the button several times. This functionality is, among others, in the
"Set Opsi rights" or the "Package installation" interface.

4.21. Define commands

In addition to the predefined server console commands,
you can create or remove your own commands,
which can be accessed via menu items.
It should be noted that different Linux systems may not be able to execute the same commands.
Thus, the administrator must be sure that the commands can be executed on the addressed Linux system.

Figure 46. opsi-configed: Define commands

Following data must be or rather could be (marked with a "*") for a command:

Menu-Text:
When creating a new command you must make sure that the menu text has not been used already for another command. If a menu text is to be changed, the command must be first deleted with the minus button, and then the new command can be entered.

Description*:
If a more detailed description is stored, then it appears as a tool tip text on the command.

Superior menu*:
Determines in which menu the new command should appear as a menu item. In the case that field is empty, then the menu entry will be directly assigned to the "Server console" menu.

Position *:
The position determines the order (small numbers comes first) of the menu points in total, and thus within each respective menu.
If alphabetical order should be displayed, all items must be set identically (e.g., all 0). Should the the field remain empty, then the position 0 is assigned by default.

"Sudo" rights *:
If one of the commands in the command list requires administrative rights, a check mark must be set on "Required root privileges" afterwards the commands in the list are automatically executed with the keyword "sudo".

Command list:
For the command list, the Linux commands must be entered line by line, so that they can be executed sequentially.
Caution: Command can be tested or executed on the SSH server by means of a button without creating an extra menu point.

Data sources* (on the command list):
Additionally methods can be stored as a data source. Before the command can be executed, the parameters are overwritten with the result of the applied method. The following parameters are possible:

Interactive input:
It is possible to specify parameters for the commands or to identify them for an interactive output. This is done with the following format "<<< This text will be displayed to the user and replaced by the user input >>>" , it is recommended though to write a sample input for the parameter for the user text.

Selected client names / Selected client IP addresses

Selected depot names / Selected depot IP addresses

configserver name

Connected SSH servername
Note: Except for "Interactive Input", the return of the methods can also be formatted, for example, into a comma separated list.
In the interface, the data source can be tested, and also insert it into the location marked in the field of the command list.

Figure 47. opsi-configed: Execute command - Parameter query

Tip

- On Linux, commands can be combined using two commercial ANDs ( "&&"). However, it must be ensured that the second command, if needed, is executed with administrative rights, since this is not done automatically. Example: Requires root privileges: "activated", command list: "apt-get update --yes && sudo apt-get upgrade --yes". +
- During the execution, no user input can be made. It is necessary to control all the inputs via the command \ parameters (example: "--yes" option for "apt-get upgrade")

5. opsi-server

5.1. Overview

The functionality of a opsi-server may be installed on many different kind of linux distributions.

There are two different roles which a opsi-server can play:

opsi-config-server
The opsi-config-server has the central data storage and provides the access to this data via the opsi web service. A opsi-config-server normally has additiona the role opsi-depot-server.

opsi-depot-server
The opsi-depot-server has no configuration data storage. The opsi-depot-server hold the installation files at a share and provides the PXE/tftpboot services for the netboot products.

The hardware requirements are low. The opsi-server can also run as a virtual machine.

Installation and initial operation

Installation and start-up of the opsi-server is described in the opsi getting started manual.

Samba Configuration

The opsi depot server provides network shares holding the configuration information and the software packets. These shares can be mounted by the clients. For Windows Clients the shares are provided by SAMBA (version 3.x).

To configure your samba according to the needs of opsi (or to repair) call:

opsi-setup --auto-configure-samba

After every change of the samba configuration, you have to restart your samba (systemctl restart smbd.service).

The daemon opsiconfd

The opsiconfd is the central opsi daemon (service). It provides an interface for clients to create, manipulate and read data in the backends.

The configuration of opsiconfd is done in /etc/opsi/opsiconfd.conf. The options are commented in the file.
You will find some additional notes here.

[global] max log size:
This option limits the size of logfiles created through the opsiconfd.
Due to an historic reasons this is limited to 5MB per logfile.
Since opsi 4.0.6 the size can be configured.
To disable any size limits the value can be set to 0.

In addition you can use the tool logrotate to rotate and compress logfiles.
Please refer to the corresponding manual for configuration possibilities.

With the knowledge that a logfile for a client does not grow beyond a given
size it is possible to calculate how much space opsi logs will require.
There are five different client-specific logtypes that opsiconfd writes:bootimage, clientconnect, instlog, opsiconfd and userlogin.
There are also some client-independent logs: opsiconfd.log, opsipxeconfd.log,opsi-backup.log, opsi-package-updater.log and package.log.

If we now assume a configuration of opsiconfd and logrotate that limits those
files to 5MB except for package.log that is allowed 10MB we end up with
the following calculation:

(number of clients * 5 * 5MB) + 5MB + 5MB + 5MB + 5MB + 10MB

For 100 Clients we then should reserve 2530MB for the logs of opsi.
Because logrotate will usually only shorten logs on a specified schedule
we recommend to rounding this number up. It would also give you some space
for adding new clients.

Required administrative user accounts and groups

User opsiconfd
The daemon opsiconfd runs as this user.

User pcpatch
This user is be used by the opsi-client-agent to mount the depotshare.
You may set the password for this user byopsi-admin -d task setPcpatchPassword.

Group pcpatch
The group pcpatch has write permission on many files and youll need to be in this group in order to build and install opsi products.

Group opsiadmin
Members of the group opsiadmin are permitted to connect the opsi-webservice and can use for instance the opsi-configed configuration editor. Therefor all opsi administrators should be members of the group pcpatch.

A user can join group opsiadmin by: addgroup <user> opsiadmin.

needed shares

Depotshare with installation files (opsi_depot)
The depot share provides all the software-packets which are installable by the client task opsi-winst. The default directory for the software packets is the directory /var/lib/opsi/depot. In this directory each software packet has its own sub directory named as the software packet. These sub directories contain the packet-specific installation scripts and files.

Note

In older versions that share was located at /opt/pcbin and was named opt_pcbin.

The directory to build pacages (opsi_workbench)
At /var/lib/opsi/workbench you will find the area to create new packages and from where you should install packages with the opsi-package-manager.

Note

Since opsi 4.1 the path can be configured per depot through the attribute workbenchLocalUrl.

Share with the configuration files of the file backend (opsi_config)
At /var/lib/opsi/config you will find the file backend configuration files.

opsi PAM Authentication

opsi uses some PAM-modules to authenticate the user. With this new release, opsi uses different modules for certain distributions. The following list will give you a small overview about which modules are used:

You can see in the list above, which different PAM-modules are used. However, it could be the case that a different PAM-module is required, depending on the local configuration. The source code can be modified to account for these changes. To provide more flexibility without changing the sourcecode, it is possible with this release to create a file named: opsi-auth in the directory /etc/pam.d/. If this file exists, opsi will use this configuration automatically instead of the modules listed above.

The following example will show you the new feature: If you run a debian/ubuntu-System and you get a PAM-authentication-error, even though you can connect with the same credentials over ssh on the server, then you can create the file: /etc/pam.d/opsi-auth with following content:

@include sshd

After restarting opsiconfd, opsi will use automatically the sshd-PAM-module for authentication of users.

Note

Please be aware that for application of ACL a case-sensitive interface is used but authentication through PAM can be case-insensitive. This can lead to the case where ACL are denying access despite an successful authentication.

problem management

If you have incidents by using opsi, you should check the following list or rather execute the following commands. Experience has shown that the combination of the commands in this chapter fix the most incidents.

Check accessibility and load of opsi-webservice:
Call URL: https://<server-ip>:4447/info with your browser. If you can not connect, continue with next step. If you can connect: check the load of opsi-webservice and check the freespace on disk (scroll down in the info-page).
For the generation of load images you need rrdtool with Python-bindings. Please install them if needed.

At least one nmbd and one smbd process should be running.
To restart Samba:

systemctl restart smbd.service
systemctl restart nmbd.service

Set the pcpatch-password:

opsi-admin -d task setPcpatchPassword

5.2. Remarks to Samba 4

With the stable state of Samba4, the development and maintenance for the Samba3 branch has been discontinued. Therefore most of the common Linux distributions (client and server) now contain Samba4 instead of Samba3. Samba shares are a basic component for the opsi system and there are some opsi relevant differences between Samba3 and Samba4, that are discussed in this chapter.

At first it has to be distinguished, in which operational mode Samba is executed. A special feature of Samba4 is the ability to run a fully-fledged Active Directory compatible domain controller. In this operational mode (which will be called PDC mode in the following chapters) there are some restrictions, that had to be adopted from Active Directory for compatibility reasons. Most of the current distributions are equipped with Samba4 in the common share mode, that does not provide the operation of a fully-fledged Active Directory domain. With the exception of the Univention Corporate Server, that has PDC-Mode integrated into their standard packages.

The /etc/opsi/opsi.conf: pcpatch and opsifileadmins

Tip

the restrictions discussed in this chapter concern the PDC mode of Samba4 only.

The classic installation, with the user: pcpatch in the group: pcpatch, does not work with Samba 4. Samba 4 has defined fundamental restrictions for the Active Directory, such as groups with the same name as a user (which is common in Unix/Linux) are no longer allowed. For this reason, a new configuration file has been introduced: /etc/opsi/opsi.conf, that configures the groups for Samba access. To be more specific, for Samba 4 installations the group name pcpatch is renamed as opsifileadmins. So the user pcpatch, who was member of the group pcpatch under Samba 3, must now be a member of the group opsifileadmins.
So, to have access rights for opsi-packages under Samba 3, a user cannot be a member of the group pcpatch anymore, but must be a member of the group opsifileadmins.

Furthermore, the user pcpatch has to be created as a fully-fledged domain user and not as a system user anymore.

These migration steps are performed automatically during opsi installation on a Univention Corporate Server, if the installation process detects Samba4 running in PDC mode.

Besides the UCS installations, currently there are no other default Active Directory configurations. So these steps have to be done manually for any other Samba4 Active Directory domain contoller installation.
During future updates, the opsi system checks for the required user configuration and does not try to create users, that do already exist.

For any questions please contact opsi support. In case you do not have an opsi support contract, please contact info(at)uib.de.

Share Configuration

Tip

The changes discussed in this chapter ar relevant for all operational modes of Samba4.

With Samba 3 the default setting was, that every file or directory was executable on the share for the Samba clients. This behaviour changed with Samba 4. Now all files, that shall be executable from the share, must also have the executable bit set on the Unix side.

This results in a basic problem with running opsi. It is not possible to handle this behaviour from the opsi rights management, for it would require fundamental changes of the rights management of opsi, that can’t be done with opsi 4.

So for handling this problem with opsi 4.0 there are two ways:

Option 1: for the affected shares this behaviour can be supressed by elevating the share privileges of each member of the pcpatch group from the share configuration by setting the following option:
admin users = @pcpatch

This fix elevates the privileges of the Samba processes and has already been used by opsi for some time for UCS >= 3 with Samba 4.

opsi installs per default for Samba 4 distributions with opsi-setup --auto-configure-samba this option for the opsi_depot share. This share is mounted read only, so the safety and security risk can be estimated as low.

Caution

For all other shares, that are mounted as read/write, it has to be considered, that with this fix the samba process runs with elevated rights. This can be a potential risk. Although there are currently no known exploits for this vulnerability, there might be some in the future.

Caution

The Linux smb daemon has a bug. On an existing opsi_depot share it is configured with oplocks. These options have to be removed in the share configuration within the smb.conf. On a new opsi installation and therefore share creation these options are not present anymore.

Option 2: the following global option can be set in the smb.conf:
acl allow execute always = True

With this option all shares behave like Samba 3 shares.

To restore the old Samba 3 behaviour for all shares, the setting of this option can be done for every share manually, or alternalively the option can be set globally in the smb.conf. This changes the behaviour for all shares, not only for the opsi shares.

The global setting does not work with Univention Corporate Server, for its Samba 4 installation is configured in a very special way.

Access to the shares: clientconfig.depot.user

When using Samba 4 it might be necessary to configure the specific domain and user combination to be used for mounting the depot share.
The default configuration is just the user pcpatch and nothing as domain. If this fails because the mount defaults to the wrong domain, you should configure the correct domain (in most cases: the hostname of the opsi-server).
The config parameter is named: clientconfig.depot.user.
The value of this config has the syntax: <domain name>\<user name>
An example config:clientconfig.depot.user = opsiserver\pcpatch
specifies, that the opsi depot share is mounted as domain opsiserver and user pcpatch.
You may create such a configuration using the opsi-configed:
Server configuration / clientconfig / right mouse button: add standard configuration entry.
You may also use the command line to create this configuration (replace pcpatch by the string you need e.g. opsiserver\pcpatch:

/var/lib/opsi/workbench (or an differently configured path on the depot)

/etc/opsi

You may give a directory name as argument to set only the access rights below this directory.
e.g.opsi-setup --set-rights /var/lib/opsi/depot/winxppro/drivers

--init-current-config
initialize the configured backend. Should always be invoked after changing the file/etc/opsi/backendManager/dispatch.conf

The commands:--update-mysql--update-file
are used to upgrade the backends from one opsi release to the next one.
For details see the releasenotes-upgrade-manual.

--configure-mysql
does the first time database setup.

--edit-config-defaults
To edit the default values of some configuration data like in the server
configuration of the opsi-configed.

Figure 48. Dialog: opsi-setup --edit-config-defaults

e.g.:

clientconfig.depot.id

The name of the default depot server.

clientconfig.depot.drive

The drive letter used for mounting the share with the installation data. You can either select a drive letter or dynamic. With dynamic the client will try to automatically select an drive letter from those not in use.

license-management.use

Defines if netboot products should get license keys from license management or from product properties.

product_sort_algorithm

Defines the algorithm which is used to calculate the product installation sequence.

--cleanup-backend
Checks the current backends for integrity and removes obsolete or unreferenced entries.
Examples for entries that may be removed are products without reference (not installed on depot / client), host-groups without a parent and configstates without corresponding config.

Note

It is common good practice to create a backup through opsi-backup before cleaning the backend.

--auto-configure-dhcpd
Creates the by opsi needed entries in the configuration file of the DHCP daemon.
Don’t use this if you not plan to use the dhcpd on the opsi server.
More details in the opsi-getting-started manual

Tool: opsi-package-manager - (de-)install opsi-packages

The opsi-package-manager is used for (de-)installing opsi-product-packages on an opsi-server.

In order to install a opsi-product-package, this opsi-product-package must be readable for the opsi system user opsiconfd. Therefore it is strongly recommended to install those packages from the directory /var/lib/opsi/workbench (or a sub directory).

The log file of the opsi-package-managers you will find at /var/log/opsi/package.log.

Tool: opsi-package-updater

The command line utility opsi-package-updater is designed to download and install comfortable opsi packages from one or more repositories or another opsi server.
Using opsi-package-updater makes it easy to keep the products on an opsi server up to date. It may be also used in a cronjob to keep depot server in sync with the primary server.

Repositories are the sources which will be used by the opsi-product-update to fetch new opsi packages.

Each repository can be configured in terms of access information and behaviour.

General configuration will be done at the configuration file /etc/opsi/opsi-package-updater.conf.

Usage

--help shows a small help.
opsi-package-updater works with different modes. Each brings it’s own help with them.

# opsi-package-updater --help
usage: opsi-package-updater [-h] [--version] [--config CONFIGFILE]
[--verbose | --log-level {0,1,2,3,4,5,6,7,8,9}]
[--force-checksum-calculation]
[--repo repository_name]
{install,update,download,list} ...
Updater for local opsi products.
optional arguments:
-h, --help show this help message and exit
--version, -V show program's version number and exit
--config CONFIGFILE, -c CONFIGFILE
Location of config file
--verbose, -v increase verbosity (can be used multiple times)
--log-level {0,1,2,3,4,5,6,7,8,9}, -l {0,1,2,3,4,5,6,7,8,9}
Set the desired loglevel.
--force-checksum-calculation
Force calculation of a checksum (MD5) for every
package. Default is to use existing checksums from the
.md5-file of a package if possible.
--repo repository_name
Limit the actions the given repository.
Mode:
{install,update,download,list}
install Install all downloadable packages from configured
repositories (ignores excludes)
update Update existing packages from repositories.
download Download packages from repositories. This will not
install packages.
list Listing information
Modes have their own options that can be viewed with MODE -h.
# opsi-package-updater download --help
usage: opsi-package-updater download [-h] [--force]
[productID [productID ...]]
positional arguments:
productID Limit downloads to products with the given IDs.
optional arguments:
-h, --help show this help message and exit
--force Force the download of a product even though it would otherwise
not be required.
# opsi-package-updater list --help
usage: opsi-package-updater list [-h]
[--repos | --active-repos | --packages | --packages-and-installationstatus | --package-differences | --updatable-packages | --search-package text]
optional arguments:
-h, --help show this help message and exit
--repos Lists all repositories
--active-repos Lists all active repositories
--packages, --products
Lists the repositories and the packages they provide.
--packages-and-installationstatus, --products-and-installationstatus
Lists the repositories with their provided packages
and information about the local installation status.
--package-differences, --product-differences
Lists packages where local and remote version are
different.
--updatable-packages, --updatable-products
Lists packages that have updates in the remote
repositories.
--search-package text, --search-product text
Search for a package with the given name.

There are some common options.

--verbose increases the amount of shown messages. This can be given multiple times to increase verbosity. A specific log level can be given through --log-level. Both options only affect the output in the terminal.

--repo <name of a repository> limits the actions to the given repository. Available repositories can be shown with list --active-repos.

The different modes result in different behaviour.
The modes install, update and download load packages from a repository, whereas list is used to show information.

The mode install installs new packages.
The mode update updates already installed packages.
Both modes require no further parameters.

Example: Installing all available packages from all repositories:

opsi-package-updater install

The modes install and update allow to limit the actions to specific products by handing over their ID.

Example: Updating the packages for the products firefox and javavm:

opsi-package-updater -vv update firefox javavm

In combination with the --repo switch the package source can be limited.

Example: Installing the package for ubuntu from the repository uib_linux:

opsi-package-updater -vv --repo uib_linux install ubuntu

The mode download allows to download packages without installing them afterwards.
The switch --force forces the download of a package even though this version is already installed on the server.

Through list --active-repos the active repositories are shown.
The information consists of name, address and if applicable the description of the repository.

Through list --products the available products per repository are shown.

To show the possible updates use list --updatable-products.
This only considers already installed products.
After that the update can be started through update.

as an alternative to password protected repositories, you can use certifcate authentification if the repository has this possibility. For that you need to configure authcertfile and authkeyfile with the full path to the clientcertificate file and its keyfile.

A repository is of kind opsi-server if the repository configuration has the ID of another opsi-server set at opsiDepotId.

opsiDepotId = mainserver.my.lan

On a opsi-depot-server there is usually the central config server set.
This results in opsi-package-updater fetching the packages from the directory /var/lib/opsi/repository of the given server.

Repository Configuration: Behaviour

For each repository you have to configure which actions to run:

autoupdate: Newer versions of installed packages will be downloaded and installed

autoinstall: Also packages which are not installed yet, will be downloaded and installed

autoinstall: For all new installed packages and all clients on which these packages are installed the action request will be set to setup.

onlyDownload: New packages are only downloaded and no further actions are done.
A common use case is to use this option together with notifications so that after the download of new packages a mail informs an administrator about the new packages and the administrator will manually install the new packages at a later time.

In addition it is possible to send all these clients a Wake-On-LAN signal to install the new software to the clients. Using the opsi-product shutdownwanted you can make sure that the clients will be powered off after the installation.

time window for autosetup: You can give time window which may be used to that client action requests to setup.

Automatic WakeOnLan with shutdown: If there is new software Clients could be waked up and shutdown after installation automatically

Tools: opsi-admin / opsi config interface

Overview

opsi V3 introduced an opsi owned python library which provides an API for opsi configuration. The opsiconfd provides this API as a web service, whereas opsi-admin is the command line interface for this API.

opsi-admin can use the opsi web service or directly operate on the data backend. To work with the web service you have to provide the URL and also an username and password. Due to security reasons you probably wouldn’t like to do this from within a script. In that case you’d prefer direct access to the data base using the -d option: opsi-admin -d.

In interactive mode (start with opsi-admin -d or opsi-admin -d -i -c or short opsi-admin -dic) you get input support with the TAB-key. After some input, with the TAB-button you get a list or details of the data type of the next expected input.

The option -s or -S generates an output format which can be easily parsed by scripts.

There are some methods which are directly based on API-requests, and there are some tasks, which are a collection of function calls to do a more complex special job.

Typical use cases

Set a product to setup for all clients which have this product installed.

Server processes: opsiconfd and opsipxeconfd

The opsipxeconfd provides the named pipes in the tftpboot directories. which are used to control the PXE boot process.

The configuration file is /etc/opsi/opsipxeconfd.conf

The log file is /var/log/opsi/opsipxeconfd.log.

The opsiconfd provides the opsi API as JSON web service and have a lot of other important tasks. Therefore the opsiconfd is the central opsi service and does all the communication to the clients.

Regarding this central rule, a tool to monitor this process gives a lot of information about load and possible problems. This tool is the opsiconfd info page.

opsiconfd monitoring: opsiconfd info

Using the web address https://<opsi-server>:4447/info you will get a graphical chart of opsiconfd load and cpu/memory usage in the last hour/day/month/year. This information is completed by tabulary information to the actual tasks and sessions.

Figure 50. opsiconfd info: opsiconfd values from the last hour

Figure 51. opsiconfd info: opsiconfd values from the last day

Server process: opsi-tftpd-hpa

The opsi-tftpd-hpa bases on the standard tftpd-hpa with the additional feature to handle named pipes.

By default the opsi-tftpd-hpa is configured to run with an own systemd service file.

As the packages is sinstalled by the installer, the package features a simple level of verbosity. To change this level and get additional information one has to do the following:

# systemctl edit --full opsi-tftpd-hpa.service

The parameter -v has to be replaced by --verbosity 7. Afterwards the service needs a restart.

# service opsi-tftpd-hpa restart

Caution

on Debian 8 the edit operation is not available. However there is a workaround:

Every object has a set of operators which can be used to work with this object. Most time these operators are:

getObjects (returns the objects)

getHashes (We recommend to use getObjects)

create (create one object comfortable)

createObjects (create one or more objects, existing objects will be updatet)

delete (delete one object)

deleteObjects (delete one or more objects)

getIdents (returns the object id’s)

insertObject (create a new object, if the obect exists, it will be updatet)

updateObject (update a single object, if the object doesn’t exists no object will be created. We recommend to use insertObject instead.)

updateObjects (update a bundle of objects, if the objects doesn’t exists they will not be created. We recommend to use createObjects instead.)

The method names are concatenated:

<object name>_<operation>

According to this naming rule, these new methods are easily to difference from the old legacy opsi 3 methods, which almost start with get, set or create.

The getObjects methods have two optional parameters:

attributes

filter

The attributes parameter is used query only for some properties of an object. If you are using attributes the returned object has all attribute keys, but only values the attribute you asked for and for all attributes which are used to identify this object. All other attributes have the value none.

For Example you will get by calling the method product_getObjects with attributes:["name"] for the product javavm:

If you don’t want to ask for attributes but instead you need to use the second parameter filter you have to pass the attribute parameter as [].

The parameter filter is used to define which objects you want to get. For example if you are using the filter { "id":"javavm" } on the method product_getObjects you will get only the object(s) which describe the product javavm.

If you are using methods which expect one ore more objects, these objects have to be given as JSON objects or as an array of JSON objects.

Note

A configState object can’t be created without an existing config object to refer to.

auditHardwareOnHost (client specific hardware information)

Describes the detected hardware types (including the client specific values). The idea is that you can see here the client specific data and in auditHardware only one entry for a network card which is used in all your computers.
Unfortunately in reality this doesn’t work as you might expect.

The attribute state describes if this is current (value = 1) or historic (value = 0) data.

auditHardware (client independent hardware information)

Describes the detected hardware types (independent from client specific values). The idea in this object is to see client specific data and in AuditHardware only the generic. That way, for example, you can see here only one entry for a network card, which is used in all your computers.
Unfortunately in reality this idea doesn’t work as you might expect.

auditSoftwareOnClient (client specific software information)

Describes the detected software types (including the client specific values). The idea is that you will see here the client specific data and in auditSoftware only one entry for a office software which is used in all your computers.

Communication with hosts

The hostControl methods are used to communicate and control the clients.
Since opsi 4.0.3 we strongly recommend to use the hostControlSafe methods.
All hostControlSafe or hostControl Methods have as last parameter the hostIds. The hostIds are the list of clients this method should work on.
In all hostControlSafe methods this parameter is not optional, if you want to send a method to all clients you have to give a "*". In the older hostControl methods it is allowed to omit this parameter, which means send to all. This has caused some trouble to people which tried this with methods like
hostControl_reboot. So with opsi 4.0.3 we broke the backward compatibility and now an empty hostIds is not any more allowed for the hostControl_reboot and hostControl_shutdown methods.

hostControlSafe_execute
Excute a command on the client.
Connect to the opsiclientd of the given hostIds and tell them to start command.
Parameters: command hostIds

hostControlSafe_fireEvent
Starts a opsiclientd event on the client.
Connect the opsiclientd of the given hostIds and tell them to start the event.
Parameters: event hostIds

hostControlSafe_getActiveSessions
Get information of the logged on users on the client.
Connect the opsiclientd of the given hostIds and ask for the active sessions.
Parameters: hostIds

hostControlSafe_opsiclientdRpc
Run the web service method of the opsiclientd.
Connect the opsiclientd of the given hostIds and tell them to run the web service method using the given parameters. This is the most generic hostControlSafe method, because you may start any possible method. The best way to find out what is possible, is to have a look at control interface https://<clientId>:4441
Parameters: method *params hostIds

hostControlSafe_reachable
Checks if the opsiclientd is reachable.
Connect the opsiclientd of the given hostIds but do not login.
Parameters: hostIds

hostControlSafe_reboot
Reboot the clients.
Connect the opsiclientd of the given hostIds and starts a reboot.
Parameters: hostIds

hostControlSafe_showPopup
Shows a pop up message on the clients.
Connect the opsiclientd of the given hostIds and starts a pop up windows with the message.
Parameters: message hostIds

hostControlSafe_shutdown
Shutdown the clients.
Connect the opsiclientd of the given hostIds and starts a shutdown.
Parameters: hostIds

hostControlSafe_start
Sends a wakeOnLan signal the clients.
This is the only hostControlSafe method that is not use by the opsiclientd from a client.
Parameters: hostIds

hostControlSafe_uptime
Asks for the clients uptime.
Connect the opsiclientd of the given hostIds and get the clients uptime in seconds.
Parameters: hostIds

log_write
Writes a opsi log file to the server.
Parameters: logType data *objectId *append
Logtypes and objectId see above, append (true/false) (Default = false) should the log be appended to an existing log.

====== Tutorial: Working with groups

The following tutorial will show how to use the opsi interface from the commandline and work with groups of hosts in opsi.

We want to work with group objects and therefore need to work with those functions whose names start with group.
Opsi does distinguish between groups of the type ProductGroup and HostGroup. The first is used for product groupings and the last is used for grouping hosts.

Creating a group of hosts is possible through the method group_createHostGroup. The parameters of the method are id, a description, notes and the parentGroupId (ID of the parent group). Only the ID is required - everything else is optional. The ID is also the name of the group.

Important

In opsi 4.0 groups are identified by their ID. This ID must be unique throughout the opsi groups.

To create a first group from the commandline we can now issue the following command:

We can use the call to group_getObjects from earlier to see that our group was indeed created.

Opsi has a default group that behaves like a directory service - i.e. OpenLDAP - that means, that a client can only be member of one group. There is a root group with the ID clientdirectory that assumes that exact behavior for any group / client inside. Any client not in a subgroup of clientdirectory will be moved to another special group with the ID NOT_ASSIGNED.
Anyone working with that groups is responsible that clients are not member of multiple subgroups of clientdirectory.

Working with the clients is easy now. You probably have noticed that our earlier query to opsi did not show us any signs of clients. That is because the assignment from a client to a group is taken care of another type of object: objectToGroup.

Finally you may want to clean up the groups we created earlier. The following statements will do this for you:

opsi-admin -d method group_delete "rechner_wenselowski"

Action oriented methods

The action oriented methods where introduced in opsi 3.
These methods are still available and will still be maintained.
Technically methods are mapped to the object oriented methods internally.

Here comes a short list of some methods with a short description. This is meant mainly for orientation and not as a complete reference. The short description does not necessarily provide all information you need to use this method.

Restores the data from the backup file opsi_backup.tar.bz2, which is searched for in the current directory.

Basic parts of opsi

opsi may be divided in five different parts which may be backed up or not. The location where to find this part may vary (by Linux distribution, version and configuration).

Opsi configuration

The most important part of opsi is the configuration. You will find it at /etc/opsi.

This directory contains configuration for the backends, the webservice and also the SSL certificate used by the webservice.
Backend extensions are also stored here, aswell as the configuration for opsipxeconfd, opsi-package-updater with his repositories and the modules file.

For a disaster recovery /etc/opsi has to be backed up.

This part will be backed up by opsi-backup.

Opsi backends

The data about the managed clients and the products might be stored in different backends. The most important backends are:

Table 1. opsi backends

Backend

Description

file-Backend

File based backend (default backend)

mysql-Backend

MySQL based backend (since opsi 4 for all configuration data)

dhcp

Special backend which is used in combination with a dhcpd at the opsi-server

Different backends may be used for different purposes at the same time. So you should have a look at the /etc/opsi/backendManager/dispatch.conf to see which backends you are using.

This part will be backed up by opsi-backup.

opsi depot share

At the opsi depot share you will find the installation files of the software to be installed on the clients by opsi. The directories which contain these files (Local boot products and netboot products) are located at /var/lib/opsi/depot.

Older versions of opsi used the directory /opt/pcbin/install for this. If it’s still present it may be symlinked towards the new location.

Depending on how many operating systems, drivers, software, etc is located here, this part may have a huge extent.

This part will not be backed up by opsi-backup.

So if you like to backup this part, you may use rsnapshot or other backup utilities.

opsi work bench

The opsi work bench is the location which is used to create own packages. It is usually located at /var/lib/opsi/workbench and exported as the samba share opsi_workbench. Because this directory holds your own work, it should be backed up.

This part will not be backed up by opsi-backup.

To backup this part you may use rsnapshot or other backup tools.

Note

Since opsi 4.1 this directory can be configured on a per depot basis. Different paths can be possible.

Note

Before opsi 4.1O on non-SLES systems this path was to be found at /home/opsiproducts.

opsi repository

The directory /var/lib/opsi/repository is used to store opsi packages, which are downloaded by the opsi-package-updater or which are installed by the opsi-package-manager when using the -d option.

This part will not be backed up by opsi-backup.

So if you like to backup this part, you may use rsnapshot or other backup utilities.

TFTP directory

The TFTP directory contains configuration files for booting via PXE.
This directory can be found under /tftpboot/ on most systems. On openSUSE and SLES this is /var/lib/tftpboot/opsi/.
Files that may have been changed are i.e. linux/pxelinux.cfg/default.menu or linux/pxelinux.cfg/default.nomenu.
During the installation of opsi-linux-bootimage these files are filled with default values. They are not required in case of a disaster recovery.

This part will not be backed up by opsi-backup.

The program opsi-backup

opsi-backup is a command line program which makes it easy to create and restore opsi data backups.

The basic commands are create, restore and verify.
The option --help displays information about the accepted command line options. Use also <command> --help (e.g. opsi-backup create --help) to get information about command options.

opsi-backup --help

The opsi-backup utility stores the configuration and backend data in nearly the same format as they were found at the server. So you may not restore these data to a server which uses other backends, has other opsi versions or is in any other way different regarding the opsi data structures.

opsi-backup creates always a full backup. There is no support for incremental or differencial backups.

Caution

opsi-backup creates a backup file, which is a compressed tar file. So you may access the data using other standard tools.

Caution

A backup file created by opsi-backup may contain passwords, hot-keys and other security-related data. So be sure to store the backup files at a secure place.

Create a backup

To create a backup call opsi-backup create.
This command (without any additional options) will create a backup of all configuration data and all used backends. The backup file will be stored at the current directory with an automatically generated name.
To get information about the possible options of create callopsi-backup create --help

You may give the target directory or the full path to the backup file as option to opsi-backup create. If the given option is a filename, the backup will be created in this file - existing files will be overwritten. If the given option is a directory, the backup file will be crated in this directory with a generated filename using the pattern: <hostname>_<opsi-version>_<date>_<time>

--backends {file,mysql,dhcp,all,auto}
is used to select the backends which shall be included to the backup. You may give this option multiple times.
The option --backends=all includes all supported backends.
The default is --backends=auto, which means that opsi-backup reads the configuration file /etc/opsi/backendManager/dispatch.conf and backups all supported backends used in this configuration.
The supported backends are: mysql, file, dhcp

--flush-logs
The backup of the mysql backend uses the mysqldump command. This means that all data known by the database are backed up, no matter if they are on disk or only in the memory yet. This means, that your backup may be more topical than your database files (which is really not a problem).
If you want to make sure, that the database stores all data to the disk before starting the backup, you may use the --flush-logs option. But before you may do this, you have to grant the required RELOAD-privileges to the opsi database user, or your backup will fail. Check: RELOAD.
So use this option only if you really know what you are doing.

Archive your backup files

opsi-backup has no features to archive the created backup files. So you have to do it by yourself (e.g. using a file backup tool).
If you call opsi-backup with a target directory as option, please keep in mind that every call creates a new full backup file and no older files will be deleted.

Verify a backup

The command opsi-backup verify is used to test the internal integrity of the created backup file.
Special help for the opsi-backup verify command is available by the command option --help.

--backends {file,mysql,dhcp,auto,all}
Specifies the backend to restore. This option may be used multiple times.
The option --backends=all specifies that the data from all backends which are found in the backup file shall be restored.
The default is --backends=auto. This restores the data from the backup file to the system using the actual configuration data from /etc/opsi/backendManager/dispatch.conf.

Caution

If you changed your backend configuration since you have created the backup, no or not all data will be restored. In this case you have to use the --backends=all option and then to convert the restored data to the now used backend using opsi-convert.

--configuration
Specifies that the opsi configuration has to be restored.
This option is not default at restore command.

opsi-backup restore --configuration opsi_backup.tar.bz2

-f, --force
To avoid data damage opsi-backup makes a system compatibility check (opsi Version, OS-Version, Host- and Domain Name) before restoring data and aborts if the actual system differs from the system the backup file was created on. Using this option you may override this check.

If a backup is restored to a server and no backup for the depot folder exists there is the possibility to use opsi-package-updater and opsi-package-manager to download all packages from the repositories again and install them.
Manual changes made in the depot have to be applied again afterwards.

mysql backend

mysql backend for inventory data

Inventory data at the file backend is stored in structured text files by default. This type of storage is not very useful if you wish to form free queries on these data. In order to allow free queries and reports, a mysql based backend for the inventory data has been introduced.

The main features of this backend are:
* only for inventory data free (for other data it’s part of a co funding project until now)
* optional (not the default backend)
* a very fine granulated data structure with an additional table to make queries easier.
* a history function which tracks changes in the inventory.

Regarding the very different structure of the components in the inventory the resulting data structure is complex.

The table hosts comprises all known hosts. For every device type we use two tables: The HARDWARE_DEVICE_ .table describes the model without individual aspects like the serial number. The HARDWARE_CONFIG table stores these individual and configuration data.

These both tables are connected via the field hardware_id. This is the resulting list of tables:

Name
This is the windowsDisplayName or, if this entry isn’t found at the registry, it is the windowsSoftwareId. Both values come from the registry:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\UninstallHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<id> DisplayName

The mysql backend has a high performance which is important for large installations.

Here a data structure overview:

Figure 53. data base schema: configuration data

Initializing the MySQL-Backend

First, the mysql-server has to be installed (if not done yet):

apt-get install mysql-server

In the next step the administrative password for the mysql-server has to been set:

mysqladmin --user=root password linux123

Caution

Since MySQL server version 5.7 the strict mode is enabled by default. This mode prevents the command opsi-setup--configure-mysql to finish properly, with the correct configurations. To disable the strict mode please edit the file /etc/mysql/mysql.conf.d/mysqld.cnf.
In the [mysqld] section add the following line underneath the section name:sql_mode=NO_ENGINE_SUBSTITUTION

Now the service mysql has to be restarted: systemctl restart mysql.service

The command

opsi-setup --configure-mysql

will now initialize the mysql backend.

A example session:

Figure 54. Dialog: opsi-setup --configure-mysql

Figure 55. Output: opsi-setup --configure-mysql

All the queries(except the password) can be taken by default by pressing ENTER.

As next step you have to configure how (which methods) opsi should use with the backend. Therefore please edit the file /etc/opsi/backendManager/dispatch.conf.

You can find a detailed description for this configuration at the getting started manual. The configuration file also contains a lot of examples of typical configurations.

A configuration for the use of the mysql backend (without internal dhcpd) looks like this:

Caution

The service opsiconfd does not have a dependency to MySQL as default.
This is due to the fact that opsi can be run without using MySQL, and because not every init-system does support requirements between services.
Please refer to the documentation of your operating system on how to configure this.

Configure the mysql database for access from outside the server

The used database must be configured in a way that allow external access.
This usually means that connection from other sources as localhost must be
accepted.

Please refer to the manual of your used database for further information.

HostControl backend

The HostControl backend does not store any information. It is a special backend to control the opsi clients.

Typical tasks are to send Wake-On-Lan signals and send control signals to the opsi-client-agent.

The HostControl backend is configured by the configuration file /etc/opsi/backends/hostcontrol.conf. Configuration options are here:

opsiclientdPort:
Network port to contact the opsi-client-agent.

hostRpcTimeout:
Timeout (in seconds) connecting a opsi-client-agent.

resolveHostAddress:
This option controls whether the name resolution of a opsi-client address is primary done by the opsi database or by the name resolution of the operating system of the opsi-server.
If this option is True, the opsi-server tries at first to get the IP-Address of a opsi-client by the name resolution of the operating system (DNS, /etc/hosts) and if this fails the opsi database is used.
To use the opsi database, first you have to set this option to False.

maxConnections:
Maximal number of concurrent connections to opsi-client-agents.

broadcastAddresses:
Assignment of broadcast addresses and ports to use to send Wake-On-Lan broadcasts.
Ports can be configured for each broadcast address independently.

HostControlSafe-Backend

The default behavior of opsi4.0 methods called without any parameter is, that it matches all existing objects. For instance the command "host_getObjects" without any parameters results in returning all existing host objects. This could be dangerous when using the HostControl-Backend. Especially with commands like: hostControl_shutdown and hostControl_reboot. In these cases calling the method without any parameter would shutdown or reboot all the clients.

Therefore with service release opsi 4.0.3 two changes were introduced:

The methods hostControl_shutdown and hostControl_reboot don’t have the standard behavior anymore and result in an error message when they are called without any parameter.

A new backend is introduced (HostControlSafe backend), that results in an error message for all of the methods, if they are called without any client parameter. To explicitly address all of the clients by a HostControlSafe-Backend method, the wildcard * can be used:

opsi-admin -d method hostControlSafe_shutdown *

So for the reasons mentioned above, we recommend to use the hostControlSafe methods at the console or especially with little experience in using the service methods.

Conversion between different backends

The command opsi-convert converts the opsi configuration files from one backend to another. The target or the source can be assigned in different ways:

backend name:
A backend on the current server can be addressed with just the backend name. The command opsi-convert file mysql converts the data base of the current server from file backend to the mysql backend.

Service address
Providing a fully qualified service address allows access to a remote servers data base (after passing the users password). The service address looks like https://<username>@<ipadresse>:4447/rpc.
You will be asked for the passwords.
The conversion command looks like that:

Configuration directories
With the declaration of a configuration directory for the specified backend manager configuration source or target can be described in detail.

opsi-convert --help
Usage: opsi-convert [options] <from> <to>
Convert an opsi database into an other.
Options:
-h show this help text
-V show version information
-q do not show progress
-v increase verbosity (can be used multiple times)
-c clean destination database before writing
-s use destination host as new server
-l <file> log to this file
<from> and <to> can be:
- the name of a backend as defined in /etc/opsi/backends (file, ldap, ...)
- the url of a opsi configuration service
http(s)://<user>@<host>:<port>/rpc

Boot files

/tftpboot/linux contains the boot files needed for the system start with the PXE boot proms.

Securing the shares with encrypted passwords

The opsi-client-agent accesses the shares provided by the opsi-server to get the software which have to be installed at the client.

The mount of these shares is done by using the user pcpatch. That these shares are not public and have to be mounted using a password is important for:
* general system security and data integrity
* meet the license agreements of special software packets

To give the client task opsi-client-agent access to authentication data, the server creates a specific key (opsi-host-key) when creating a client. This key is stored (at the file backend) in the file /etc/opsi/pckeys and is passed to the PC with the (re)installation request. The opsi-client-agent will store this key in the local file c:\program files\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf
during system installation (access rights limited to the administrators). Also, on the server, the file /etc/pckeys is only accessible by the user root and members of the group opsiadmin. This way every PC has got an unique key only known to the client itself and the opsi-server, not accessible by client standard users. The key is used to encrypt the password of the user pcpatch. The encrypted password will be transferred to the client at boot time via web service. Hence the servers pcpatch password can be changed any time. The new encrypted password will be sent to every client at the next reboot.

5.7. Important files on the depot servers

Configuration files in /etc

/etc/hosts

The hosts file stores all IP addresses and IP names known to the network. The IP addresses and names of all clients have to be entered here. There might be aliases (additional names) and comments (starting with #).

opsi needs full qualified host name (including the domain name) and this might come from the /etc/hosts as well from the DNS.

If the result isn’t like that and contains for example 127.0.0.1 or localhost you should correct your /etc/hosts or your DNS before you continue with the installation.

/etc/group

The required opsi groups are pcpatch and opsiadmin.
All users who are administrating opsi packets need to be member of the pcpatch group.
Membership of the group opsiadmin allows users to connect to the opsi web service (for instance using the opsi-configed).

/etc/opsi/backends/

Configuration files for the used backends.

/etc/opsi/backendManager/

acl.conf
Configuration of the access control lists to the opsi methods.
This allows restricting access to the base methods of the opsi webservice for users and attributes.

dispatch.conf
Configuration which of the in /etc/opsi/backends/ configured backends should be used for which method.

extend.d/
Directory for backend extensions. For example this is be used to implement the old opsi 3 methods which are mapped to the new opsi 4 methods.

/etc/opsi/hwaudit/*

Since opsi V3.2

Here the configuration files for the hardware inventory are to be found. The directory locales holds the language specifications. The file opsihwaudit.conf specifies the mapping of WMI classes to the opsi data management.

/etc/opsi/opsi.conf

Since Version 4.0.2-2

General opsi configurations.

Example:

[groups]
fileadmingroup = pcpatch

Background:
The classical opsi installation with a user named pcpatch and a groeu named pcpatch do not works with samba 4 based distributions. The reason is, that with samba 4 we have the rule (from Active Directory) that a user and a group can not have the same name.
So for all samba4 based distributions the file /etc/opsi/opsi.conf is be used to defin the name of the group that have read and write permissions to most files of an opsi installations. The name of these group is opsifileadmins at the samba4 based distributions.
Everybody who need these access rights (e.g. people who build and install opsi products) should be member of this group.

/etc/opsi/modules

Since opsi 3.4

The opsi activation file.

This is by the uib gmbh signed file which is used to activate not free features of opsi. Any change on this file will invalidate the activation. Without this file (or with a invalid file) you may only use the free feature of opsi.

Directory /etc/opsi/modules.d/

Since opsi 4.1.

Directory for future use.

/etc/opsi/opsiconfd.conf

Since opsi V3

Configuration file for the opsiconfd service including configurations like ports, interfaces, logging.

/etc/opsi/opsiconfd.pem

Since opsi version 3.0

Configuration file for the opsiconfd holding the ssl certificate.

/etc/opsi/opsipxeconfd.conf

Configuration file for the opsipxeconfd in charge for writing the start-up files for the Linux boot image. You can configure directories, defaults and log level here.

Boot files

Boot files in /tftpboot/linux

install and miniroot.gz
Installation boot-image which will be loaded by the client (per tftp) during a re-installation.

Boot files in /tftpboot/linux/pxelinux.cfg

01-<mac adresse> or <IP-NUMMER-in-Hex>
Files named by the clients hardware address (prefix 01-) are stored on the opsi-server as client-specific boot files. Usually they are named pipes created by the opsipxeconfd as to initiate the (re)installation of clients.

default
The file default is loaded if no client-specific file is found. This initiates a local boot.

install
Information for the boot of the install boot image which will be used by the opsipxeconfd to create the named pipe.

Files in /var/lib/opsi

/var/lib/opsi/depot

This directory is exported as read only Samba share opsi_depot.

/var/lib/opsi/ntfs-images

This directory holds (per default) the partition image files which are produced by the netboot product opsi-clonezilla.

/var/lib/opsi/repository

This is the place where opsi-product-packages are saved, which are loaded by the calls of the opsi-package-updater to the server.

This is also the place where opsi-product-packages are saved, which are installed by the calls of the opsi-package-manager if it is called with the option -d.

/var/lib/opsi/workbench

This is the location used to create your own packages.

Other directories

The other directories in /var/lib/opsi (config and audit) are directories of the file backends, which are described in the following chapters.

Files of the file backend

/etc/opsi/pckeys

In this file the opsi-host-keys, specified for each computer, are stored.

[Package]-Version
is for different package versions from the same product version. This helps to distinguish packages build from the same product version but with different opsi-winst script for instance.

[Package]-depends
refers to an package required for installation of this package on an opsi-depot-server.
Specific versions can be configured when given in parenthesis after the package name.
One of the following operators must precede the version inside the parenthesis: =, <, <=, >, >=.

[Package]-Incremental
This is an obsolete, effectles setting which is not set in new packages with opsi 4.1 anymore.
This entry can be removed.

[Product]-type
marks the product type as localboot or netboot.

[Product]-Id
is the general name of that product (like firefox), independent from the product version.

[Product]-name
is the full name of the product.

[Product]-Description
is an additional description for the product as shown in the opsi-configed as Description.

[Product]-Advice
is an additional hint for handling the product (caveats etc.) as to be shown in the opsi-configed as Note.

[ProductDependency]-Requiredproduct:
Product ID of the product to that a dependency exists.

[ProductDependency]-Required action:
The required action of the product, which the dependency entry refers to. Actions could be setup, uninstall, update…

[ProductDependency]-Required installation status:
The required status of the product, which the dependency entry refers to. Typically this is installed, which results in setting this dependency product to setup, if it isn’t installed on the client yet.

[ProductDependency]-Requirement type:
this is regarding the installation order. If the product, which the dependency entry refers to, has to be installed before the actual product installation starts, the Requirement type must be before. If the dependency product has to be (re-)installed after the actual product, the Requirement type is set to after. If there is no entry, the installation order is of no relevance.

Inventory data /var/lib/opsi/audit

Here you find the inventory data for hardware (.hw) and software (.sw).

opsi programs and libraries

Programs in /usr/bin

opsipxeconfd
opsi daemon to administrate the files required for the PXE boot of the clients.

opsi-admin
Starts the command line interface for the opsi python library

opsiconfd
opsi daemon which is the central opsi configuration daemon.

opsiconfd-guard
opsi daemon which monitors if the opsiconfd is running and restarts the opsiconfd if it isn’t running.

opsi-configed
Command to start the opsi management interface

opsi-convert
Script for converting between different backends.

opsi-makepackage
Script for packing the opsi-package (opsi-product)

opsi-newprod
Script for creating the structure and meta data files of a new opsi product

/var/log/opsi/clientconnect

In this directory are the log-files of the opsi-client-agent running on the client.
The client log files will be named <client FQDN>.log. On the client you will find this file at C:\opsi.org\log\opsiclientd.log.

/var/log/opsi/instlog

In this directory are the log-files of the opsi-winst running on the client. The client log files will be named <client FQDN>.log. On the client you will find this file at C:\opsi.org\log\opsiscript.log

/var/log/opsi/opsiconfd

In this directory are the log-files of the opsiconfd and the clients.
The client log files will be named log.<IP-number> and (if available) a symbolic link named <IP-Name>.log to log.<IP-number> is created.

/var/log/opsi/opsipxeconfd.log

Log file the opsipxeconfd
that administrates the tftp files for the PXE boot of the clients.

/var/log/opsi/package.log

Log file of the opsi-package-manager.

/var/log/opsi/opsi-package-updater.log

Log file of the opsi-package-updater.

tftp log in /var/log/syslog

The log of the tftpd you will find at /var/log/syslog.

c:\opsi.org\log\opsi_loginblocker.log

Log file of the opsi-login-blocker

c:\opsi.org\log\opsiclientd.log

Log file of the opsiclientd
This file is copied at the end of a event to server at /var/log/opsi/clientconnect/<pc-ipnummer.log>.

c:\opsi.org\log\opsi-script.log

Log file of the opsi-winst.
This file is copied at the end of a installation to server at /var/log/opsi/instlog/<pc-ipnummer.log>.

5.8. Upgrade of a opsi-server

Please refer to the special releasenotes-upgrade manuals.

5.9. Notes on file structure on UCS 4.X systems

Compared to Ubuntu or Debian the files of the opsi-linux-bootimage are stored in another directory, namely:

/var/lib/univention-client-boot

Earlier versions of the opsi-linux-bootimage package had filesn stored in the directory /tftpboot/linux and linked the content to /var/lib/univention-client-boot. This changed with the release of opsi 4.1. the opsi-linux-bootimage of opsi 4.1 directley installs the files into /var/lib/univention-client-boot. After the opsi-atftpd received a patch to support files larger than 90MiB the opsi 4.1 opsi-linux-bootimage adapted to opsi 4.0.
The file structure looks like this:

In opsi 4.1 the opsi-tftpd-hpa obsoleted opsi-atftpd and directly patches the service file to have the correct TFTPROOT directory.

In addition UCS 4.X needs a DHCP policy to support a PXE Boot. This policy can be found in the Policies section of the domain settings. Hereby the boot server need to be entered whereby the IP address represents the boot server and the file pxelinux.0 is the boot filename.

6. opsi-client

6.1. opsi-client-agent

Overview

To make Software distribution manageable for the system administrator, a client computer has to notice that new software-packets or updates are available and install them without user interaction. It is important to make user-interaction completely obsolete as the installation can run unattended this way and a user cannot stop the installation during the installation process.

These requirements are implemented in opsi by the opsi-client-agent:

On the client side the service opsiclientd examines usually at boot time, before the user logs in, whether an update has to be installed for this client.

If there are software packets to be installed on the client, the script processing program opsi-winst is being started to do the installation job. The server provides all the installation scripts and software files on a file share. At this time the user has no chance to interfere with the installation process.

As an additional option the module loginblocker can be installed to prevent a user login before the end of the installation process is reached.

Before any software can be installed with the opsi-winst program, it has to be prepared as opsi-product-package. For details see Chapter Integration of new software packets into the opsi software deployment from the getting started manual.

Directories of the opsi-client-agent

The opsi-client-agent is installed at %ProgramFiles%\opsi.org\opsi-client-agent.

This directory contains all programs of the opsi-client-agent like e.g. the opsiclientd, the opsiclientd notifier, the opsi-winst and some required libraries. Also we will find here the configuration files and graphical templates (skins) of the mentioned programs.

The directory %ProgramFiles%\opsi.org\opsi-client-agent is protected against manipulation by users without administrator privileges.
The directory %ProgramFiles%\opsi.org\opsi-client-agent\opsiclientd contains the configuration file of the opsiclientd and you need administrator privileges to read it.

There also is the directory c:\opsi.org.

This directory is used (at the moment) for caching installation files and data (see WAN-Extension). In future it will have some more functions like containing log files.
You need administrator privileges to read the directory c:\opsi.org.

The log files of the opsi-client-agent you will find in c:\opsi.org\log\.

The service: opsiclientd

The opsiclientd is the core of the opsi-client-agent. The opsiclientd starts at boot time and runs with administrative privileges.

The important features are:

Event based control:
The activity of the opsi client agent (opsiclientd) may be triggered by different events in the client system. According to this fact, the start of the installation can be triggered by the system start up event or can be configured to be triggered by some other system event.

Control via web service:
This interface is used for push installations and for maintenance purposes as well.

Remote configuration:
The configuration data for the clients may be changed (globally or client specific) at the server by editing the Host parameters.

The opsi-client-agent consists of multiple components :

opsiclientd: the main service

opsiclientd notifier: information and communication window

opsi-login-blocker: block the user login until the installation has finished

Installation

In case of automatic OS-Installation with opsi (not image based), the opsi-client-agent will be installed automatically.

You may set the action request uninstall to uninstall the opsi-client-agent.

opsiclientd

Core component of the opsi-client-agent is the service opsiclientd. This service starts at the boot time.

The opsiclientd has the following tasks:

while the system is booting and the opsiclientd is waiting for the GUI to come up, the block_login_notifier is started and shows a padlock at the right upper corner of the screen.

Getting in action if the configuration event takes place. In case of action the opsiclientd contacts the opsi server via web service (JSON-RPC) and asks for the configuration data and required actions.
The default event is gui_startup which will fire at boot time before user login.

Creates a named pipe which is used by the opsi-login-blocker to ask via JSON-RPC the opsiclientd when to unblock the login.

Starting the opsiclientd notifier as a thread for information and interaction with the user.

If needed, it connects to the opsi-depot to update the local installation of the opsi-winst and then starts it to process the action requests (software packet installations).

opsiclientd notifier

The opsiclientd notifier implements the interaction with the user. It displays status messages and may give the possibility to interact with the process.

There are different situations where the opsiclientd notifier will become active in different ways:

Caution

Names and functionality of the notifier have changed from opsi 4.0 to opsi 4.0.1.
The opsi 4.0 event notifier doesn’t exist anymore.
The opsi 4.0.1 event notifier equals the opsi 4.0 action notifier.
The opsi 4.0.1 action notifier has almost the same functionality as the opsi 4.0 event notifier, but it will only be activated if there is a action request.

opsi-login-blocker

The opsi-login-blocker for NT5 (Win2K/WinXP) is implemented as a GINA (opsigina.dll).
This GINA waits until the opsiclientd reports, that all product actions are finished or, if the opsiclientd is not reachable, until the connection timeout to the opsiclientd is reached (normally 120 seconds). Then the complete control is forwarded to the next GINA, which is normally the msgina.dll.

The opsi-login-blocker for NT6 (Vista/Win7) is implemented as a credential provider filter (OpsiLoginBlocker.dll).
This credential provider filter blocks all credential providers until the opsiclientd reports, that all product actions are finished or, if the opsiclientd is not reachable, until the connection timeout to the opsiclientd is reached (normally 120 seconds).

Processing sequence

How the opsiclientd works may be configured in many details. To understand these configuration options, it is necessary to understand the processing sequence. Here comes an overview of the work flow of a standard event like the event_gui_startup.

Figure 60. simplified work flow of a standard event

The most important parameters have the following relations:

Tip

If there is an error while connecting to the opsi-config-server, the log of this problem cannot be sent to the server. But you may find the log in the local log file opsiclientd.log in the log directory (c:\opsi.org\log\opsiclientd.log) at the client.

If an event fires, the event_notifier_command will be started.
Now the opsiclientd tries to reach the opsi-config-server using the url address.
If after user_cancelable_after seconds there is still no connection established, so the opsiclientd notifier will enable an Abort button. If no connection could be established in connection_timeout seconds, the opsiclientd connection process will be aborted and the event ends with an error message. To avoid a user from aborting, set user_cancelable_after = connection_timeout .

After a successful connection to the opsi-config-server, the opsiclientd checks if there are action requests for this client. If there are action requests and the action_warning_time > 0, the action_notifier_command will be executed.
This is normally the opsiclientd notifier, which shows now the list of action requests for this client for action_warning_time seconds.
Is the action_warning_time = 0 (default) the action_notifier_command will not be executed.
You may allow the user to suspend the process at this time by setting action_user_cancelable >= 0. The user may suspend the actions up to action_user_cancelable times. After action_user_cancelable aborts in sequence or if action_user_cancelable = 0 the user gets no possibility to suspend the actions.
In every case there will be a button which allows the user to start the installations immediately without waiting for the count down of action_warning_time seconds. The messages displayed by the opsiclientd notifier may be configured with the options action_message or action_message[lang] . This messages may contain the placeholders %action_user_cancelable% (total number of allowed suspensions) and %action_cancel_counter% (number of suspensions already used by the user).
If the actions are not suspended by the user, the action_cancel_counter will reset and the opsi-winst will be executed to process the action requests.

If the opsi-winst terminates with a reboot or shutdown request, the shutdown_notifier_command will be executed if shutdown_warning_time > 0.
The now starting shutdown_notifier_command shows for shutdown_warning_time seconds a message saying that the client will be rebooted. If shutdown_user_cancelable > 0 the user may suspend the reboot up to shutdown_user_cancelable times in sequence. If the user suspends the reboot, the shutdown_notifier_command will be restarted after shutdown_warning_repetition_time. The shutdown_notifier_command shows a message which may be configured by shutdown_warning_message or shutdown_warning_message[lang]. This message may contain the placeholders %shutdown_user_cancelable% (maximum number of allowed suspensions) and %shutdown_cancel_counter% number of suspensions already done by the user).
If the client is rebooted (by the user or the opsi-client-agent) the %shutdown_cancel_counter% will be reset.

Tip

The sequence of event processing and user actions is visualized as a timeline graphic at the info page of the opsiclientd.

Configuration

The following chapters shows how to configure the opsi-client-agent.

Configuration of different events

To meet the requirements of the various different situations in which the opsi-client-agent will become active, a slightly complex configuration is needed. To reduce the complexity, the configuration file uses something like inheritance.
In the opsiclientd configuration section headers like [event_<config-id>] introduce a new event configuration section. An event configuration may be disabled by setting the section option active = false.

There are different types of event configurations (type).

There are event configuration templates (type = template).
Event configurations may inherit configurations from another event. In this case the option super points to the other event to inherit all parameters from (excluding the parameter active). These inherited parameters may be overridden by local parameters in the current event section. So an event section needs only those parameters which are different from the super event.
Setting an event to active = false does not change anything in the inheritance process.

The other event types are:

gui startup
A gui startup event starts while booting the client and loading the graphical user interface (GUI). It is the most used event and set to active in the default configuration.

custom
Event configurations of the type custom are fired by a wql event. A wql event is defined by the corresponding wql statement in the event configuration. If the wql statement is empty, the event will never be fired, but can be executed from the interactive web interface.

user login
will be fired at the login of a user

timer
will be fired all interval seconds

sync completed
will be fired if the synchronization of configurations (sync_config_from_server) or products (cache_products) is completed.

sw on demand
will be fired by the user choosing Start actions now in the software-on-demand web page of the opsiclientd. It will never be fired if software-on-Demand is not used.

There are PreconditionsPreconditions define special system states (e.g. a user is logged on).
In the opsiclientd configuration a section header of the form [precondition_<precondition-id>] starts the declaration of a Precondition.
A Precondition is true, if all declared options are true.
An option not declared (but possible) is assumed as true.
Possible options for Preconditions are:

user_logged_in: is true if currently a user is logged on.

config_cached: is true if the caching of configuration data is completed (see: sync_config_from_server).

products_cached: is true if the caching of product files is completed (see: cache_products).

A Precondition can be assigned to an event configuration.
If there is a Precondition in an event configuration header, there also must be a configuration for this event without any precondition.
The event configuration with the precondition inherits all the parameters from the event configuration without precondition.
If the event is fired, first it will be checked which preconditions are true. If there is no precondition true, the configuration without precondition is used.
Is one precondition true, the configuration is used, which is bound to this precondition.
If more than one of the preconditions are true, the most specific event configuration is used (which is the configuration with the most matching options).

A small example for a better understanding:
While installing software it may be necessary to reboot the computer. Is there currently a user logged on, you should warn about the pending reboot. This warning should have a timeout and it may make sense to ask the user, if the reboot should be canceled (at the moment).
Is there no user logged on, it makes no sense to ask and wait for an answer. So in this case the reboot should take place immediately.
To handle these different situations, we configure the event_on_demand in the following way:

We define a Preconditionuser_logged_in which comes true if a user is logged on to the system (user_logged_in = true).

In the default configuration for the event event_on_demand (without any Precondition) we set shutdown_warning_time = 0 (immediate reboot without warning).

At the configuration event_on_demand{user_logged_in} we set shutdown_warning_time = 300 (warning with 300 seconds timeout).

Proxysupport-Configuration

In the global section of opsiclientd.conf you have the option to define a proxyserver that will be used by the opsi-client-agent.
If a proxyserver is defined in config, all HTTP- and HTTPS-Connection of the opsiclientd will be redirected to this proxyserver.

This proxy settings allows also to use a proxyserver, that require authentication.
In that case you must define the credentials as shown in the configuration snippet.

Warning

The option proxy_mode is reserved for the value system to use on the system proxy settings. This feature is not implemented yet. Therefore the only option that works at the moment is the static mode.

Event configuration to control which products will be processed

With this new feature it’s possible over the configuration to control the list of products, that will be processed in Events with product groups:

There are (basically) two ways to use this control:

Blacklisting (excluding):

The option exclude_product_group_ids allows to configure a comma separated list of product Groups. The members of these groups will be excluded from the actual Event. Also if action request is set for this products. This products will be ignored in this event, but the action requests will not be changed.

White listing (including):

The option include_product_group_ids allows to also configure a comma separated list of products Groups. The members of this groups are the only products, that will be processed from the actual event if they have set action requests.

You can use these options globally from the default-Event. From that point this settings will be used in every event. You can also set these options in a special event. If you use the option on event_on_demand, you can control which products will not be installed in push installations, although they have an action request. On normal restart of the client, the products will be installed from gui_startup (default event) at startup.
CAUTION: For Clients that work in WAN/VPN-mode you must set this options in sync-event and also in the cacheservice-section, because the cache service have no access to the configuration of main sync-event.

Warning

Product dependencies will not be observed by this feature. That means that you have to observe the process in order to prevent dependency issues.

Configuration via configuration file

On a 64bit Windows the configuration file is c:\program files (x86)\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf.

On a 32bit Windows the configuration file is c:\program files\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf.

Caution

This configuration file is UTF-8 encoded.
Any changes using editors which do not support this encoding (e.g. notepad.exe) may destroy any umlaut in this file.

The configuration written in this file may be changed by different configuration data, which come via web service after a successful connection to the opsi-server.

Logging

The opsiclientd logs to:C:\opsi.org\log\opsiclientd.log.

All log information will be transferred to the opsi-config-server via web service. At the server you find these log infos at /var/log/opsi/clientconnect/<ip-or-name-of-the-client>.log. They are presented in the opsi configed at the tab logfiles / client connect.

Every line at the log has the pattern:[<log level>] [<time stamp>] [message source] message.

The opsi-login-blocker logging to the log file: C:\opsi.org\log\opsi_loginblocker.log.

opsiclientd infopage

According to the fact that there are a lot of subcomponents of the opsiclientd which work and log at the same time, the log file of the opsiclientd becomes complex.

In order to make it easier to understand how the different subcomponents work together, the opsiclientd has an own info page which visualizes the running tasks on a timeline.
You may view this info page at the browser calling the url:https://<address-of-the-client>:4441/info.html

Additional maintenance tasks (shutdown, reboot,…..)

Using the control server port you may remote control the opsiclientd. In order to do this you have to authenticate yourself at the web service. This could be done either with the local administrator account (with a not empty password) or with the opsi-host-Id (FQDN, client name and DNS Domain name) as user name and the opsi-hostkey as password.

Using the opsi-configed you may choose the menu opsiClient or the context menu in the Clients Tab.

Figure 65. Web service of the opsiclientd

At the command line you also can initiate a client:

shutdown:

opsi-admin -d method hostControlSafe_shutdown *hostIds

reboot:

opsi-admin -d method hostControlSafe_reboot *hostIds

Adapting the opsi-client-agent to your Corporate Identity (CI)

Adapting the opsi-client-agent to your Corporate Identity can be important for the user acceptance when rolling out opsi. By adding your corporate logo to the opsi background image, the users feel more familiar with the opsi installation instead of being puzzled by something unknown.

Since opsi-client-agent version 4.0.7.16 all graphic components of the opsi-client-agent (notifier, opsi-script, kiosk-client) are base on the same graphic libraries and may be customized in the same way.
Colors can be configured in three different ways: as symbolic name (clRed), as hexadecimal value ($FF00FF) and as rgb value ((255,0,0)). There is a helper program set allows you simple to choose your colors and get the correct way to write the colors to the configuration file. The program is opsi color chooser.

As background graphic formats you may use a large number of different formats like: .bmp, .png, jpeg and so on. But all these formats are include a number of subformats. So for example is one png file displayed without any problem while an other, different png-file may not displayed in a correct way.
There may also be a difference between the operating system platforms (e.g between Windows and Linux).
There is a helper program set allows you simply to check if a given bitmap file will be displayed correct or not: opsi bitmap viewer.

Elements to be patched: opsi-winst

The files to be configured for opsi-winst are to be found in the directory /var/lib/opsi/depot/opsi-client-agent/files/opsi/opsi-winst/winstskin:

bg.png
This is the opsi-winst background image, where during installation text messages and product logos are shown.

skin.ini
This is the configuration file to specify the position, font and color of text messages during installation.

Elements to be configured: opsiclientd

In the directory
/var/lib/opsi/depot/opsi-client-agent/files/opsi/dist/notifier
are the files to configure the look of the notifiers. Each notifier has an image and a configuration file:

You will find templates for these files under /var/lib/opsi/depot/opsi-client-agent /files/opsi/opsiclientkiosk/opsiclientkioskskin
or C:\Program Files(x86)\opsi.org\opsi-client-agent\opsiclientkiosk\opsiclientkioskskin

Protect your CI changes from updates: the custom directory

(available since opsi-client-agent version 4.0.2.3)

The custom directory can be used to protect your configuration changes during opsi-client-agent updates: (/var/lib/opsi/depot/opsi-client-agent/files/opsi/custom). During server updates of opsi-client-agent the whole custom directory will be saved and restored after the update, so that your custom changes will persist.

custom/config.ini
Values from this config file override values from the default cfg/config.ini. Except of the values for pckey and bootmode, which never are picked from that file. Add to your custom config file only those values, that are different from the default settings.

custom/winstskin/*.*
All the files from this directory will be copied to the clients C:\Program Files (x86)\opsi.org\opsi-client-agent\custom\winstskin directory during installation of the opsi-client-agent on the client. This winstskin directory, if it exists, since opsi-winst Version 4.11.3.4. is the preferred one. It must contain all required winstskin files and configurations, for the content of the default directory is ignored.

custom/notifier/*.*
All the files from this directory will be copied to the clients C:\Program Files (x86)\opsi.org\opsi-client-agent\notifier directory during installation of the opsi-client-agent and overwrite the files from the server side files/opsi/dist/notifier/ directory.

custom/opsiclientd.conf
If it exists, the custom/opsiclientd.conf will be copied to the clients C:\Program Files (x86)\opsi.org\opsi-client-agent\opsiclientd directory during installation of the opsi-client-agent and overwrites the default opsiclientd.conf from the server side files/opsi/dist/opsiclientd/ directory. So the custom opsiclientd.conf must contain all the required configuration entries.Attention:
Using a custom opsiclientd.conf is not recommended. To customize your client configuration, use the host parameter configuration for single features as described in the opsi-client-agent chapter. Using a custom opsiclientd.conf is applicable for very complex configurations only. By using a custom opsiclientd.conf, after each update of opsi-client-agent it is required to check the server default file files/opsi/dist/opsiclientd/opsiclientd.conf for changes to be patched to your custom opsiclientd.conf.So: hands off this feature, unless you really know what you are doing!

custom/opsiclientkioskskin/*.*
All the files in these directory will be copied, by the installation of an opsi-client-agent to C:\Program Files(x86)\opsi.org\opsi-client-agent\custom\opsiclientkioskskin. If available, this directory (opsiclientkioskskin) will have the preference over others.

To avoid errors by the change of rights, the following helps:

opsi-setup --set-rights /var/lib/opsi/depot/opsi-client-agent

Blocking the user login with the opsi-Loginblocker

To prevent a user login before all installations are completed, opsi provides the optional opsi-login-blocker.

opsi loginblocker at Windows 2000 to XP (NT 5)

The opsi-login-blocker is implemented as the Ginaopsigina.dll. Gina means Graphical Identification and Authentication and is the official Microsoft hook to manipulate the login process.

If you already have a special Gina-DLL installed, which is different from the original Microsoft msgina.dll (e.g. Novell nwgina.dll), you should not install the opsi-login-blocker without consulting uib or https://forum.opsi.org. It is possible to chain different gina.dll’s, but therefore the installation has to be customized. Proper chaining of Gina DLLs is a quite critical task and might result in a locked up computer if done improperly.

Whether the opsi-login-blocker is installed or not is configured by the switch LoginBlockerStart=on/off in section [opsi-client-agent-install] of the client configuration.

opsi loginblocker at NT 6 (Win 7 & Co)

The opsi-login-blocker at Vista is implemented as a credential provider filter. It blocks all credential providers until the release by the opsiclientd or timeout.

Subsequent installation of the opsi-client-agents

The information about the Subsequent installation of the opsi-client-agent you will find in the opsi-getting-started manual (Chapter First Steps).

Installation of the opsi-client-agent from a master image or as exe

In order to install the opsi-client-agent from a prepared (sysprep) masterimage,
the opsi-client-agent has to be (re)installed while the clone awakes and get a new personality.

To do this use the following steps:

Copy from the share opsi_depot the complete content of the directory opsi-client-agent in a temporary directory on the master.

Edit there the file files\opsi\cfg\config.ini :

In section [installation] set for service_user= the login name of a user that is member of the opsiadmin group..

NOT RECOMMENDED: In section [installation] set for service_password= the uncoded password of this user. Better:

In section [installation] set for service_hidden_password= the base64 encoded password of this user. For encoding of the pawword you may use the opsi-winst function base64EncodeStr(<string>) or a online service like http://www.base64encode.org/
If service_hidden_password= has any value the key service_password= will be ignored.

In section [opsiclientd] set for config_service.url = the web service address of your opsi-config-server (e.g. https://192.168.1.10:4447/rpc)

Make sure that the script silent_setup.cmd from the temporary directory is called after the clone has its new personality.

After the call of silent_setup.cmd is finished, the temporary directory should be deleted.

If you like you may pack the temporary directory to a self extracting exe with final program start using a tool like filzip.

The Systray Program of the opsi-client-agent

The systray program of the opsi-client-agent focuses on the following targets:

7. Security

7.1. Introduction

According to that fact, the opsi-server has to be in the focus of security considerations.

If you control the opsi-server, you are in control of all the clients, that are connecting to that opsi-server.

How much time and money you should spend for hardening your opsi-server, depends on your needs regarding security and the operational environment for using opsi. So for example an opsi-server in the cloud is more endangered than an opsi-server in a secured network.

In the following chapter we have collected the most important issues and problems.

At this point we say thank you to all customers and users which informed us about security problems and helped us to improve the security of the opsi system. If you find any security problem, please inform us (info@uib.de) before disclosing the security vulnerability in public.

7.2. Stay tuned

7.3. General server security

The opsi software cannot be more secure than the underlying operating system. So please make sure to update your server with the security updates of your Linux distribution. This has to be done not only for the opsi-config-server, but also for all the opsi-depot-server.

It may help you to install programs which inform you by email if there are new updates available.

Debian, Ubuntu

apticron

RHEL, CentOS

yum-updatesd

There are a lot of possibilities to enhance the security of your Linux server. But this is not the task of this manual.

We would be happy to help you with this task as part of a support contract.

7.4. Client authentication at the server

The client authenticates itself using the FQDN as username and the opsi-host-key as password.

The opsi-host-key is stored at the client in the file:%programfiles%\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf
which is readable with administrative privileges only.
The opsi-host-key is stored at the server in the used backend (e.g at /etc/opsi/pckeys).

In addition to this authentication, you may tell the opsiconfd to check if the client IP address matches the given FQDN. To activate this check, set at the /etc/opsi/opsiconfd.conf:

verify ip = yes

and restart opsiconfd:

systemctl restart opsiconfd.service

Caution

Do not use this feature if you are not really sure, that your name resolution works properly in both directions for all clients.

7.5. Server authentication at the client

Since opsi 4.0.1 there are different possibilities to check the trustworthiness of the contacted server.

Caution

Do not use them in combination. Choose only one way or you will be locked out from your client.

Variant 1: verify_server_cert

At the first contact to a opsi-server, the client will accept the given SSL certificate and store it at C:\opsi.org\opsiclientd\server-certs.
On any subsequent contact, the client creates a random string and uses the public key of the stored certificate to encrypt this string (and the own access parameters). These encrypted data will be sent to the server.
The server uses the private key of its own SSL certificate to decrypt the data and sends the decrypted random string back to the client.
Now the client checks if the correct string was sent back. If not, the communication to the server will be aborted.

You can prevent this way that somebody directs your clients to a wrong server, e.g. by manipulating the DNS. If you setup a new server, you may migrate the SSL certificate from the old to the new server without problems. And you must not deploy any certification authority (CA).

The disadvantage of this method is, that a man-in-the-middle attack is still possible.

This security method checks the communication between client and opsi-config-server.

Using the opsi WAN extension and as clientconfig.depot.protocolwebdav, also the communication to the opsi-depot-server is checked.

Now you can activate this using the opsi-configed at the Server configuration or at the Host parameter of seleted clients by chaning the value from false to true.

Caution

Be very careful with activating "verify_server_cert", for in case of improper configuration your clients will refuse the connection!

Variant 2: verify_server_cert_by_ca

This variant works just like SSL certificates are checked in your browser.
The given SSL certificate will be accepted, if it is issued for the exact FQDN (commonName) of the server (or if the DNS verifies that this is the FQDN matching the IP address of the server) and the certificate is issued and signed by the uib gmbh.

Is one of these conditions not true, the communication to the server will be aborted.

This method is more secure than the first one. But you will have to buy the certificates from uib gmbh.
For prizes and conditions have a look at the prize list of uib gmbh:http://uib.de/en/opsi_support/index.html

Any profits from selling these certificates will be invested in the maintenance of the opsi security.

To activate this security method, set at the opsiclientd.conf in the section [global] the option:

verify_server_cert_by_ca = true

Run the following command at your opsi-config-server to create this configuration entry for all clients:

7.6. Authentication at the control server of the client

In order to access this interface authentication is required.
You may authenticate as a local administrator with a not empty password, or with an empty user name and the opsi-host-key as password.

7.7. Admin network configuration

The idea of an admin network is to ban any administrative access from the standard production network and allow these accesses only from a special admin network.

With opsi all opsi-clients need restricted access to the opsi web service, which allows them to read and change their own data. Administrative access with further privileges is granted to members of the unix group opsiadmin only.

If you configure an admin networks parameter, all administrative accesses are restricted to these network(s).

Setting the option [global] admin networks at the /etc/opsi/opsiconfd.conf will restrict the administrative access to the opsiconfd to connections coming from the specified network address(es).
You may give multiple addresses separated by comma.
Non administrative access may also come from other networks.

The default is:

admin networks = 0.0.0.0/0

and allows administrative access from all networks.

A configuration like e.g.

admin networks = 127.0.0.1/32, 10.1.1.0/24

restricts administrative access to the server itself and to the network 10.1.1.0/24.

7.8. The user pcpatch

With opsi 4 the user pcpatch is used just by the opsi-client-agent to mount the depot share (opsi_depot).

Excepions are the products:

opsi-wim-capture and opsi-local-image-capture which use pcpatch to mount the share opsi_depot_rw

opsi-clonezilla wich use pcpatch to mount the share opsi_images

The password of the user pcpatch is usually stored and transmitted encrypted. Under special circumstances it might be possible to catch the clear password. To reduce risks arising from that, you should do the following:

Deny for the user pcpatch the access to all other shares than the opsi_depot share. You should do this by adding the following entry to all share definitions (besides the opsi_depot) at the /etc/samba/smb.conf:

invalid users = root pcpatch

Alternative
At the /etc/samba/smb.conf restrict privileges for the user pcpatch to global read only by setting in the [global] section:

read list = pcpatch

Warning

For the products opsi-wim-capture and opsi-local-image-capture the share opsi_depot_rw must have write permission for pcpatch. For the product opsi-clonezilla the share opsi_images must have write permission for pcpatch

As an additional task you should frequently change the password of the user pcpatch. You may set the password to a random string which no one knows (besides opsi). You may do this by calling the following command e.g by a cronjob:

If you are not using netboot products that require the possibility to login as user pcpatch you can disable the login for that user.
To do so please change the shell of the user pcpatch to /bin/false in the file /etc/passwd.
Since opsi 4.1 the default shell for the user pcpatch is /bin/false. You only need to take action if the system was set up using an earlier version.

7.9. Webservice access limitations

The file /etc/opsi/backendManager/acl.conf can be used to limit the access
to specified methods and attributes of the returned values.

The limitation affects the base methods of the webservice.
For those a restriction of users or groups and allowed attributes can be established.

The access should be limited to the used methods.
If it is not clear what methods are being used one can refer to the output of
opsiconfd about the accessed methods. This is logged to /var/log/opsi/opsiconfd/opsiconfd.log in case of a stop or restart.

8. opsi products

8.1. Localboot products: automatic software distribution with opsi

A localboot product is a opsi product which will be installed by the opsi-client-agent after the client started it’s default OS from the local hard disk. This diskriminate them form the netboot products which will be described later

opsi standard products

The following products are basic products which come with the opsi-server installation.

opsi-client-agent

The opsi-client-agent packet contains the installation and update mechanism of the opsi-client-agent.

opsi-winst

The opsi-winst packet is a special case. It includes the actual opsi-winstwinst32.exe, which is updated by the opsi-client-agent packet itself. The opsi-client-agent checks the server for there is a different version of the winst32.exe and then copies the new opsi-winst (all it’s files) to the client.

javavm: Java Runtime Environment

he product javavm installs the required Java runtime environment (required for opsi-configed) on the clients.

opsi-configed

jedit

Java based editor with syntax highlighting for opsi-winst scripts

swaudit + hwaudit: Products for hard- and software-audit

The products hwaudit and swaudit provide the hardware and software inventories.
The hardware data are acquired using WMI and written to the hardware inventory via opsi web service.
The data for the software inventory are taken from the registry (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall) and passed to the inventory server via opsi web service.

config-win10

config_updates gives one the possibility to handle the update source. The options are to select Microsoft servers, a local peer-to-peer or a peer-to-peer over the internet as an update source. Die option disable moved into an own property, named disable_updates.

defer_upgrade: One can defer Updates and Upgrades of Windows 10. Setting this property to true defers Updates for four weeks and Upgrades for eight months. However security updates will be installed anyway.

disable_advertising_id: The advertising ID is used to collect data within the browser and show user-specific advertisement. Set this property to true to disable this.

disable_cortana: The Cortana assistant in Windows 10 collects data on performed seaches through the search field in the task bar. To change this behaviour use this property.

disable_customer_experience can dis- or enable the data collection on used applications.

disable_defender: Windows 10 has the Windows Defender preinstalled. To deactivate the defender and replace it with an own anti-virus-solution use the property disable_defender.

disable_font_streaming: Whenever a document uses a font which is not installed on the system the missing font is streamed to the machine. This can be disabled by setting the peroperty disable_font_streaming to true.

disable_handwrite_sharing: On modern tablet computers with Windows 10 Microsoft collects data whenever the user uses a pen or anything similar to write something. This handwrite sharing feature is controlled by the property disable_handwrite_sharing

disable_location_sensors: Windows 10 logs informations on the current geolocation of the device. This property makes it possible to disable this logging.

disable_lock_screen disable_lock_screen.

disable_mac: Windows 10 also collect data on the currently logged in Microsoft account user. This can be changed with the property disable_mac

disable_mrt: Windows 10 has an auto built in Malware Removal Tool (MRT). This tool checks the file on the harddrive on a regular basis and compares them with known malware. To disable this feature, set the property to true.

disable_onedrive_sync disable the OneDrive file synchronization.

disable_sending_feedback can disable the feedback service. This service send data to Microsoft in crashed applications.

disable_smbv1 disable smbv1.

disable_telemetry influences the amount of transfered data to Microsoft. Usually the default level, full, transfers most data. Setting this property to true lowers the amount of transfered data. Windows 10 LTSB and Enterprise releases will then only communicate security related information. Any other Windows 10 release will lower the level to basic.

disable_updates blocks connections wo Microsoft update sources when set to true. Setting the property to false enables these connections again.

disable_wifi_sense: WiFi Sense service makes it possible to share WiFi SSIDs inclusing password with contacts. The disable_wifi_sense property can disable or enable this service.

flashplayer_autorun: The Adobe Flashplayer contains a security vunerability related to its autorun feature. If one has the Flashplayer installed, please use the flashplayer_autorun property to disable or enable the autorun feature.

online_search: Whenever one uses the search field within the task bar a search is also performed through the internet. The search result then also contains webpages even if a local file was searched. Setting the property to true disables

sync_settings: Windows 10 makes it possible to synchronise made settings with an account and restore these saved settings on another device running Windows 10.

config-winbase

Manipulating the installation sequence by product priorities

Since opsi 4.0 the installation sequence will be calculated by regarding product dependencies and product priotities.

product dependencies
defines dependencies and needed installation sequence between opsi-packages. A typical example is the dependency between a java program and the java runtime environment (javavm).

product priorities
will be used to push some packages to the beginning of the installation sequence and other packages to the end. For example it is useful install service pack and hotfixes at the beginning of a installation sequence and software inventory at the end.
Product priorities are numbers between 100 and -100 (0 is the default)

There are different possibilities how these two factors are used to calculate the installation sequence. According to this opsi provides two different algorithms.

You may switch between these algorithms:

using the opsi-configed, in the Host parameter Tab of the server configuration

Figure 68. opsi-configed: server configuration

or you can do this on the commend line:

opsi-setup --edit-config-defaults

Figure 69. Choose the sort algorithm: Part 1

Figure 70. Choose the sort algorithm: Part 2

Algorithm1: product dependency above priority (default)

Using this algorithm, the product installation sequence at first will be calculated by the product priorities. In a second step it will be resorted to met the product dependencies. This algorithm may push products with low priority before products with higher priority to met the needs of product dependencies. But therefore you will not see installation problems as result of not resolved product dependencies.
The installation sequence of products with action requests is exactly the sequence you see in the configed if sort the products by the products by the column position and its order even if the scripts have partly been executed. Especially, if the execution of a script is stopped by an "ExitWindows /ImmediateReboot" command, then it is guaranteed that the suspended product installation is directly continued after reboot.

Algorithm2: product priority above dependency

The base philosophy of this algorithm is, that in practice there are three needed priority classes:

Products which have to be installed at the beginning of a sequence, like OS-Patches. These products need a high priority (e.g. 100)

"normal" products to install applications (default priority = 0)

Products which have to be installed at the end of a installation sequence, like software inventory. These products need a low priority (e.g. -100)

Product dependicies will only resolved inside of priority class. This guarantees that products with a high priority will be installed very early. But is in your reponsibility that there are non product dependencies which go cross priority class borders.

Defining product priorities and dependencies

Product priorities and dependencies belong to the meta data of a product. You will be asked for these meta data creating a new product using the command
opsi-newprod.

These meta data will be stored in the product control file and may be edited there. After changing the control file you have create and install the package again.

For more details see at getting started manual in the chapter creating a opsi-package.

Integration of new software packets into the opsi software deployment.

The information about the Integration of new software packets into the opsi software deployment. you will find in the opsi-getting-started manual.

8.2. Netboot products

Parameteters for the opsi linux boot image

The opsi-linux-bootimage has some parameters which may be used to change the behaviour of the bootimage. You will try this if the opsi-linux-bootimages doesn’t run properly with the standard parameters on your hardware (e.g. black screen).
You may change these standard parameters by the opsi-configed choosing the Tab Hostparameter and use there the entry opsi-linux-bootimage.append.

Typical values are (may be combined):

acpi=off

noapic

irqpoll

reboot=bios

An other important default is the password of the root user within the opsi-linux-bootimage. This password is linux123 by default and you should change this for security reasons.

To do this change the opsi-linux-bootimage.append entry at the server-configuration.

The option you have to change is pwh (password hash). As the value to this option you have to give a new password as a hash, which will be loaded to the /etc/shadow during the boot process.

The best way to get the correct password hash is to login via ssh to your bootimage:

One can execute a pythin script before the execution of the desired netboot product. Therefore the bootimage append supports two parameter:

pre-execute

pre-script

In addition these parameter require an address with the script. This can be a http:// or tftp:// address. Please refer to the following example:

tftp://172.16.166/linux/test.py

When using tftp please keep in mind that the default port 69 is used.

Unattended automated OS installation

Overview

Steps of a re-installation:

Using PXE-Boot:

Choose the client which has to be installed with the utility opsi-configed or opsi-admin.

At the next reboot, the client detects (via PXE-Bootprom) the re-installation request and loads the boot image from the opsi-server.

Using CD-Boot:
* The client boots the boot image from the opsi-client-boot-cd.
*The boot image starts and asks for confirmation to proceed with the re-installation. This is the only interactive question. After confirming this, the installation proceeds without any further request for interaction.
* The bootimage formats and partitions the hard disk.
* The bootimage copies the required installation files and configuration information from the opsi-server to the client and initiates a reboot.
* Windows Installation: After the reboot the client installs the OS according to the provided configuration information without any interaction.
* Linux Installation: By default the Linux Netboot products initiate a kexec command from within the bootimage and directly jumpt to the distribution installaer.
* Next the opsi-client-agent is installed as the opsi installer for automated software distribution.
* The automated software distribution then installs all the software packages as defined in the client’s configuration.

Preconditions

The client PC has to be equipped with a bootable network controller. Most recent network controllers provide this functionality (PXE boot). Also recent network controllers which are integrated on the PC’s main board. The PXE software, which is stored in the bootprom of the network controller, controls the boot process via network according to the BIOS boot device sequence. Usually the boot sequence has to be set in the BIOS, network-boot has to be the first boot device. If there is no possibility to use PXE you may boot from the opsi-client-bootcd.

The opsi installation package for the OS to be installed needs to be provided on the depot server. In the following we assume Windows 10 to be the OS to install.

PC-client boots via the network

The PXE firmware gets activated at startup of the PC. Part of the PXE implementation is a DHCP client.

Figure 71. Step 1 during PXE-Boot

At first the PC only knows its hardware Ethernet address (MAC), consisting of six two-digit HEX characters.

The firmware initiates a DHCPDISCOVER broadcast: “I need an IP address, who is my DHCP-Server?“

The DHCP-Server offers an address (DHCPOFFER).

DHCPREQUEST is the response of the client to the server if the IP address is accepted. (This is not an obsolete step as there could be more than one server in the network.)

The server sends a DHCPACK to acknowledge the request. The information is sent to the client again.

You can watch this process on the display, for the PXE-BOOTPROM displays some firmware information and its CLIENT MAC ADDR. The rotating pipe-symbol is displayed during the request. When an offer was made it is replaced by an \ and you get the transmitted information (CLIENT IP, MASK, DHCP IP, GATEWAY IP).
A short while later you should get a response like this: My IP ADDRESS SEEMS TO BE …….

This process makes the PC a regular, fully configured member of the network.
The next step is to load the boot file (bootimage) given in the configuration information.

Loading pxelinux

The bootimage is loaded via trivial file transfer protocol (tftp). The displayed message is „LOADING“. tftp is a rather old and simple protocol to transfer files without authentication. In fact, all data available via tftp is available to everyone in the network. Therefore the tftp access is limited to one directory, which is usually /tftpboot. This directory is specified in x/inetd (internet daemon, /etc/inetd.conf), which will start the tftp daemon tftpd if requested. The start command as noted in inetd.conf is something liketftpd -p -u tftp -s /tftpboot

The PXE boot-process is a multi-stage process:

Stage 1 is to load and start the file submitted as part of the address discovery process (usually /tftpboot/linux/pxelinux.0).

The program pxelinux.0 then looks for configuration and boot information in /tftpboot/linux/pxelinux.cfg. It first looks for a PC specific file with a name based on the hardware ethernet address (MAC) of the network controller with a leading 01. The filename for the controller with the hardware ethernet address 00:0C:29:11:6B:D2 would be 01-00-0c-29-11-6b-d2. If the file is not found, pxelinux.0 will start to shorten the filename (starting at the end) to obtain a match. If this process ends without result, the file default will be loaded. This file only contains the instruction to boot from the local hard disk. In this case the PC won’t install anything and will just start the current OS from hard disk.

Figure 72. Step 2 PXE-Boot

To initiate the re-installation of a certain PC, a loadable file is prepared for the program pxelinux.0. In order to do so, the opsipxeconfd creates a PC custom file in /tftpboot/linux/pxelinux.cfg. Part of this file is the command to load the installation boot image. Also this file contains the client key to decrypt the pcpatch password. This file is created as a named pipe and therefore disappears after being read once. More details about this in the chapter on security of file shares.

Based on the information the pxelinux.0 got from the named pipe, the actual bootimage is loaded from the opsi depot server via tftp. The bootimage is based on a linux kernel (/tftpboot/linux/install) within an appropriate initrd file system (/tftpboot/linux/miniroot.bz2).

Boot from CD

Similar to the tftp boot via PXE-bootprom, the installation boot image can be booted from the opsi bootcd.

This might be recommended under the following conditions:

the client has no PXE bootprom;

there is no dhcp;

there is a dhcp but it isn’t allowed to configure any client data and the hardware addresses of the clients are unknown;

there is a dhcp but it isn’t configured for this demand.

According to different situations, several information has to be provided for the CD boot image by interactive input. The most simple case is to provide no further information. Eventually the clients hostname can be passed by hn=<hostname>. Using the option ASK_CONF=1 several parameters can be queried. Pressing F1 at the CD prompt shows the syntax.

Please read the chapter Create a new client using the opsi-client-bootcd at the opsi-getting-started manual.

The linux bootimage prepares for reinstallation

The bootimage again performs a dhcp request and configures the network interface according to the perceived information. Afterwards the configuration data for the client will be loaded via opsi web service.

It also holds the information on how to partition the hard disk, what file system to use and which operating system to install. Also it provides the encrypted password to connect the file share.

These information will be combined with some information taken from the dhcp response and then be passed to the installation script for further processing.

Then the password for the user pcpatch will be decrypted with the transferred key to mount the installation share and then call the installation script from the mounted share to start the installation of the operating system. What specific operations the script performs depends on the operating system which is to be installed. Below the steps of a Windows 10 installation will be described.

Prepare the disc: On the hard disk the bootimage creates a new partition (size of 4 GB), formats it and installs a bootable ntloader kernel.

Copy the installation file: The files required for OS installation and the setup files for the opsi-client-agent (which is the opsi software distribution pack) will be copied from the server file share (e.g. /var/lib/opsi/depot/win10/installfiles) to the local hard disk.

Maintain the configuration informations: Some of the configuration and control files contain replacement characters, which will be patched before starting the actual installation. With a specified script (patcha-script) the placeholders will be replaced with parameters taken from the information packet. This is built from configuration files and the dhcp-response. For example the file unattend.xml, which is the control file for unattended OS Installation, will be patched with specific information like host IP, client IP, client name, workgroup, default gateway etc..

Prepare Reboot: Bootrecords will be installed which will start the Windows setup program at the next reboot. The patched unattend.xml is passed to the setup as the control file for unattended installation.

Reboot: During the previous boot, the named pipe (which is indicating a request for installation) has been removed by reading it once. So the next PXE boot will load the default netboot response, which executes the command localboot 0. The local boot loader will be started and the setup for operating system installation starts.

These steps are controlled by an OS specific python script.

Installation of OS and opsi-client-agent

The OS installation bases on the Microsoft unattended setup. Part of this is the standard hardware detection. In addition to the possibilities given during an installation from non-OEM or slipstreamed installation media, drivers and patches (i.e. service packs) can be installed during the initial installation, making the separate installation of drivers obsolete.

One feature of the unattended installation is the possibility to initiate additional installations after the main installation is finished. This mechanism is used to install the opsi-client-agent, which implements the automatized software distribution system. An entry in the registry marks the machine as being still in the reinstallation-mode.

The final reboot leads to starting the opsi-client-agent service for software distribution prior to the first user login. Based on the value of the aforementioned registry key the opsi-client-agent switches into reinstallation-mode. Therefore, regarding the configuration status of each software packet, each packet which is marked as action status ”setup” or installation status ”installed” within the configuration of that client will be installed. After all the designated client software has been installed, the reinstallation process is finished and the internal status is switched back from reinstallation-mode to standard-mode. In standard-mode only software packages that are marked as action status ”setup” will be installed.

How the patcha program works

As mentioned above the information collected from dhcp and opsi-webservice will be used to patch some configuration files as e.g. unattend.xml. The program used for patching is the script /user/local/bin/patcha.

This script replaces patterns like @flagname() in a file with values taken as flagname=value from the specified properties in the Windows 10 product. In the files that have to be patched, the search and replace pattern must start with @, might have an optional after the flagname and must have one or more trailing .

So by calling patcha -f <patchValues> <filename> the file <filename> will be patched with information from the set product properties, stored in the file <patchValues>. The file <patchValues> is generated before the installation from the product properties.

Structure of the unattended installation products

The information about the Structure of the unattended installation products is found in the opsi-getting-started manual.

Simplified driver integration with symlinks

The information about the Simplified driver integration with symlinks is found in the opsi-getting-started manual.

Some hints to the NT6 netboot products (Win7 to Win 10)

Preconditions. All netboot products with the version >= 4.1.0.0 require an opsi-winst >= 4.12.0.13 installed on the opsi server.
The netboot products with the version 4.1.0.0 also run on opsi 4.0.7.

Multidisk mode. Windows OS installations on systems with more than one hard disk are now supported with the new multidiskmode property.
The multidiskmode property allows to select the target disk for the Windows installation by selecting the disk number. It is also possible to select the first SSD by using prefer_ssd or to select the first rotational (classic) disk by prefer_rotational
In order to work with the multidisk mode, the property winpenetworkmode has to be true.

Important

By using the multidiskmode on a computer with MBR BIOS you have to make sure, that the by multidiskmode selected disk is also the first disk in the BIOS boot sequence.
On UEFI BIOS systems no further actions are necessary, due to the fact that the boot sequence it’s controlled by the installation software.

Actions while running inside the Windows PE. The preparation of a Windows installation starts with the opsi-linux bootimage, which select and prepares the hard disk. It also copies a Windows PE to a partition of the hard disk. This Windows PE is booted in order to start the Windows setup.
Starting with the 4.1.0.0 netboot products we use an opsi-script inside the Windows PE. This has the following advantages:

Easier and clearer scripts

The creation of a log file of the actions inside the PE

Sending of this log file to the opsi server

NT6 product properties. The netboot products for the installation of the operating systems of the NT6 familiy, contain several properties which will be described below.

additional_drivers

One or more directories below <productid>\drivers\drivers\additional. All driver directories below the given directories will be integrated. If there is here a driver for a found device, no other driver will be integrated by the automatic driver integration.

administrator_password

At this property you set the password for the local Administrator.
Default = nt123

architecture

Select the bootimage architecture (e.g. 32/64 Bit). This will not (!) affect the architecture of the installed Operating System.
Default = 65bit Since version 4.1.0.0-15

This property should never be changed. It ist not editable. It is used internally to difference between standard (disk) installations, opsi-local-image (oli) and opsi-vhd (vhd).
Please do not try to change it.

multi_disk_mode

This property is used to select the target disk of the Windows installation.
Possible values are: "0","1","2","3","prefer_ssd","prefer_rotational"
The values "0","1","2","3" are the index of the hard disks ("0"= 1. harddisk)
The value "prefer_ssd" selects the first SSD.
The value "prefer_rotational" selects the first rotational (classic) disk.
This property is ignored on systems with only one disk.
Default = "0"

orgname

Name of the company or organisation of license holder, which is given to the setup program

pre_format_system_partitions

Should we format the windows and boot partition before installation starts to remove any traces of former installations ? (takes time !)

preserve_winpe_partition

By default (False) the winpe partition will be deleted after the installation and the space is used by the system partition. True meens only to hide the winpe partition.

productkey

License key for the installation. Is only used if the host parameterlicense-management.use is set to false. If it set to True the license key will be get from the license management module.

setup_after_install

Which opsi product(s) should we switch to setup after OS installation is done ?

This property only is used for debuging
The value "auto" detects the matching standard winpe directory. These are winpe or winpe_uefi
Any other value must point to an existing directory inside the product directory on the opsi depot share.
Default = auto

winpe_inputlocale

Microsoft-Windows-International-Core-WinPE InputLocale

winpe_partition_size

Size of the winpe_partition

winpe_uilanguage

Microsoft-Windows-International-Core-WinPE

winpe_uilanguage_fallback

Microsoft-Windows-International-Core-WinPE

windows_partition_label

Label of the system partion (c:)

windows_partition_size

Size of the system partion (c:). The size may be given as percent of the harddisk size or as absolut size (G=Gigabyte). If you choose a other value the 100%, the rest will be used as data_partition.

Figure 76. Size of the system partion

winpenetworkmode

If true the PE tries to mount the depot share and start the operating system setup from the share (faster). If false all installation files will be copied to the hard disk and the installation starts from the local disk (slower).

memtest

The product memtest is a utility to perform a memory test on a client.

hwinvent

This product does a hardware inventory of the client.

wipedisk

The product wipedisk overwrites the complete hard disk (partion=0) or several partitions with different patterns. The number of consecutive write operations to perform is specified as the {product-property iterations (1-25).

8.3. Inventory

The inventory can be ordered with the Localboot products hwaudit and swaudit or with the Netboot product hwinvent.

Hardware Inventory

The hardware inventory is controlled by an opsi configuration file. This means that the information about the data that will be compiled is not hardwired into the
corresponding products hwaudit and hwinvent. In fact, the products will be controlled by a configuration file. The configuration file will be called and interpreted
with every dispatch of the Web service. Simultaneously, the configuration file controls the structure of the database, so that a change of this configuration file
changes the database schema.

The configuration file is /etc/opsi/hwaudit/opsihwaudit.conf.
All the objects on the inventory are defined and described in this file, like how these objects and their data are instantiated (under Linux and Windows). This file will
also define the associated data structure. To be more specific, this configuration file contains the object-oriented inheritance definitions.
The reason for this is the fact that a lot of objects contain identical data fields (i.e. like Name and Vendor). The general information will be defined
in virtual Hardware base classes. The actual inventory objects are then structural Hardware classes, where many properties could possibly be inherited
from overridden virtual base classes.

The following example may be instructive:
At first, the configuration file defines a virtual Class called "BASIC_INFO". This defines the properties (Values):

"name"

"description"

Next comes the virtual Class called "HARDWARE_DEVICE", which inherits all the additional parameters from "BASIC_INFO", and includes the following:

"vendor"

"model"

"serialNumber"

Next follows the first object that is found in the inventory, which is the first structural Class called "COMPUTER_SYSTEM",
which inherits of all the additional parameters from "HARDWARE_DEVICE", it is defined (and overwrites properties) as:

"name"

"systemType"

"totalPhysicalMemory"

The class definition will include a description of various parameters and their Values:

Class definition:

"Type"
is "STRUCTURAL" or "VIRTUAL"

"Super"
this class which it will be inheriting.

"Opsi"
gives the name of the class, which will be used later in opsi as a display name.

Further more, the class definition can define how the data will be compiled. This information can also be found in the definition of the Values.

For the inventory under Linux:

"Linux": "[<command>]<parameter>"
Executes the command <command> on the command line, with the argument <parameter>.

"Python": "<python code with place holder>"
Executes the given Python code whose output will be placed in the place holder which is between the "#" signs (see example below).

For the Inventory under Windows:

"WMI": "<wmi select statement>"
executes WMI when called

"Cmd": "<Python text object with place holder>"
In this case, this is the relative path to the Python executable program, whose output will be placed in the place holder.

"Registry": "[<registry key>] <value name>"
The value of <value name> will be read from the registry, and given the key name <registry key>.
The registry must be read in an architecture-specific manner. This means, that the 64 bit sector will be read on a 64 bit system.

Value Definition:

"Type": "<MySQL database type>"
<MySQL Database type> gives the MySQL database type that will be applied to this value (i.e. a Python string will be a "<MySQL Datenbase type>"="varchar(200)").

"Scope": "<scope>"
The field <scope> will be used in the following way:
"g" means: This attribute is the same in every link of these types.
"i" means: This attribute can have different types of values with these links.

"Opsi": "<id>"
"<id>" is an internal name of the fields. This can be found in the file located at /etc/opsi/hwaudit/locales .

"WMI": "<id or command>"
<id or command> is either the name of a WMI command that prints the value or a single WMI command. If the WMI command is given in the Class definition (i.e. "select * from Win32_ComputerSystem") ,
then the results are assigned to the "WMI" variables in the "Values" class definition. If there is no WMI command, then the "WMI" variables in the "Values" section are WMI commands (see example below).

"Linux": "<id>"
This is part of the class definition, <id> is the name of the displayed value when the Linux command is given.

"Condition": "<condition>"
<condition> is a condition which must be fulfilled, with which the Value will be determined. So for example if the <condition> is defined as"vendor=[dD]ell*", then the values of "vendor" must contain either Dell or dell.

Regarding the "WMI" commands, the class definition contains "select * from Win32_ComputerSystem". This command is run by WMI, which
has output columns of "Name", "SystemType", and "TotalPhysicalMemory". These values are then assigned to the opsi values of "name",
"systemType", and "totalPhysicalMemory".

Especially interesting is here the last value "dellexpresscode":
This is really useful when it queries a Dell-computer, about its condition.
The command line program dellexpresscode.exe was designed for Windows, and tells hwaudit.exe that the dellexpresscode is provided in the directory dellexpresscode\.
Items in between # are place holders for output. So the statement at "dellexpresscode\dellexpresscode.exe" runs dellexpresscode.exe, and
produces output in the form : dellexpresscode=123456789. The value that will be used is the one after the split on the place holder =, which is done in Python using the split() method as such .split('=')[1] .
Under Linux, there will be found a value for serialNumber for the elements (COMPUTER_SYSTEM or CHASSIS), that is then used to assign the Dell Express codes. The call int(,36) converts the output integer to base-36.

The OPSI names of the values will be translated using the files found in /etc/opsi/hwaudit/locales/*.
The file /etc/opsi/hwaudit/locales/en_US may contain translations such as:

COMPUTER_SYSTEM = Computer
COMPUTER_SYSTEM.systemType = Type

The class name COMPUTER_SYSTEM will be translated into "Computer". The Opsi attribute "systemType" of the class COMPUTER_SYSTEM will be translated into "Type" for English. If
one were to look in the file /etc/opsi/hwaudit/locales/de_DE, you could see that the attribute of "COMPUTER_SYSTEM.systemType" will be translated into "Typ" for German.
Finally another suggestion: When a new field is created, it should be placed in these files, even if one does not translate the term explicitly.
This avoids any "Warning" messages.

After any change on the configuration file you should call:

opsi-setup --init-current-config

Also you should make a complete data reload in your opsi-configed by calling the menu: File/Reload all data.

Software Inventory

The software inventory is done with the Localboot product swaudit.
In this case, information will be inherited from the uninstall of the Registry, and additional information will be obtained from the Hotfixes and License keys.

Rating Definition
Critical
A vulnerability whose exploitation could allow code execution without user interaction. These scenarios include self-propagating Malware (e.g. network worms), or unavoidable common use scenarios where code execution occurs without warnings or prompts. This could mean browsing to a web page or opening an email.
Microsoft recommends that customers apply Critical updates immediately.
Important
A vulnerability whose exploitation could result in compromise of the confidentiality, integrity, or availability of user data, or of the integrity or availability of processing resources. These scenarios include common use scenarios where client is compromised with warnings or prompts regardless of the provenance, quality, or usability. Sequences of user actions that do not generate prompts or warnings are also covered.
Microsoft recommends that customers apply Important updates at the earliest opportunity.
Moderate
Impact of the vulnerability is mitigated to a significant degree by factors such as authentication requirements or applicability only to non-default configurations.
Microsoft recommends that customers consider applying the security update.
Low Impact of the vulnerability is comprehensively mitigated by the characteristics of the affected component. Microsoft recommends that customers evaluate whether to apply the security update to the affected systems.

custom.actions.post.setup
custom.actions.post.uninstall
custom.actions.pre.setup
custom.actions.pre.uninstall
custom.declarations
custom.sections
custom scripts will be included at
- setup-script
- uninstall-script
custom pre-scripts will be included in
- setup-script
- uninstall-script
custom post-scripts will be included in
- in setup-script
- uninstall-script
custom.declarations
; intended for declaration of custom Variables and Stringlist Variables
; will be included with "include_insert" at top of [actions]
; but after GetProductProperties
custom.sections
; intended for declaration of custom secondary sections
; will be included with "include_append" at top of [actions]
; but after GetProductProperties
custom.actions.pre.setup (or custom.actions.pre.uninstall)
; will be included with "include_insert" at at top of [actions]
; (but after GetProductProperties)
custom.actions.post.setup (or custom.actions.post.uninstall)
; will be included with "include_insert" in case of successful installation before "endof_"actions"
; in setup-script ( or uninstall-script)

The Adobe Reader package uses a default transform
build with the Adobe Customization Wizard.
Own mst-files can be placed in the share opsi_depot in
/var/lib/opsi/depot/adobe.reader.dc.classic/custom
During the installation via opsi-package-manager -i <adobe.reader.dc.classic> the directory custom will preserved by the preinst/postinst-scripts and the names of any mst-file in the custom-directory will be appear as a possible property entry.

Caution

opsi WAN/VPN extension: The synchronization process is based on the file <product-id>.files. So any change in the custom share requires new installation of the package via opsi-package-manager.

The Adobe Reader package uses a default transform
build with the Adobe Customization Wizard.
Own mst-files can be placed in the share opsi_depot in
/var/lib/opsi/depot/adobe.reader.dc.continuous/custom
During the installation via opsi-package-manager -i <adobe.reader.dc.continuous> the directory custom will preserved by the preinst/postinst-scripts and the names of any mst-file in the custom-directory will be appear as a possible property entry.

Caution

opsi WAN/VPN extension: The synchronization process is based on the file <product-id>.files. So any change in the custom share requires new installation of the package via opsi-package-manager.

will be created during "setup" and patched according the properties below.

Since Version 13.0.0.250-2 one can use custom mms.cfg files in the share opsi_depot in
/var/lib/opsi/depot/flashplayer/custom

During the installation via opsi-package-manager -i <flashplayer> the directory custom will be preserved by the preinst/postinst-scripts and the names of any mms.cfg-file in the custom-directory will be appear as a possible property entry.

Caution

opsi WAN/VPN extension: The synchronization process is based on the file <product-id>.files. So any change in the custom share requires new installation of the package via opsi-package-manager.

mms.cfg

/var/lib/opsi/depot/flashplayer/custom custom mms.cfg-files.

Only the property autoupdatedisable will be populated if custom mms.cfg are used

Adobe Flashplayer Admin Guide:

flash_player_11_1_admin_guide.pdf (flash_player_admin_guide.pdf)
#####################################
Chapter 4: Administration
You can create and place files on the end user’s machine to manage
features related to security, privacy, use of disk
space, etc.
Privacy and security settings (mms.cfg)
As a network administrator, you can install Flash Player across the
environment while enforcing some common global
security and privacy settings (supported with installation-time
configuration choices). To do this, you need install a file
named mms.cfg on each client machine.
The mms.cfg file is a text file. When Flash Player starts, it reads its
settings from this file, and uses them to manage
functionality as described in the following sections.
mms.cfg file location
Assuming a default Windows installation, Flash Player looks for the
mms.cfg file in the following system directories:
32-bit Windows - %WINDIR%\System32\Macromed\Flash
64-bit Windows - %WINDIR%\SysWow64\Macromed\Flash
Note: The %WINDIR% location represents the Windows system directory,
such as C:\WINDOWS.

assetcachesize

description: hard limit, in MB, on the amount of local storage that Flash Player uses for the storage of common Flash components
values: ["20"]
default: ["20"]

description: Lets you prevent native code applications that are digitally signed and delivered by Adobe from being downloaded
values: ["0", "1"]
default: ["1"]

disablesockets

description: enable or disable the use of the Socket.connect() and XMLSocket.connect() methods
values: ["0", "1"]
default: ["1"]

enablesocketsto

description: Lets you create a whitelist of servers to which socket connections are allowed

enforcelocalsecurityinactivexhostapp

description: Lets you enforce local security rules for a specified application.

legacydomainmatching

description: Lets you specify whether SWF files produced for Flash Player 6 and earlier can execute an operation that has been restricted in a newer version of Flash Player
values: ["0", "1"]
default: ["0"]

localfilelegacyaction

description: Lets you specify how Flash Player determines whether to execute certain local SWF files that were originally produced for Flash Player 7 and earlier
values: ["0", "1"]
default: ["0"]

description: Stable - is an Extended Support Release from LibreOffice for the conservative user - default version (5.1.6); Experimental is a version for the experimental user from LibreOffice (5.2.5)
values: ["experimental", "stable"]
default: ["stable"]

Existing "Patch-in-place" Jre-versions 1.6.x, 7.x and 8.x will be uninstalled.
- Existing Oracle JRE with "Static configuration" will not be uninstalled
- Earlier Oracle JRE (version 1.6.0 - version 1.6.7) will be uninstalledby default. One can change this behavior using the property "keepversion".

9. opsi Extensions

9.1. Activation of non free modules

opsi is open source, nevertheless there are some components which are at the moment not free but in their cofunding periods. That is
they are developped and maintained in a project which has to come up for its costs.

At this time (December 2016), this refers to the the following components :

As long as the components are in their cofunding state they are only allowed to be used for evaluation purposes or based on paying the cofunding fee.

To verify the use of these components as long as they are not free the opsi files include an activation file /etc/opsi/modules.
It is just a plain text file with the data which module is activated for how many clients, protected via a digital signature.
MIssing entries in the file are supplemented with the default values If the activation file doesn’t exist at all only the free parts of opsi will work.

If you need a temporary valid activation file to evaluate extensions please contact info@uib.de.
If you become a co-funder, you will get an activation file for permanent and regular use.

When you got an activation file, put it with root privileges into the directory /etc/opsi (and rename it to modules if yet necessary). If this is done, execute:

opsi-setup --set-rights /etc/opsi

and restart the opsiconfd.

You may then check your activation state with one of the following methods:

Using the opsi-configed choose the menu entry Help/opsi-Module which shows a window with the activation state.

Figure 77. Display of activation state in opsi-configed

At the command line you may use the command opsi-admin with the method backend_info.
(Remark: Never give your activation file or the output of this command to third people without removing its signature entry).

9.2. User roles (via opsi-configed)

9.3. opsi directory connector

Introduction

The opsi directory connector is a tool to transfer data from a directory service
to an opsi installation.
This avoids the need of maintaining data in two separate systems.

Prerequisites for the opsi extension opsi directory connector

This module is currently a
co-funded opsi extension.
Some preconditions are required, in order to use this module. That means that you need a suitable modules file to unlock this extension. You can get this file by purchasing the extension module. For evaluation purposes you can get a temporary modules file without charge. ( → mail us at info@uib.de).

General Requirements

The source directory service must implement the LDAP protocol.
Samba 4 or Active Directory are examples for directory services that support the LDAP protocol.

The target opsi server should run at least opsi 4.0.7.
Prior versions may work but have not been tested.

The machine running the connector must have access to the ones running
the directory and opsi over the network.

It is possible to have everything running on the same server but this manual will assume that different machines are used.

Hardware Requirements

These requirements are intended for a basic use in a small-sized environment
with up to 500 clients.
The requirements may change running the connector in larger environments
so please be aware that adjustments may be necessary.

256 MB of free RAM

Network connection

Software Requirements

The installation and operation is only supported on Linux.
Support for Windows is not planned.

The connector uses Python 3 which has to be available in at least version 3.2.

The connector uses standardized protocols and therefore does not require any further opsi- or directory-components to be installed.

Installation

To install the connector please add the opsi repository as described in the Getting Started document.

Then use your operating system’s package manager to install the package opsi-directory-connector.

On an Debian-based machine installation can be done like this:

apt-get install opsi-directory-connector

Note

CentOS and RedHat version 6 and 7 do not have Python 3 as part of their core repositories.
Therefore we currently can not support installation on these operating systems.

Configuration

The connector features a variety of settings to fit into different
environments.

The configuration is made in a JSON-formatted file and must contain valid JSON!
To specify any boolean value please use true or false. Text has to
be entered in double quotes like "this is text".

An example configuration will be provided at /etc/opsi/opsidirectoryconnector.example.conf.
This file can be used as a template for your own configurations.

Under address you specify the directory-server.
user and password are required for authentication at the directory.
If passwordFile is set the value will be interpreted as path to a file that contains the password. The content of the file will be used as password.
This allows for not having the password written in plaintext in the file.
This will override the value set for password if the file can be read.

Tip

We recommend using a dedicated user account.

Note

Depending on the used directory software and it’s configuration the format for the username can be different.
Besides Down-Level Logon Name in the format of DOMAIN\\username it is possible that the format uses User Principal Name with the format of user@domain or a Distinguished Name (DN) like uid=opsiconnect,cn=users,dc=test,dc=intranet.

With search_base you specify the location from where on the connector
looks for matching entries.
Through search_query_computers and search_query_groups the conditions
for finding entries can be configured.
Either search_query_computers or search_query_groups or both need to be configured. To disable one of these set them to "".
The search for groups will be implemented in a future version. Until then the setting has no effect.

The parameter connection_options contains additional options to configure the connection.
With start_tls it is possible the control if a secure connection should be used.

Note

Additional connection options will be implemented on demand.

If the optional parameter paged_search_limit is present and it’s value is an integer multiple queries are made to the directory in order to read it’s elements.
How many elements a response contains is limited through the given value.
This is supported since version 20.

Through the optional parameter identifying_attribute it is possible to set the attribute used for the unique identification of an client. This is possible since version 23.
The default is the usage of dn.

Since version 14 it is possible to test the connection to the directory through the paramter --check-directory without connecting to the opsi server.

Configure connnection for UCS

For a connection to Univention Corporate Server a full Distinguished Name hast do be used as username.
This has the form uid=<username>,cn=users,dc=company,dc=mydomain.

On UCS LDAP is reachable through ports 7389 (unsecured) resp. 7636 (secured via SSL).
If Samba is installed on the Server and used as AD-compatible domain controller then it is listening on ports 389 (unsecured) resp. 636 (secured via SSL).
To make use of the secured ports set the connection option start_tls to true.

The different connections also change the DN used for authentication.
LDAP uses uid=… where are Samba works with dn=….

Usually clients are found in the container computers. The following command shows a matching value for search_base:

echo "cn=computers,$(ucr get ldap/base)"

To search for Windows clients you can set search_query_computers to (objectClass=univentionWindows).

If write_changes_to_opsi is set to false no data will be written to
opsi. This can be used to check settings before applying them.

Via root_dir_in_opsi you define what group should be used as the root
in opsi. You need to make sure that this group exists.

Note

The group clientdirectory is shown as DIRECTORY in configed.
If clients or groups are to appear directly below DIRECTORY the value for root_dir_in_opsi has to be clientdirectory.

If update_existing_clients is set to false clients already
existing in opsi will not be altered.
If this is set to true clients may have any manually set data overridden
with the values from the directory.

If prefer_location_from_directory is set to true clients will be
moved in opsi to the same location they have in the directory.
If you want to disable this set it to false.

Attribute-Mappings

With a system as flexible as a directory service the connector must
be given information about what attributes in the directory match these
of the corresponding opsi objects.

The key of each mapping is the attribute in opsi and the value is the attribute from the directory. If the value (in the mapping) is empty no mapping will be done.

Note

If the value read from the directory for the client ID does not seem to be an FQDN an FQDN will be created. The domain part for this will be created from the DC of the read element.

Tip

On UCS the value for hardwareAddress can be set to macAddress if the connection is made through LDAP (ports 7389 or 7636).

Manual assignment of group names

Group names are usually used without any major adjustments.
But this may lead to cases where names should be used that are invalid in opsi.

For this special cases a manual assignment of group names can be helpful.

To configure this an entry group_name has to be created in mapping.
This holds the mapping from the directory to opsi.
Names that are not present in this mapping aren’t changed.
The group names are always processed in lowercase.
This can be configured since version 23.

The following example handles the group _server originating from the directory as server in opsi.

Set address to the address of your opsi server. Please include the
port.

Note

To use a proxy for the connection use the environment variable HTTPS_PROXY.

username and password should be set accordingly to authenticate
at the opsi server.
If passwordFile is set the value will be interpreted as path to a file that contains the password.
The content of the file will be used as password.
This allows for not having the password written in plaintext in the file.
This will override the value set for password if the file can be read.

Tip

We recommended setting up a dedicated user for this task. Refer to the document Getting Started on how to do this.

If the parameter exit_on_error is true then any problem that appears when updating data in opsi opsi - this could be triggered by submitting values that are invalid in opsi - results in a break.
If this is false then problems will be logged but the run will not be stopped.

With connection_options the options for connecting to opsi can be set.
verify_certificate configures the verification of the server certificate.
For selfsigned certificates this can be set to false.

Since version 14 it is possible to test the connection to the opsi server through the paramter --check-opsi without connecting to the directory.

Running the connector

After installation a binary called opsidirectoryconnector will
be present on the system.

It is required to pass an argument --config together with the path to
the configuration.

Note

The user running the binary does not require any access to opsi as this is all specified in the configuration.

Example: recurring runs with systemd

The connector currently does one synchronisation run when executed but
the chances are good that you want to have a constant synchronisation of data.

It is easy to automate the execution of the connector to have recurring runs.

We will use systemd for this.
In contrast to cronjobs systemd will avoid overlapping runs and is therefore
a good choice.

The following example will set up the connector so that it is run five minutes after the machine was booted and from then on every hour.

In the directory /etc/systemd/system/, this is the directory for user-defined units, you need to place the two following files.
One for the timer that makes the job recurring and one for the job itself.

9.4. opsi WIM Capture

Prerequisites for the opsi extension opsi wim capture

This module is currently a
co-funded opsi extension.
Some preconditions are required, in order to use this module. That means that you need a suitable modules file to unlock this extension. You can get this file by purchasing the extension module. For evaluation purposes you can get a temporary modules file without charge. ( → mail us at info@uib.de).

Technical requirements are opsi 4.0.6 with package versions:

Table 4. required packages

opsi-package

version

opsi-linux-bootimage

>= 20160111

opsi-client-agent

>= 4.0.6.3-8

Windows Netboot >=7

>= 4.0.6.1-3

opsi-clonezilla

Caution

For the product opsi-wim-capture the share opsi_depot_rw must have read/write permission for the pcpatch. Check your Samba configuration.

Since opsi-wim-capture Version 4.1.x there is a full uefi support

install.esd (instead of install.wim) as target format is supported since opsi-wim-capture Version 4.1.x.

Quick Info

For the people who are looking for a quick guide, this is the place to start. More detailed information follows below.

Pre-requirements

Set boot priority of PXE-Boot / LAN-Boot on Computer BIOS to first priority

Computer must be configure with the following specifications on the properties of the Netboot-Products:boot_partition_size=0preserve_winpe_partion = truewindows_partition_label = WINDOWSwindows_partition_size=100%

Target product completion:
The target product used is usually one of the provided capture products, e.g.: win7-x64-capture
Winpe and Drivers directory can be created as symbolic links from the standard product.
The install files folder must be copied because the install.wim must be adapted.
In addition, Files from the custom directory are copied or linked, e.g.: unattend.xml

Target product (e.g. win7-x64-captured) adjusting the following to setup:Imagename= (Apply the same name from the property opsi-wim-capture)

Introduction

With NT6 (i.e. from Vista), Microsoft has introduced a new Image Format/ Container for OS Installation. Its called Windows Imaging Format (WIM).
A WIM Image is not exactly an image of a disk or partition, but rather an archive of files and Metadata. A WIM file can contain several images. The default installation of an NT6 operating system works like this:
setup.exe unzips an image from an install.wim file, configures it, and adds some additional drivers.

This way, an installation is quicker than with NT5. But then installation of Hotfixes with NT6 takes significantly longer, so that the basic install of Windows 7 will take 30 minutes, but adding all required Hotfixes may take several hours.

With this opsi extension, it is possible to read an installed Windows OS, including installed software, Hotfixes and configurations, and save it as a WIM image. This WIM file can then be used as a source for a fresh Windows Installation.

Our product opsi-wim-capture is made exactly for this purpose. Roughly, we boot off a PE partition, so that the PE can read the system partition and save it into a WIM file.

Overview of the Sequence

Capturing an installed Windows image works like this:

Preparation:

opsi - installation of a Windows OS with set property:preserve_winpe_partition=trueboot_partition_size=0windows_partition_size=100%

run the product opsi-wim-capture.
All the following steps will be controlled by the product opsi-wim-capture:

via opsi-clonezilla, makes a backup of the disk (OS and winpe partition)

backup of the opsi metadata

make winpe partition bootable, create winpe script (work.cmd)

sysprep of the installed systems (depersonalization)

boot winpe, capture of OS disk, write to destination product

restore of the original disk (OS and winpe partition) via opsi-clonezilla

Sequence Details

Preparation

Installation of a Windows OS must have the property set to true like this preserve_winpe_partition=true, because the winpe partition will be needed later.

Figure 78. Schema: Deployment of Windows OS

After the Windows OS installation you can install additional Software and Hotfixes, configure the system manually or via opsi.

Figure 79. Schema: Installation of opsi products

opsi-wim-capture

The whole sequence will need time, at least an hour. It will work unattended, though.

In case the property disabled is set to true (default=false), the process will be canceled immediately. This switch is for development only.

The setting of the property always_backup_before_sysprep will be checked.
If yes, it’ll make a backup of the system via opsi-clonezilla.

Note

In opsi-clonezilla, the runcommand is ocs-sr -q2 --batch -j2 -rm-win-swap-hib -i 2000 -p true savedisk imagefile sda . Within this command, imagefile will be set according to the value of the property clonezilla_imagefile . In case its set to auto (default), we’ll configure the value for imagefile automatically. This will be done with the help of property values and the client name according to the following pattern:<FQDN of client>_<target_product>_<imagename>
If the value is not auto, the value contained will be used as imagefile. Furthermore, we’ll set the product opsi-clonezilla to setup. In order to initiate opsi-clonezilla, reboot.

In order to avoid a never ending loop, we write a reboot flag, so that after writing the backup, we can see that this step has already been done.

Technical note: We do not want to reboot again after restoring the backup, though (but the reboot flag is contained in the backup). Thats why the reboot flag is being set as a time stamp. In case the time stamp is older than 0.1 days (i.e. 2.4 hrs), it will be ignored.

The system will reboot now, leaving the product opsi-wim-capture set to setup. opsi-clonezilla will start up and do the backup.

Figure 80. Schema: Backing up the disk via opsi-clonezilla

Tip

Why backup via opsi-clonezilla ?
The sysprep action to follow will leave the OS partition unusable.
An OS, that is set up from a captured WIM Image, will contain information about the sysprep run. Thus, it cannot be used for further capturing via opsi-wim-capture.
Only perform repeat capturing using a previously restored opsi-clonezilla image.

The product opsi-clonezilla is now being configured in a way that it will perform a restore on next run.

Figure 81. Schema: Saving opsi-meta-data to c:\opsi.org\tmp

Now information about the installed opsi-products (and versions) will be stored on the client.

Note

The productOnClient objects of all Localboot Products are being written to c:\opsi.org\tmp\productonclients.json .

Figure 82. Schema: Deactivating the opsi-client-agent

The machine’s opsi-client-agent is now being deactivated, so that it cannot run after deployment based on this image.

Figure 83. Schema: Depersonalization of the OS partition via sysprep

In order to be able to deploy the captured image like a default Windows Setup to any machine, it needs to be depersonalized. This will be done via sysprep.

Tip

This does not mean all of the software will be depersonalized. It’s , that installed software holds data regarding on which computer it was originally installed. A config of that kind will be likely to cause problems, specially if you deploy the image to different machines. It might be a good idea not to capture all the software on the computer.

If the property startcapture is set to false (default=true), will stop working after the sysprep, and shut down the machine. This makes sense only if you plan to take an image of the machine using a different tool.

Figure 84. Schema: Activating and boot-enable the PE partition

In order to read the OS partition and writing it into the WIM file, we have to use a Windows OS, which cannot be the Windows OS we want to read (for obvious reasons). Therefore, we use the Windows PE we created and preserved at the initial installation.
And afterwards:

Activation of the WinPE as bootable partition, creation of the required boot record, (if necessary) deactivation of drive letters of other partitions

Reading opsi metadata concerning installed products on the client, saving the data to a temporary folder on the client

some cleaning on the system we want to capture

Figure 85. Schema: Creating work.cmd inside the PE

Writing a command file, which will initiate the capturing at next WinPE boot.

Provisioning of further data for the WinPE run, like list of products from the property start_after_capture

Reboot the client

Figure 86. Schema: Capturing the OS partition when on PE

Now the WinPE starts and will do the actual capturing. Here are the details:

Mounting the opsi_depot_rw share, so that we can write to it.

Checking the architecture of the WinPE (32/64 Bit); start of the corresponding opsi-script interpreter.

Establishing a connection to the opsi-webservice

Re-activation of the drive letters

If the property check_disk_before_capture contains the value true (default=false), we perform chkdsk on the Windows OS partition. That will take time.

Checking for existence of the target product stated in the property target_product on our opsi_depot_rw share, and whether it contains an install.wim file in the right place.

Checking and creating a lock file within the target_product folder. If this file exists already, we cancel the process in order to prevent several capturing processes writing to the same WIM file.

If the property force_imagex is set to true (default=true), then we use the imagex command of our product opsi-wim-capture for capturing, even if the Windows PE has a dism command. Otherwise dism will be used, if available. Dism is faster, but might produce images that cannot be used for successful deployment.

If the property capture_mode is set to append: Check, if there is an image of that name contained in the install.wim, and delete it.
The value always_create will only be accepted, if dism is being used. In this case, a new install.wim file will be created.

Start of the capture process. The previously mentioned tool (imagex vs dism) and the capture_mode chosen will be used. The name of the image is set by the property imagename. The property image_description will determine the description of the image.
This can take a long time to be completed.

Caution

Keep in mind the name of the Image! The name of the image created can’t be automatically added to the list of installable images at the current time. You have to keep the name in mind and state the image name when deploying!

Deleting of the lock file in the target_product folder.

Merging the resulting log files.

Request action setup for products contained in the property setup_after_capture.
At this time, also product dependencies will be resolved.
The property is a list and can contain several product IDs.

Tip

leave settings so that opsi-clonezilla will be set to setup!
The machine will be depersonalized after the capture run, and thus remain unusable. Our product opsi-clonezilla is prepared, so that the backup taken earlier will be restored automatically.

Deactivation of the WinPE partition, and re-activation of the OS partition (Windows).

Transfer of the logfile to the server. It will be appended to the existing logfile of the opsi-wim-capture run.

Reboot

If the product opsi-clonezilla has been set to setup, a restore of the disk is being performed automatically.

Figure 87. Schema: Restore using opsi-clonezilla

Products

Main Product opsi-wim-capture

The product opsi-wim-capture contains the following product properties:

always_backup_before_sysprep:
(true/false), Default=true,
Always make an opsi-clonezilla backup before sysprep.

startcapture:
(true/false), Default=true,
Sets the product opsi-local-image-capture to setup, and reboots the machine

disabled:
(true/false), Default=false,
If set to true, nothing will happen. Its only there for debugging.

target_product:
Name of the target product: (Default = '')

Important

This property is not intelligent, i.e. we do not check, if the image being copied matches the target product. You could easily write a win7-32Bit Image into a Win81-64Bit product without errors. But you shoud not do that! Furthermore, we recommend separated products for capturing, that are only target products in the capture process. (for instance win7-x64-captured).

The target product has to be prepared for deployment like any other Windows OS product. The target file within the target product will be the install.wim file (installfiles/sources/install.wim), which also contains the images provided by Microsoft. Our new OS image will either be created as a new install.wim , or be appended to the existing file. This is being controlled by the property :

capture_mode:
(append/always_create) Default=append:

append will append the newly created image to the existing install.wim .

Important

If the install.wim contains an image that’s named like the new one, it will be deleted without warning. always_create will always create a new install.wim .always_create will not work with a WinPE based on Windows < 8 .

An Install.wim file is a container, that can contain several images. All of them have a name and a description, which can be controlled by the following properties:

imagename:
Default = ''

image_description:
Default = ''

The property start_after_capture
this is a list of products that will be set to setup after completion of the capture process. Could be good to use for instance opsi-clonezilla, which will restore the backup taken before sysprep.

force_imagex:
true/false (default=true) This will use the imagex tool, even if dism is available.

opsi_depot_rw_host:
Normally auto (default) or leave empty.
If not auto or empty: the host from which we mount the opsi_depot_rw share.
If the host is given, it must be a hostname, a FQDN or a IP Number
This property is only for situations where the opsi_depot_rw share is not reachable at the opsi depot where the client is assigned to.

checkdisk_before_capture:
Should we make a file system check on the system partition before we capture.
Default = false.

verify_clonezilla_images:
Should Clonezilla check the images after_save, before_restore, never, always
A verify check takes nearly the same time as the save or restore process.
Default = never

Target Products

The target products shall host the captured images.

Why target products ?

The target products do not differ from default opsi Windows netboot products. Technically, a standard win7-x64 they can be used as a target product.
We recommend the usage of dedicated target products, so that it is easy to differentiate a modified installation (opsi-wim-capture) from an unmodified installation (original Microsoft DVD).
Furthermore, it might be wise to keep a fall back product you can switch to in case the captured install.wim becomes unusable for some reason.
This decision is for you to make.

We provide the following target products:

win7-x64-captured

win81-x64-captured

win10-x64-captured

These products have to be equipped with required files from the OS DVDs like any other Windows netboot product (see our opsi-getting-started document).

Still, folders like winpe or drivers/drivers/additional/byAudit can be symbolic links to a directory in a suitable non-target product. Watch out: the Subfolder installfiles needs to be physically there (copy from Windows DVD).

Windows Installation via Target Product

(Deployment from a captured Image)

Restore of the opsi metadata from installed Products

The Problem:

If you reinstall a Windows with opsi, e.g. win7-x64, then during the installation of the opsi-client-agent all the local Boot products, which in this computer were previously marked as` installed`, will automatically be set to setup and thus reinstalled later.
This can not be completely carried out exactly in the rolling of a captured Image.
In the image is the backup from the opsi data that was stored during the capture process. This will be discovered when you install the opsi-client-agent and re-imported into the depot server. With it the products that were installed in the captured Image, now are on the newly installed computer mark as installed.
Should now all the products that are mark as installed set to` setup`, this would imply that all products installed already in the image will be re-installed. This is not desirable.

By the restoring from the opsi metadata of installed products there are two alternatives available now with opsi 4.0.7:

Alternative 1:
Restoring the metadata and retention of setup -Action Requests.
Products that are mark as installed will not be set to setup.
This is the default, and the behavior before opsi 4.0.7

Alternative 2:
Restoring the metadata. Products that are mark as installed will be set to setup except those which were contained in the restore metadata.

Alternative 1
By the deploy from a captured image, after the install, only the products which were already from the beginning of the OS-install set to setup will be automatically installed. These can be done through your intervention, or through the property setup_after_install.
Therefore only the products which stood at setup before installing the operating system will be installed in this case.
This is the default, and the behavior before opsi 4.0.7

Alternative 2
Variant 2 behaves similar to what would be the case of an installation without a captured Image:
* Restore of the metadata.
* Products that are mark as installed are then set to setup except those which were contained in the restore metadata.
This behavior is only available since opsi 4.0.7 and is not the default. Option 2 is made possible by enhancements to the opsi script and is part of the opsi-client-agent of 4.0.7.
In order to be able to apply this behavior a config must be set on (Host parameters) :
The Boolean configuration entry: clientconfig.capture.switch_installed_products_to_setup. If the entry for this client has the value true then variant 2 is applied, otherwise variant 1

host parameter can have specific client events activated or deactivated.
The host parameter can be applied using the opsi-configed or the opsi-admin.

To create the host parameter over the opsi-admin the following commands are to be executed on the’opsi-config-server':

Preconditions for using the opsi Linux Support

The opsi support for Linux is based on a free Open Source component (the netboot products) and a co-funded component (the client-agent).

The opsi-linux-client-agent is a
co-funded opsi extension module.
In order to use the opsi Linux extension module, an activation file is required, this file can be acquired by buying the extension module. To obtain a temporary activation file for evaluation, please email us at info@uib.de.
For further details on handling extension modules please refer to the opsi manual.

opsi-linux-client-agent: 15 Free starts

The opsi-linux-client-agent includes 15 Free starts by which the agent can be used without any activation

In detail: After the initial Install from the opsi-linux-client-agent the opsi-script can be started 15 times in service context without the need of activation.
This gives you the possibility to set a Linux computer with the corresponding opsi-products for the configuration needed.
For example, after the installation of the system you could use the product l-opsi-server to make of the newly installed computer an opsi-server.

For a long lasting maintenance of the installed Linux computers after the 15 free starts, it is recommended the activation of the feature, in order to continue taking advantage of its benefits.

Installation of the packages

The Linux-related packages can be loaded over the opsi-package-updater.
By default it already has the repository for the linux packages activated.

You can use the following command to install the packages:

opsi-package-updater -v --repo uib_linux install

Introduction

A single management tool for Windows and Linux

The objective of the opsi Linux extension module is to provide an homogenous management system for heterogenous environments. The focus is on integrating both worlds into the same management processes and tools

This means, that a Linux installation is triggered the same way as a Windows installation. The Linux opsi-client-agent is based on the same source code as the Windows client and provides (when applicable) the same opsiscript instruction sets.

Independent from Linux distribution

The opsi Linux Support is designed to be independent from any special Linux distribution.
The following distributions are supported:

Debian

Ubuntu

OpenSuse / SLES (Suse Linux Enterprise Server)

RHEL (RedHat Enterprise Linux)

CentOS

UCS

Linux netboot products v406 based on the distibution installer

With opsi v405 the installation of Linux targets has been controlled by the netboot product. The opsi v406 Linux netboot products are based on installer of the respective distribution.

This is a fundamental change of the structure and behavior of these products.
Overview of the changes:

Like with the unattended Windows installation, the Linux installer is equipped with an answer file to configure the unattended installation.

The installer of a distribution is not like with Windows an executable program, but is a combination of the distribution kernel and initrd implementation.

The system installation including partitioning, LVM, and all the basic software, are performed by the installers and not by the bootimage anymore.

For the Suse and RedHat like distributions, the installation sources have to be provided by you by introducing the DVD as an ISO-file on the depot share. This is comparable to the Windows installation, with the difference that the Windows installation files are stored in a different place and stored as the content of the DVD and not as an ISO file.

For the Debian like distributions, the installation sources are taken from the internet. Just the netboot versions of the distribution kernel with the associated initrd are placed on the depot share. These files are small, so they are included in the opsi package.
Since opsi 4.0.7 it is also possible to provide for some netboot products a local http repository.

For further maintenance of the installation the opsi-linux-client-agent can be installed with the basic installation.

Description of the automated installation process:

The opsi-linux-bootimage boots, deletes the partition table and creates a small temporary partition.

The opsi-linux-bootimage fetches the initrd for the distribution and unpacks it on the temporary partition.

The opsi-linux-bootimage fetches the generic answer file, patches it (personalisation) and moves it to the initrd directory.

The opsi-linux-bootimage creates some helper scripts and configuration files (e.g. for installing the opsi-linux-client-agent) and moves them to the initrd directory.

The opsi-linux-bootimage packs the patched initrd directory

The opsi-linux-bootimage boots the distribution kernel with the patched initrd per kexec.

The distribution kernel with the patched initrd performs the unattended installation of the target system and finally installs the opsi-linux-client-agent.

Advantages:

The installation is done as specified by the distributor, which is of special importance for providing support in the business context.

The opsi integration of new releases is easier and faster available.

For Suse and RedHat like distributions, the installation is done from the sources on the opsi-server, and therefore is faster and more stable than installing from the internet repositories.

Disadvantages:

Currently there is no UEFI support available. The information about UEFI gets lost during kexec boot. We hope to fix this with a future bootimage.

Providing the installation media on the server

For Suse and RedHat like distributions, the installation media is provided by an additional nfs-share: opsi_nfs_share.

To configure this share, there must be a NFS server installed and configured on the opsi-server:

Since opsi v4.0.6 stable this is done by the special package opsi-linux-support. This package is not installed by default and must be installed manually once, e.g.

apt install opsi-linux-support

If a firewall is running on your system you need to configure it to accept
TCP connections at port 80.
Please consult the appropriate manual on how to do this.

The opsi-linux-support package performs the following tasks:

Installation of the applicable nfs-server package on the opsi-server. For Debian, Ubuntu, Suse this is the package: nfs-kernel-server. For Centos, Redhat it is the package nfs-utils.

The share opsi_nfs_share has the following directory structure:opsi_nfs_share/<productId>/<arch>/<dvd>.iso
example:opsi_nfs_share/opensuse13-2/64/openSUSE-13.2-DVD-x86_64.iso
The installation file must have an extension .iso, the name of the file does not matter. If there are several .iso files in the same directory, it is not specified which one to use.

Copy the installation DVD to the opsi_nfs_share and execute:opsi-set-rights /var/lib/opsi/depot/opsi_nfs_share
IMPORTANT: use the standard installation DVDs of the distribution. Modified installation DVDs might have a different structure and therefore cannot be used in this context.

If for any reasons the directory /var/lib/opsi/depot/opsi_nfs_share cannot be exported by the opsi-server per NFS (for instance because the depot share is already a NAS NFS share), so the NFS share to be used can be specified by a server config. Like clientconfig.opsi_nfs_share=172.16.166.1:/var/lib/opsi/depot/opsi_nfs_share

The opsi v406 netboot products for Debian and Ubuntu do not get their installation files from an ISO file. They are provided by opsi with the standard netboot kernel and initrd. All further packages are taken from the internet. To relieve the network connection, using an apt-cache might be useful.
See chapter the section called “Proxy for .deb-packages”

partition_method:
The method use for partitioning of the disk:regular: use the usual partition types for your architecture / lvm: use LVM to partition the disk / crypto: use LVM within an encrypted partition
Possible: "regular", "lvm", "crypto"
Default: lvm

The product ucs41 and ucs42

The basic OS installation files are taken from the the official UCS repositories.

This product has a productive state.
With this product one can install a master, slave, backup and even a memberserver.
It is recommended to use the l-opsi-server localboot product to make an opsi server out of the UCS machine.
Memberserver are supported when an opsi server is installed through l-opsi-server.
This localboot products makes special adjustments to the server, so it can deploy clients like other UCS roles.

This product has the same properties as described above for debianX or ubuntuX and the following additional ucs specific properties:

Setting up a local deb http repository

With debian8, ubuntu 16-04 and ucs41 package it is now possible to install from a local Apache2 repository.
To do that on Product as property '' you must introduce the Address based on this example http://<opsi-server>/opsi/<productId> e.G http://opsiserver/opsi/debian8
Furthermore, the local repository must be of course created.
To do this please make sure that the product opsi-linux-support is installed on your opsi-server. This package installs the required packages for each Distribution(apache2) and also creates the necessary folders. These must be then completed with the corresponding Distribution repository.
To that end there are two possibilities:

Simple: You download a built and tested Repository from us and unpack it

Elaborate: You build it yourself

Simple:
Execute the following command as root.
Note that the path to the Apache2 DocumentRoot has different defaults which are dependent to each distribution.
Therefore, you may need to use the second line of the script !

Caution

An own repository created from an UCS 4.2-0 DVD leads to an uninstalable state. The package depootstrap on this DVD is not able to install the system without interaction. However our provided repository is not affected by this.

Source of installation. To download the installation DVD you need an account on SUSE.
Installation DVD should have the name (we’ve made tests with files with these names):
sles11sp4: SLES-11-SP4-DVD-x86_64-GM-DVD1.iso
sles12: SLE-12-Server-DVD-x86_64-GM-DVD1.iso
sles12sp1: SLE-12-SP1-Server-DVD-x86_64-GM-DVD1.iso
Copy the ISO-File to /var/lib/opsi/depot/opsi_nfs_share/opensusel42-1/64/
Please don’t forget to execute opsi-set-rights.

Videos (time lapse). The following video shows an installation.
It is made with one frame per second and because of that, the installation that you see it is much more faster than a normal installation.

Source of installation RedHat. To download the installation DVD you need an account on RedHat.
Installation DVD should be named we’ve made tests with a file with these name:
rhel-server-7.0-x86_64-dvd.iso
Copy the ISO-File to /var/lib/opsi/depot/opsi_nfs_share/redhat70/64/
Please don’t forget to execute opsi-set-rights.

Videos (time lapse). The following video shows an installation.
It is made with one frame per second and because of that, the installation that you see it is much more faster than a normal installation.

Linux v405 netboot products without distribution installer

Basic OS installation per netboot

To install Linux on a client, at the beginning the standard opsi-linux-bootimage boots per netboot. It is the same image as the one used for the Windows installation.
The bootimage automatically performs the partitioning and formatting of the hard disc (/ and swap). Next the installation of the basic Linux Operating System is performed (including network and ssh, but without X11). The installation process itself is quite different for the individual distributions, but has in common, that the installation is performed directly from the original distribution packages.

The basic Linux installation can be extended with optional opsi packages, for instance to turn the system into an opsi-Server (a new depotserver for instance).
Also the opsi-client-agent for Linux can be installed, which enables the automated installation and configuration of further software packages.

The opsi-client-agent for Linux is available as a co-funded opsi extension module, the required opsi netboot products for Linux installation are available as free Open Source modules.

Because the base installation is done from the Standard opsi-linux-bootimage, there are some distribution dependent differences, that have to be installed and configured after the first reboot of the installed system. This is for example the SELinux installation of the RedHat like or the keyboard configuration of the Debian like systems. These after boot installations and patches are done by the standard localboot product l-os-postinst.

Common properties of the v405 Linux netboot products

The following properties for controlling the Linux installation are available with all netboot products:

askbeforeinst:
confirm start of the new installation on the client? (default=true)

architecture:
architecture selection - affects the selection of the bootimage and the installation architecture. (default=64bit)

system_partition_size:
size of the system partition - the size may be given as percent of the hard disk size or as absolute size (G=Gigabyte). If you choose another value than 100%, the remaining rest will be used as data_partition. (default=100%)

swap_partition_size: +size of the swap partition. (default=2000M)

data_partition_create:
create a data partition if there is some space left. (true/false) (default=true)

data_partition_preserve:
preserve an existing data partition?always = cancel the installation in case the preservation of an existing partition with the label data is not possible with the given partition data.if_possible = an existing partition with the label data is preserved if possible according to the given partitioning parameters. Otherwise it will be deleted.never = a new partition table will be created. (default=never)

wget_and_execute:
fetch a file via wget and execute it -
URL (http) of a file to be executed at the end of installation. (default='')

install_opsi-client-agent:
install the Linux opsi-client-agent (cofunding project: has to be activated by the /etc/opsi/modules) (default=false)

release:
(Debian and Ubuntu only)
which release of the distribution is to be installed? (default = distribution dependent)

setup_after_install:
opsi product(s) to be installed after the OS installation is done
(opsi products to be set to setup) (default=l-os-postinst)

Netboot products for Linux distributions

====== ubuntu

The basic installation is performed per debootstrap directly from the network.

This product has the status productive.

It is UEFI/GPT compatible (tested for release=trusty).

For this product applicable opsi-server packets are available, that can be installed by setting install_opsi_server=true.

====== debian

The basic installation is performed per debootstrap directly from the network.

This product has the status productive.

It is UEFI/GPT compatible (tested for release=wheezy).

For this product applicable opsi-server packets are available, that can be installed by setting install_opsi_server=true.

opsi-linux-client-agent

The opsi-client-agent for Linux is part of the cofunding project Linux Agent, which is liable to pay costs.

The opsi-client-agent for Windows is based on two components:

the service opsiclientd

the action processor opsi-script / opsi-script-nogui

The opsi-client-agent for Linux is based on the Linux port of the Windows client agent.

The opsiclientd is not ported to all supported Linux distributions.
If no opsiclientd is available, it is substituted by a direct opsiscriptstarter call.
A Linux opsiclientd is available for:

Debian 7 / 8

Ubuntu 12.04 / 14.04 / 16.04

openSuse 13.2 / 42.1

SLES 12 / 12SP1

UCS 4.0 / 4.1

If there is no opsiclientd, so it is replaced by the opsiscriptstarter, which performs the following opsiclientd tasks at system start:

connect to the opsi-server: check whether actions are to be performed

mount the depot share

start the action processor

unmount the depot share

transfer the logfile to the server

The Linux action processor is named opsi-script and is built from the same sources as the Windows opsi-winst. So on Linux the same scripting syntax is available as on Windows. All common features, that are not Windows specific, are available, as there are e.g.:

file handling

string and stringlist functions

executing external scripts and programs

communication with the opsi-Server

patching config files

Of course Windows specific features (like patching the Windows registry) are not available on Linux, but there are some additional Linux specific functions like e.g.:

getLinuxDistroType

getLinuxVersionMap

Logging of the opsi-script ist available (like with the opsi-winst on Windows).

Linux opsi-script is available as a graphical version for working with X-Windows and a noGUI version for systems without graphical user interface.

opsi-linux-client-agent: Installation: service_setup.sh

This method is the first choice for installations on a single computer. service_setup.sh can also be used for maintenance or repair of a client. For mass roll-out, see the chapter below.

login to the Linux client with root privileges

mount the shared directory on the opsi server at \\<opsiserver>\opsi_depot to any mount point

change to directory opsi-linux-client-agent at the mountpoint

start as this place the script ./service_setup.sh

Caution

After the installation, the client will be restarted

opsi-linux-client-agent: Installation: opsi-deploy-client-agent

The opsi-deploy-client-agent script installs the opsi-client-agent directly from the opsi-server to the clients.

Requirements for the opsi-server:

The Python 2 package paramiko has to be installed. It is available as python-paramiko on most distributions and can be installed through the corresponding package manager.

Requirements for the clients are:

ssh access as root or as a user that has the possibility to run sudo

Note

When using opsi-deploy-client-agent 4.1.0.1 or older with a non-root user this has to have the possibility of executing sudo non-interactively.

The script creates the client on the server, then copies the installation files and the configuration information including the pckey to the client. After copying the necessary information, opsi-deploy-client-agent starts the installation on the client.

With the opsi-deploy-client-agent script a whole list of clients can be processed.
These can include any number of clients that can be passed as the last parameter, or with the option -f by which the clients can be read from a file.
When using a file, on each line a client must be present.

The script can work with IP addresses, host names and FQDNs. It will automatically try to recognize what kind of Address was passed.

The script can be found at /var/lib/opsi/depot/opsi-linux-client-agent
Run the script with root privileges.
It could happen that you must first make the script executable with:Chmod u + x /var/lib/opsi/depot/opsi-linux-client-agent/opsi-deploy-client-agent

bonifax:/var/lib/opsi/depot/opsi-linux-client-agent# ./opsi-deploy-client-agent --help
usage: opsi-deploy-client-agent [-h] [--version] [--verbose]
[--debug-file DEBUGFILE] [--username USERNAME]
[--password PASSWORD]
[--use-fqdn | --use-hostname | --use-ip-address]
[--ignore-failed-ping]
[--reboot | --shutdown | --start-opsiclientd]
[--hosts-from-file HOSTFILE]
[--skip-existing-clients]
[--threads MAXTHREADS]
[--keep-client-on-failure | --remove-client-on-failure]
[host [host ...]]
Deploy opsi client agent to the specified clients. The clients must be
accessible via SSH. The user must be allowed to use sudo non-interactive.
positional arguments:
host The hosts to deploy the opsi-client-agent to.
optional arguments:
-h, --help show this help message and exit
--version, -V show program's version number and exit
--verbose, -v increase verbosity (can be used multiple times)
--debug-file DEBUGFILE
Write debug output to given file.
--username USERNAME, -u USERNAME
username for authentication (default: root). Example
for a domain account: -u "<DOMAIN>\\<username>"
--password PASSWORD, -p PASSWORD
password for authentication
--use-fqdn, -c Use FQDN to connect to client.
--use-hostname Use hostname to connect to client.
--use-ip-address Use IP address to connect to client.
--ignore-failed-ping, -x
try installation even if ping fails
--reboot, -r reboot computer after installation
--shutdown, -s shutdown computer after installation
--start-opsiclientd, -o
start opsiclientd service after installation
--hosts-from-file HOSTFILE, -f HOSTFILE
File containing list of clients (one hostname per
line). If there is a space followed by text after the
hostname this will be used as client description for
new clients.
--skip-existing-clients, -S
skip known opsi clients
--threads MAXTHREADS, -t MAXTHREADS
number of concurrent deployment threads
--keep-client-on-failure
If the client was created in opsi through this script
it will not be removed in case of failure. (DEFAULT)
--remove-client-on-failure
If the client was created in opsi through this script
it will be removed in case of failure.

opsi-linux-client-agent: Installation: Via opsi netboot product

If you install a Linux via opsi netboot product, you only have to switch the property install_opsi-client-agent to true (which is the default) in order to install the opsi-linux-client-agent.

opsi-linux-client-agent: opsiclientd configuration

The opsiclientd for Linux is a port of the opsiclientd for Windows.
So it works withe similar configuration file which is located at:
/etc/opsi-client-agent/opsiclientd.conf.

Script examples

For software deployment on Windows clients there can be said: the installation of software itself is as important as the subsequent configuring of the software.
On Linux most packets are available from the distribution repositories. So the installation part is less, but the configuration part stays the same. Also there are applications, that are not available from the standard repositories.
In this case special repositories or installation sources have to be added to the system. The important feature is, that all installation and configuration settings can be managed and logged on the opsi-server.

Here are some example snippets for an opsi-linux-client-agent opsi-script:

Linux localboot products

Here some localboot products that are part of the standard opsi Linux support.

The product l-opsi-server

The product l-opsi-server serves to install on a Linux computer an opsi-server via opsi-linux-client-agent
in an automated way. This can serve to install quickly a new opsi-depot-server
or e.G. an opsi Test system.

Caution

Currently for a opsi-config server an other maschine can’t be a opsi-linux-client and a opsi-depot-server at the same time.
To work around this limitation, you have two possibilities:
1. Using one opsi-config-server: After the installation of opsi via l-opsi-server and before you register this maschine as opsi-depot-server, you have to delete it as client in the configed.
2. Using two opsi-config-servers: Setup a second independent opsi-config-server, which is only used to administrate (install and mantain) your opsi-servers. So this second opsi-config-server knows the other opsi-servers only as linux-clients. Your other (first) opsi-config-server know theses other opsi-servers as depots.
In a UCS environment method 2 is recommended and the second opsi-config server must not be a UCS Server.

The product l-opsi-server has the following Properties:

opsi_online_repository:
(Base-) Repository for opsi-server installation.
(Default="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40")
see also repo_kind

opsi_noproxy_online_repository:
(Base-) Repository for opsi-server installation (without any cache proxy).
(Default="http://download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40")
Should you require on opsi_online_repository to introduce a Proxy or deb-cacher
(e.G. 'http://mydeb-cacher:9999/download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40"),
than introduce the URL without Proxy. Otherwise introduce the same as opsi_noproxy_online_repository.

repo_kind:
Which kind of repository ["experimental", "stable", "testing"] should be installed ?. (Default=stable)
With the Client OS, opsi_online_repository and repo_kind the URL will be built and the client
will be added to an opsi repository.

backend:
Which backend should be installed ? (mysql needs a valid activation file). (Default=file)
A modules file with the require Activations can be stored in the custom directory of the product.
If a modules file is found there, then will this one used.

opsi_admin_user_name:
The name of the opsi_admin_user to create (empty= nothing created). (Default=adminuser)
If a user is introduced here, it will applied, also it will be added to the group opsiadmin, pcpatch/opsifileadmin
and become as unix and samba password the value opsi_admin_user_password

opsi_admin_user_password:
What is the password of the opsi_admin_user to create (empty= not allowed). (Default=linux123)
see opsi_admin_user_name

setup_after_install:
Which opsi product(s) should we switch to setup after l-opsi-server installation is done ?. (Default="")

allow_reboot:
May the server reboot if script is finished ?. (Default=true)

install_and_configure_dhcp:
Should we run the dhcp server on this machine ?. (Default=False)
If this property is false then the following properties: netmask, network,
dnsdomain,nameserver and gateway are meaningless because they are only used for
dhcp configuration.

myipname:
Set a different IP name (FQDN) (auto= use standard) (Default=auto)
Meaningless if install_and_configure_dhcp=false

myipnumber:
Set a different IP number (auto= use standard) (Default=auto)
Meaningless if install_and_configure_dhcp=false

ucs_master_admin_password:
Only needed for opsi installation on UCS Server with other Roles than Role Master. (Default=linux123)

update_test:
Do not use: Internal Debugging. (Default=False)

ucs_master_admin_password:
On a UCS machine the roles Slave, Backup and Member have to be joined correctly with the Mas
ter. This property takes the password to perform the join.

The product has setup required before dependency to the product l-system-update.
That means when you set l-opsi-server on setup it will also automatically set l-system-update also on setup
and installed before.

In the directory custom of the product l-opsi-server the activated file (modules) is stored, which is used in the Installation of the product l-opsi-server and will be preserved in the case of a new version of the product.

l-os-postinst

This product installs and configures those parts of the base installation, that cannot be done from the bootimage in a proper way.

This is for the different distributions:

CentOS:

installation of SELinux

This product has a dependency to the product l-system-update which is executed before running l-os-postinst.
This product has a high priority, so it is executed before common products.

l-desktop

The product l-desktop installs a desktop packet on the computer.

The property desktop selects the desktop to be installed. Not all of the desktops are available for every distribution. For instance Unity is available for Ubuntu only. If the selected desktop is not available, the distribution specific default desktop will be installed. Furthermore the scope of the desktop packets differs according to the distribution and the selected desktop. It can be just the actual desktop software, or might also contain some base products like libreoffice, firefox, PDF Reader etc.

The property desktop can have the following values:

Gnome
Default for Debian, CentOS, RHEL.
Available for all distributions.

KDE
Default für SLES, OpenSuse.
Available for all distributions.

Unity
Available for Ubuntu only.

Cinnamon
Available for Ubuntu only.

xfce4
Available for Ubuntu, Debian.

lxde
Available for Ubuntu, Debian.

l-system-update

This product updates the system.

l-swaudit

Software inventory, based on the packet manager

l-hwaudit

Hardware inventory.
The hardware inventory currently is based on the Python implemented method as also used by the bootimage. Therefore the packet python-opsi from the opsi-repository of the distribution must be installed. So if there is no opsi-repository available for this distribution, the hardware inventory fails.

l-jedit

Java based editor with syntax highlighting for opsi-script. If Java is missing on the system, it will be installed automatically.

Inventory

To create an inventory, the data are collected on the client and sent to the server. The hardware inventory is based on the methods implemented in the bootimage.

The software inventory is based on the data from the packet management of the deployed Linux distribution.

UEFI / GPT support

Some of the opsi 4.0.5 Linux netboot products are UEFI/GPT compatible.

The 4.0.6 Linux netboot products are not UEFI/GPT compatible. At the moment they loose their information about the uefi environment at the kexec boot of the distribution kernel. We hope to fix this at a later point.

For details refer to the list of netboot products above or see at the UEFI chapter of the opsi-manual.

Roadmap

Linux support is a brand new opsi feature. Therefore not all of the planned features have been implemented yet with the first release.
Planned features to follow are:

configurable partitioning

logical volume management

patching XML files

patching hierarchical configuration files like dhcpd.conf

Proxy for .deb-packages

Instructions for installation and use of servers for local caching of debian packages:

Preconditions for working with UEFI / GPT

This module currently is a
co-funded opsi extension.
Some preconditions are required to work with that module, which is to get a suitable modules file to unlock the feature. You can get this unlock file by purchasing the extension module. For evaluation you can get a time limited modules unlock file without charge. ( → mail to info@uib.de).

PXE-boot installs require a winpe that is capable of booting in UEFI mode. Often, an existing winpe will be capable of doing so, check by verifying there is a folder named EFI, as well as a file named bootmgr.efi inside your winpe folder.
If that is not the case, create a recent winpe as explained in our opsi-getting-started Manual, Chapter "Creating a PE". A winpe, that is UEFI capable, needs to reside in the winpe_uefi folder of the opsi netboot product.
Provided your winpe is already capable of booting UEFI and MBR modes, you could simply place a softlink winpe_uefi > winpe .

you have to configure your external DHCP server with the bootfilelinux/pxelinux.cfg/elilo.efi

Activate in the opsi-configed the checkbox "Uefi-Boot" for uefi-clients (since version 4.0.5.8.1) or set hostparameter clientconfig.dhcpd.filename=linux/pxelinux.cfg/elilo.efi

BIOS settings:
Since the BIOS menus are very different and use different terminology, you need to consider here what is the best fit for your BIOS.

Secureboot disabled
This entry is usually in the Boot or Startup but it can also be found in the Security area.

Turn the BIOS on in the UEFI-Mode. If you have the choice between UEFI only,Legacy only, or Both, then you should select UEFI only. If the selected option is Both this is not the best practice but it can eventually work. If the Legacy Support it is present, it should be disable. CSM Support in conjunction with UEFI only can remain enabled. Otherwise just disable it. UEFI Network Boot must be enabled. It could happened that the entry is also named Network Stack and also can be found under the UEFI category. If there are two categories for IPv4 and IPv6 here the right choice is IPv4.

Introduction

Recent PCs, tablets and server often are equpped with an UEFI BIOS. Often there is a legacy mode available to support the old features including PXE boot. But more and more devices come with an UEFI only BIOS (especially tablets). So they cannot be managed with the previous opsi environment.

To integrate these devices into opsi and to be able to use the advantages of UEFI, the uib gmbh developed the opsi extension for UEFI support.

What is UEFI and what is different about it?

UEFI is the abbreviation of Unified Extensible Firmware Interface and is the follow-up to the classic PC-BIOS (MBR-BIOS).

For detailled information on UEFI there are some links listed below.

UEFI has much more features than the old BIOS. Basically UEFI is a small operating system by itself. But in this place, we just consider some features, that are of special interes to the system administrator:

The recent (by January 2014) implementations of UEFI by the hardware manufacturers have not developed any clear standards yet. As soon as the system is to be booted from any other device but the hard disc, you face the utter chaos. Often UEFI and classic BIOS are implemented both, sometimes they can be deactivated individually, or sometimes not. UEFI can be implemented with the Compatibility Support Module (CSM), or without. Netboot might work, or might not.
Especially the availability of netboot is essential for structurd client management.

With the classic PC-BIOS the BIOS and its configuration usually are separated from the operating system. So BIOS configurations like the boot sequence cannot be changed by the operating system.
This is different with UEFI. The operating system can change the boot sequence (and usually it does). This has consequences for a client management that relies on netboot.

The UEFI Bios comes with its own boot manager, which not only can be used by the operating systems to change the boot sequence, but also contains the start entries for the operating systems themselves. This is to support the parallel installation of different operating systems, so that there is no conflict with the different boot loaders.

The UEFI BIOS can be implemented for 32 or 64 bit, which also presets a 32 or 64 bit operating system. So there cannot be installed a 32 bit OS on a 64 bit UEFI system.

UEFI Boot

In contrary to the old BIOS the boot sequence not only can be defined for devices, but also can be set for different bootloaders on the EFI system partition. Furthermore the sequence can be changed by a running operating system. So if you set netboot as the first boot priority, this setting will not survive the first OS installation.

UEFI Netboot

Unfortunately early UEFI implementations do not support netboot at all, but netboot support is increasing.

Meanwhile there are a lot of UEFI bootloader (like grub2 or elilo), but mostly without netboot support.

With the UEFI support extension module uib gmbh has developed a succesfull UEFI netboot support for integrating UEFI clients into opsi. Because the UEFI standard is still under development and changing, in future the opsi UEFI module will continue to adapt to the technical changes, which might require structural redesigns of the module.

opsi support for UEFI netboot

The opsi support for UEFI is based on several components:

adaption of the netboot UEFI bootloader ELILO to the opsi / client-management requirements.

new opsipxeconfd, which also supports config files for the opsi-ELILO (in addition to the PXE config).

new (64 bit) opsi-linux-bootimage with the tools for UEFI- and GPT management

redesigned netboot products for OS installation (Windows/Linux) with additional support of UEFI/GPT (of course only for OS that support UEFI).

client setting on the opsi-server whether to be treated as UEFI client or not. (clientconfig.dhcpd.filename=linux/pxelinux.cfg/elilo.efi)

support of a software triggered switch to UEFI netboot.
The label of the UEFI netboot entry of the Bios can be saved on the opsi-server (clientconfig.uefinetbootlabel), as far as the BIOS supports it (so there is an activatable netboot entry in the Bios). This allows opsi-product to enbale netboot selective for the next reboot. This technique is implemented in several opsi products. An important example is the product opsi-uefi-netboot:
This product tries to configure the Bios for netboot and then triggers a reboot. If there is no uefinetbootlabel or it is a non UEFI client, just a reboot is triggered.
This product is available for Windows and for Linux.

Installation

All packages required are installed automatically with opsi version 4.0.5.

Example for the configuration of a Windows DHCP server 2012 R2

As standard for this variant the PXE boot file for x64 Uefi installations is entered as default. DHCP options 66 and 67 are adjusted as it follows:
066 Host name of the start server: <IP of the opsi server>
067 Name of the start file: linux/pxelinux.cfg/elilo.efi

To distinguish the Bios clients, a manufacturer class identifier (PXEClient:Arch:00000:UNDI:002001) must be defined on the DHCP server:

Alternative elilo.uefi

The elilo.efi distributed by default is configured to wait indefinite time for information to perform a netboot.
In most scenarios this is not a problem because after an succesful installation the boot order will be automatically changed to boot from harddisk.
However the UEFI of some devices is unable to follow the UEFI specification in this regard and this is impossible.

There is an alternative elilo.efi that only waits a short time before attempting to boot from a local disk.
Unfortunately this does not work with all devices, especially when using NVME disks, and therefore is not the default.

Criteria for a good BIOS

Whether an UEFI BIOS meets the requirements of a client management system like opsi depends on several criteria. These criteria do not estimate the qualitiy of the device, but only whether it can be managed by using netboot. This requires BIOS functions for UEFI netboot. Hier an example comparison:

Table 13. Example for UEFI BIOS differences

Lenovo Twist

MS-Surface

Dell Venue 11

UEFI pure

√

√

√

UEFI + CSM

√

x

√

Legacy

√

x

√

Both

√

x

x

UEFI Netboot

√

√

√

activatable entry

√

x

√

netboot without interaction

√

x

√

In this case activatable entry means, that for the next reboot a netboot can be activated by standard software. netboot without interaction means, that an activated netboot will be executed at the next reboot without any require4d interaction (like pressing any key combinations, F12 key, …). If these preconditions are met, special opsi products can trigger a netboot. This feature is very important for automated processing. A product using this feature is for instance the localboot product for Windows and Linux opsi-uefi-netboot.

Technical details

The following sub chapters provide some information for scripted or manual handling of UEFI / GPT. For understanding how opsi works with UEFI/GPT, knowing these details is not required.

Technichal details about UEFI

UEFI Bootloader entries can be managed on Linux with the program efibootmgr.
List of boot entries:

Furtheron the tool gdisk (and sgdisk, …) has an internal substitution table for unknown partition types. For the old partion type for vfat32 0b there is no corresponding 0b00. By passing the type 0b00 to sgdisk, it will be translated to 0700 without any message. Perhaps because of the consideration: vfat32 - this must be some Microsoft data partition …

GPT partitionen can have attributes.

List of the currently known attributes

Value

Description

Attribute value (sgdisk --info / diskpart gpt attribute)

nix

nix

0000000000000000

0

system partition

0000000000000001

1

partition hidden from EFI

0000000000000002

2

legacy boot flag (legacy BIOS bootable)

0000000000000004

60

read-only

1000000000000000

62

hidden

4000000000000000

63

do not automount

8000000000000000

On Linux the attributes can be set with sgdisk by the option -A, --attributes and using the short form. On Windows they can be set with diskpart by the command gpt attributes and using the long form.

opsi UEFI/GPT Roadmap

UEFI 32 Bit support

other netboot capable UEFI boot loader (grub2)

Secureboot

9.7. opsi local image

Preconditions for the opsi extension opsi local image

This module currently is a
cofunding project.
Some preconditions have to be met to use this module. So it requires a special modules file to unlock this feature. This module file can be obtained by buying the extension module. For evaluation we also provide a temporary modules file without charge ( → mail to info@uib.de).

As a technical precondition opsi 4.0.3 is required with the packet versions:

Table 14. Required packets

opsi packet

version

opsi-linux-bootimage

>= 20130207-1

Caution

For the product opsi-local-image-capture the share opsi_depot_rw must have write permission for pcpatch. Check your Samba configuration.

Introduction

Opsi offers a good basis for the automated installation and maintenance of Windows clients - especially when there is heterogeneous hardware to be managed. But the opsi standard installation technique based on installation packages is not fast enough to restore class room workstations in a short time, during breaks between two classes, for example. So this module is introducing a new concept, by saving the result of the package based installation as an image on a second partition. From this partition a recovery can be performed in a small amount of time.

Initial installation concluding with a local image backup

Fast recovery based on different techniques

System maintenance also concluding with a local image backup

Integration of captured installations to WIM

Integration of Linux clients into the Backup/Restore procedure.

Concept

The requirements of computer networks for education / trainings / class rooms differ from those of other networks. An important requirement, which will be discussed in the following, is the fast recovery of workstations to regain a clean and well known installation status, which has been spoiled by temporary use. This is required for workstations in class rooms, but also for computer pools at universities or any networks for commercial trainings.

The restore must be completed within a brief amount of time (about 15 minutes) and should also be able to switch the workstations to a different base installation (like Win XP / Win 7 / Linux). Also the continuous system maintenance by installing security updates must be included.

The standard approaches for the system maintenance have different advantages and disadvantages:

Table 15. Advantages and disadvantages from Unattended and Image based solutions

Feature

Unattend

Image

Performance

(-) slow

(+) fast

Sensitivity to heterogenous Hardware

(+) low

(-) high

Network load

(-) high

(-) high

The concept of opsi-local-image tries to combine the advantages of the different approaches:

Table 16. opsi-local-image

Feature

Unattend

Performance

(+) fast

Sensitivity to heterogeneous Hardware

(+) low

Network load

(+) low

The main features of this combined concept are:

Initial Windows installation per PXE boot, based on packages with individual driver integration by using the opsi-Linux-Bootimage

Storing the result of the initial installation as a backup image on another partition on the local disc by using the opsi-Linux-Bootimage

Fast recovery of the installation by using the opsi-Linux-Bootimage

Maintenance of the local installation (security updates) by using the opsi system and storing the updated system to the local backup-image by using the opsi-Linux-Bootimage

Technical Concept

The workstation is being used with a static partition table of three or four partitions.:

Partition 1 (System)
holds the currently installed operating system (Windows / Linux).
The size of this partition is set during partitioning by the product opsi-local-image-prepare according to the particular property state.

Optional: Partition 2 (sysdata)
These are user data that are to sustain during the restore. The format is NTFS.
The size of this partition is set during partitioning by the product opsi-local-image-prepare according to the particular property state.

Partition 3 (winpe / swap)
The size of this partition is static and set to 4GB.
With Windows XP this partition is not used.
With NT6 (Windows 7) this partition is used during installation for the winpe (which is required for installation) and will not be visible during the operating state of the workstation.
With Linux this partition is used as swap.

Partition 4 (backup)
This partition is used to hold the backup images and their meta data.
The size of this partition is whatever is left by the other partitions.

The netboot products for the operating system installation use the first two or three partitions (XP the first one only) and do not interact with the last partition. So the backup images on the partition four are still available after the install of a new operating system.

Process steps

Initial Installation

The product opsi-local-image-prepare first generates the required static partitioning.

Figure 88. schema: static partitioning with opsi-local-image-prepare

Then the products opsi-local-image-win* or others can install several operating systems with different client configuration and different application software.

Figure 89. schema: OS installation with opsi-local-image-win*

Per default after the installation they will be backuped as image.

Figure 90. schema: image backup with opsi-local-image-backup

Restoring an image

Executing the product opsi-local-image-restore per default restores the image that has been generated recently. In case a different image is to be restored, the name of the image has to be specified on the property imagefile.

Figure 91. schema: image restore with opsi-local-image-restore

Deleting an image

Figure 92. Schema: Deleting an Image

By executing the product opsi-local-image-delete the image that is specified by the property imagefile will be deleted.

Updating an image: automatic work flow

Figure 93. Schema: Steps of automatic image upgrade work flow

By executing the product opsi-local-image-restore with the property setting update_and_backup = true the following will happend:

the given Image (inclusive its opsi Meta-Data) will be restored,

on the basis of the restored Meta-Data it will be determined which product can be updated via opsi

the updates will also be deploy

from the updated system partition a new Image will be created through the backup.

To install those products please set the attribute active of the repository uib_local_image in the file /etc/opsi/package-updater.repos.d/uib-local_image.repo to True.
Executing opsi-package-updater --repo uib_local_image install will then install the new products.

UEFI Compatibility

The opsi-local-image Products are UEFI enabled with some exceptions.

Not UEFI enabled are the following opsi-local-image products:

netboot product for partitioning

opsi-local-image-prepare
To create the static partitioning of the hard disc for all other products.
Properties:

ask_before_inst

Should we ask to the client before we start. (Default=true)

system_partition_size

The size of partition 1 (system). (Default = 30G)

data_partition_size

The size of partition 2 (data). If set to 0G, no partition will be created for data (default = 0G).

start_os_installation

selects a product for installing an operating system and to be started after the partitioning automatically.
When installing this product, the product properties imagefile and imagefiles_list of the product opsi-local-image-restore are deleted, for they have become invalid after the repartitioning.

delay_for_reboot

Seconds between the end of the work and the reboot to give the opsi-server time to create the netboot pipes.

minimal_backup_partition_size

This property is used for a plausibility check of the other partion size entries.
The size of the backup partition is given by:
Harddisk size - (system_partition_size + data_partition_size + winpe_partition_size).
Normally opsi-local-image is used to have the posibility to make local backup. Therefor we need a backup partition which is at least a littl bit larger than the system partition. If the resulting backup partition size is smaller than the value of minimal_backup_partition_size the process stops with an error.
(Default=55%)

winpe_partition_size

Size of the winpe partition (Default=4G)

multi_disk_mode

This property is used to select the target disk of the Windows installation.
Possible values are: "0","1","2","3","prefer_ssd","prefer_rotational"
The values "0","1","2","3" are the index of the hard disks ("0"= 1. harddisk)
The value "prefer_ssd" selects the first SSD.
The value "prefer_rotational" selects the first rotational (classic) disk.
This property is ignored on systems with only one disk.
Default = "0"

backup_partition_on_same_disk

true : create the backup partition on the system disk. false : create the backup partition on the first disk that is not the system disk.
This property is ignored on systems with only one disk.
Default = "true"

Important

Use this product only for the initial preparation of the disc for it deletes all existing images.

netboot products for the installation of Windows

The special netboot products for the installation of Windows are derived from the opsi standard products for windows installation. Therefore the structure and the driver integration are the same as with the standard. For details please refer to the opsi-getting-started manual.

The properties of the opsi-local-image Windows NT6 products are a subset of the properties of the standard opsi NT6 products. So you should have a look to the description of these products in chapter: the section called “Some hints to the NT6 netboot products (Win7 to Win 10)”.
You will find the missing properties for disk and partition information at the product opsi-local-image-prepare. These properties will used by the other products to get informations about the disk and partition configuration.

ATTENTION

Do not change the property values of opsi-local-image-prepare after you preparded the disk, because the subsequent products will access these properties.

backup_after_install with default value true. In this case this means, that after the OS installation at first the application software is being installed and then an image backup of the installation is generated. Furthermore the value of imageFile of the product opsi-local-image-restore will be deleted. So the generated backup will be named like the current netboot product (e.g. opsi-local-image-win7).

setup_after_install
Here one or more products can be listed, that after the OS installation shall be set to setup. This includes the dependencies of these products.

Netboot products for installing Linux

opsi-local-image-ubuntu
Installation of Ubuntu Linux 12.04/14.04 32Bit/64Bit.
The installed system has 2 users: root and user. The password for root will be set according to the product property root_password (default: linux123). For user the password will be set according to user_password (default: linux123).
Details of the installation can be configured with some product properties. The main product properties are:

askbeforeinst:
Has the start of the installation to be confirmed at the client? (default=true)

architecture:
architecture selection, affects the selection of the bootimage and the installation architecture (default=64bit)

backup_after_install
(true/false) default = true. If true, after the installation an image backup will be generated.

setup_after_install
Here one or more products can be listed, that are to be set to setup and so will be installed after the OS installation. This also includes the dependencies of these products.

wget_and_execute:
Url (http) of a file to be fetched and executed at the end of the installation (default = '')

release:
Ubuntu release to be installed (default="trusty")

install_opsi-client-agent:
The Linux opsi-client-agent is to be installed if true (this is a cofunding project and requires activation by /etc/opsi/modules) (default=false)

Netboot product for backup and restore

opsi-local-image-backup
This product saves the OS which is installed on partition 1 as an image on partition 3. The image name will be set according to the property imageFile. If this is empty, the name of the opsi netboot product will be used, that currently is set to installed (e.g. opsi-local-image-winxp). This name also is set as the product property imagefile of the product opsi-local-image-restore, so that a following call of opsi-local-image-restore is going to restore this image. This name also will be added to the product property imagefiles_list of the product opsi-local-image-restore. So this property holds the list of all available images. Furthermore (for Windows products) the current opsi product settings will be saved together with the image, so they also can be restored.
The backup tool in use is partclone.
Properties:

askbeforeinst:
Has the start of the installation to be confirmed at the client? (default=false)

free_on_backup:
This is a read-only property which shows you the some infos about the backup partition: device, size, used, remaining, use in %, mount point

imagefile
name of the image file to be generated (default = empty = the name of the installed opsi-local-image operating system product will be used). The name may include spaces, but no umlauts (like ä, ö, ü). (In case of spaces they will internally be treated as underscore. So my image = my_image.

setup_after_install
Here one or more products can be listed, that are to be set to setup and so will be installed after tis product is finished. This also includes the dependencies of these products.

opsi-local-image-restore
This product restores the image defined by the product property imagefile to partition 1 and makes it bootable. Furthermore (for Windows products) the product settings connected with this image will be restored.
Properties:

askbeforeinst:
Has the start of the installation to be confirmed at the client? (default=true)

architecture:
architecture selection, affects the selection of the bootimage and the installation architecture (default=64bit)

imagefile
Name of the image to be restored. The value of this property has been set automatically by the last backup. The list of available images is to be found in the property imagefiles_list.

imagefiles_list
List of all available images. This list is managed automatically by the backup product.

update_and_backup
(true/false) default = false. If set to true, after the restore all localboot products, that have a different version on the server, will be set to setup and the product opsi-local-image-backup-starter will be set to once. This results in installing all available updates of the products and then automatically generating a backup.

setup_after_restore
can be set to one or multiple opsi products, that after the restore are to be set to setup, so that after the reboot they will execute automatically. The default is set to the product windomain to add the restored client to the Windows domain again.

opsi-local-image-delete
This product deletes the image given by the product property imagefile from the backup partition

imagefile
Name of the image to be deleted (default = empty, results in an error when executing)

Localboot product for process control

opsi-local-image-backup-starter
This localboot product sets the Netboot product opsi-local-image-backup to setup and reboots the client. This product has a very low priority of -98. This means, that all usual localboot products will be installed first. This feature can be used as follows:
For a client the following products are set to setup:

The product opsi-local-image-restore

all localboot products that are outdated

The product opsi-local-image-backup-starter

This results in the following process order:

restore of the image

update of the restored operating system (all outdated products are updated)

backup of the updated operating system

Extended opsi service methods

With this extension the clients of a training classroom can be listed as a opsi-client group. The following extensions have been implemented to provide comfortable collective action management for all clients of a classroom:

setProductActionRequestForHostGroup
Parameter: hostGroupId, productId, actionRequest
allows to start a defined action (like image restore) for all members of a group (e.g. clients of a training classroom).

setProductPropertyForHostGroup
Parameter: productId propertyId propertyValue hostGroupId
allows to set a given product property (like which image is to be restored) for all members of a group (e.g. clients of a training classroom).

getPossibleImagefileValuesForHostGroup
Parameter: groupId
gets the list of present imagefile names that have been generated by opsi-local-image-backup on all members of the group. If a special image (like opsi-local-image-winxp) is not available on one or more of the clients, it will not be on the returned list.

These methods will be integrated into the opsi standard packets at a later date. Until then these extensions are available by executing the file 40_groupActions.conf, which is part of this release. Please copy it with root rights to /etc/opsi/backendManager/extend.d and execute:
opsi-setup --set-rights /etc/opsi.

Backup partition

The backup partion is (with MBR BIOS without data partition and on one disk systems) the third partition of the system disk.
On systems with more than one disk the system disk may be configured by the
opsi-local-image-prepare property: multi_disk_mode.
On systems with more than one disk the backup partiton may according to the property backup_partition_on_same_disk the first partition of the first non system disk.

It contains:

The file master.log with information about all image operations performed. This logfile is transfered to the bootimage logs.

The image files
The image directories have the same name as the image and hold the image and the meta files of the image.
To give an idea about file sizes, here as an example the sizes of different image files with OS and standard software (Libreoffice, Adobereader, firefox, thunderbird, javavm, flashplayer):

opsi-local-image-ubuntu: 3.6G

opsi-local-image-winxp: 6.4G

opsi-local-image-win7: 9.4G

opsi-local-image-win7-x64: 13G

Capture Images (WIM) generating and distribution

Capture Images (WIM) Introduction

Starting with NT6 (Vista) Microsoft has introduced the new image format Windows Imaging Format (WIM) for installation.
A WIM image is not a disc or partition image anymore, but a file and meta archive. A WIM file can hold several images. The standard installation of a NT6 client is based on a setup.exe extracting an installation image from the file install.wim which is then to be configured and equipped with additional drivers.

From an existing client the Windows operating system including the installed software and configuration can be extracted and saved in form of a WIM. Then such a WIM can be the starting point for a new installation.

Capture Images (WIM) Components

In order to create a captured WIM image you need with product version 4.1 and up only the product:

opsi-local-image-wim-capture

The older products:

opsi-local-image-capture

opsi-local-image-sysprep

are obsolete and should be removed.

In addition there are the target products which should be used to hold the captured images:

The main difference between these both products is the way how the backup and restore of the target partition is done:
opsi-local-image-wim-capture use the products. opsi-local-image-backup/opsi-local-image-restore.
For the same purpose opsi-wim-capture use the product opsi-clonezilla.

TIPP::opsi-local-image-wim-capture will fail if you setup your system with a data partition. Install your master system with the opsi-local-image-prepare property data_partition_size=0.

Restore from opsi metadata from Images

Restore of the opsi metadata from installed Products

The Problem:

If you reinstall a Windows with opsi, e.g. win7-x64, then during the installation of the opsi-client-agent all the local Boot products, which in this computer were previously marked as` installed`, will automatically be set to setup and thus reinstalled later.
This can not be completely carried out exactly in the rolling of a captured Image.
In the image is the backup from the opsi data that was stored during the capture process. This will be discovered when you install the opsi-client-agent and re-imported into the depot server. With it the products that were installed in the captured Image, now are on the newly installed computer mark as installed.
Should now all the products that are mark as installed set to` setup`, this would imply that all products installed already in the image will be re-installed. This is not desirable.

By the restoration of the opsi metadata of installed products there are two alternatives available now with opsi 4.0.7:

Alternative 1:
Restoring the metadata and retention of setup -Action Requests.
Products that are mark as installed will not be set to setup.
This is the default, and the behavior before opsi 4.0.7

Alternative 2:
Restoring the metadata. Products that are mark as installed will be set to setup except those which were contained in the restore metadata.

Alternative 1
By the deploy from a captured image, after the install, only the products which were already from the beginning of the OS-install set to setup will be automatically installed. These can be done through your intervention, or through the property setup_after_install.
Therefore only the products which stood at setup before installing the operating system will be installed in this case.
This is the default, and the behavior before opsi 4.0.7

Alternative 2
Variant 2 behaves similar to what would be the case of an installation without a captured Image:
* Restore of the metadata.
* Products that are mark as installed are then set to setup except those which were contained in the restore metadata.
This behavior is only available since opsi 4.0.7 and is not the default. Option 2 is made possible by enhancements to the opsi script and is part of the opsi-client-agent of 4.0.7.
In order to be able to apply this behavior a config must be set on ( Host parameters) :
The Boolean configuration entry: clientconfig.capture.switch_installed_products_to_setup. If the entry for this client has the value true then variant 2 is applied, otherwise variant 1

About this host parameter can then specific client events activated or deactivated.
The host parameter can be applied using the opsi-configed or opsi-admin.

To create the host parameter over the opsi-admin the following commands are to be executed on the’opsi-config-server':

9.8. opsi vhd reset

Preconditions for the opsi extension 'opsi vhd reset

This module currently is a
cofunding project.
Some preconditions have to be met to use this module. So it requires a special modules file to activate this feature. This module file can be obtained by buying the extension module. For evaluation purposes we also provide a temporary modules file free of charge ( → mail to info@uib.de).
This extension is bundled with the extension opsi-local-image, which means that in order to use it, you need an activation for opsi-local-image.
If you have one, you may use it without any additional costs.

As a technical precondition opsi >= 4.0.7 is required with the package versions:

Table 17. Required packages

opsi package

version

opsi-winst

>= 4.12.0.13

Introduction

The requirements of computer networks for education / trainings / class rooms differ from those of other networks. An important requirement, is the fast recovery of workstations to regain a clean and well known installation status, which has been altered by temporary use.
opsi has with the extension opsi-local-image the solution for this problem.
With the extension opsi-vhd-reset there is another solution which have a different technical approach.
So both solutions have their specific advantages and disadvantages.

The technical approach here is:
* Installation of a windows 10 into a vhd container
* Snapshot of the original installation by creating a child vhd, which records any future changes.
* Fast recovery by replacing the old child vhd with a new empty one.
* Upgrade of the initial installation by merging updates from the child VHD to the parent VHD
* In a nutshell we use the well known snapshot features found in virtualization engines just without virtualization.

Process steps

Initial Installation

By running the netboot product opsi-vhd-win10-x64 a Windows 10 will be installed directly into a VHD file.

Figure 94. Scheme: Initial Installation 1: Creation of the VHD

Figure 95. Scheme: Initial Installation 2: Windows Installation

The next step is the installation of the application software.

Figure 96. Scheme: Initial Installation 3: Software Installation

By running the localboot product opsi-vhd-control the following actions will be done:

The opsi meta data (which products are installed on which version) will be stored on the client.

The Windows-PE partition will be activated for the next boot and reboot is triggered.

The product opsi-vhd-control has a very low installation sequence priority (-97). Therefore this product will start after all the normal applications software is installed. So it’s possible to switch this product to setup together with the applications.

Updating an image using opsi-vhd-auto-upgrade

In order to update the initial installation with patches and software updates you need to start the following workflow:

Recover the initial installation with opsi-vhd-control

Install all the updates (They will be stored in the child VHD)

Integrate the changes in the child to the parent by running opsi-vhd-control with the property upgrade=true. This will also store the new meta data to the client for the next recovery.

You may run all these processes fully automatically controled by starting the product opsi-vhd-auto-upgrade.

The opsi-vhd products

The extension opsi-vhd-reset consists of the following products:

The netboot product for the initial installation:

opsi-vhd-win10-x64

The localboot product to control the creation, the exchange and merge of the child VHD’s:

opsi-vhd-control

The localboot product to control the full automatic upgrade of the parent VHD.

opsi-vhd-auto-upgrade

UEFI Compatibility

All opsi-vhd-reset products are UEFI compatible.

The opsi netboot product opsi-vhd-win10-x64 and its properties

This netboot products are very similar to the standard netboot products (4.1.0) for the Windows installation.
After installation on the server it has to be filled like it’s described for the windows netboot products in the getting-started manual.
Also most of the properties are equal.

The following properties are special for opsi-vhd-reset:

windows_vhd_size
This propery gives the size of the base (parent) VHD in absolute sizes or in percent of the disk size minus the size of the windows PE partition.
The default value of 100% will be shortened to 80% in order to get space for the child VHD. If you give any other value which lead to a size of above 80% it will be also shortened to 80%.
This property replaces the standard property windows_partition_size
(Default = 100%)

installto:
The value is vhd and you should not try to change this.

The following standard properties are not existing at opsi-vhd:

windows_partition_size, windows_partition_label
see above. The Label of the partition which holds the VHD files is CONTAINER.

data_partition_size, data_partition_letter, data_partition_create, data_partition_preserve
There is no possibility for a data partitions in opsi-vhd-reset currently.

boot_partition_size, boot_partition_letter, boot_partition_label
There is no possibility for a boot partitions in opsi-vhd-reset currently.

pre_format_system_partitions, preserve_winpe_partition
The value for this property is always true at opsi-vhd-reset.

The opsi localboot product opsi-vhd-control and its properties

The product opsi-vhd-control has a very low installation sequence priority (-96). Therefore this product will start after all the normal applications software is installed. So it’s possible to switch this product to setup together with the applications.

disabled
This property is for debugging.
If true no actions will be done.
Default = false

upgrade
If true: Merge the changes that are collected in the child VHD to the parent VHD. Afterwards replace the child VHD with an empty one.
If false: Replace the child VHD with an empty one.
At the end of a successful upgrade run this property will switch back to false.
Default = false

stop_on_no_network_in_pe
This property is for debugging.
If true: Abort with an error message if there is no network connection to the server, so it’s possible to analyze where the problem is.
Default = false

The opsi localboot product opsi-vhd-auto-upgrade and its properties

The product opsi-vhd-auto-upgrade has a very low installation sequence priority (-97). It is lower than opsi-vhd-control so opsi-vhd-control can be controled by opsi-vhd-auto-upgrade

disabled
This property is for debugging.
If true no actions will be done.
Default = false

rebootflag
Please do not touch while running. Should be "0" before start.

stop_after_step
This property is for debugging.
If not "0" then it is the number of reboots after we need a debugging stop.
Default = 0

Known Problems and Restrictions

There is also an experimental 32 Bit version. But a bug in the merge command of the windows PE 32 bit diskpart.exe restricts the use of this version. So it stays in experimental (at least for the time being).

Implementations for Windows 8.1 or Windows 7 Enterprise are possible. We’ll build them at request. Windows 7 Professional does not support installations to VHD.

Overview database model

The involved tables in the opsi database are sketched in the following diagram. The meaning of the different relations should peu à peu become clear by the following
explanations of the opsi license management concepts and usages.

The blue line in the diagram marks the border of the tables which are automatically generated by the software audit functions and the data
which are constructed especially for license management. Only the license pool table has connections to both spheres. This demonstrates the importance of this construct.

Figure 102. Data base tables relevant for license management

Invoking the license management from the opsi-configed

A separate window in the opsi-configed management GUI is used for the license management.
It is available by pressing the button "licenses" at the top right corner of the opsi-configed management GUI. If the license management module is disabled, #
then a note will be displayed.(see the entry for "license management" in the main menu under /Help/Modules).

license pools

What is a license pool?

A license pool has to be defined for every type of license.
The license pools represent the use cases of licenses, and provide the license keys for installing the licensed software on the clients.
The license pool is the central element of the opsi license management.
Therefore, the first tab of the opsi-configed license management window is the management license pools tab.

Administration of license pools

At the top of the license pools window is a table of available license pools.

The input field description can be edited.

More editing functions are available from the context menu (right mouse button). The most important is: creating a {New license-pool}.

When inserting a new line into the table, a (unique) licensePoolId must be entered, e.g. softprod_pool.
Please do not use special characters. When saving the new entry, any capitals will be converted to lower case.

The new licensePoolId cannot be changed after it is saved, because it is used as the master key.

The table at the top of the window contains the available license pools.
The context menu provides several functions for managing license pools, especially to insert a {New license-pool}.
After any changes to the data in the window, the green check checkmark changes to red and the cancel option is enabled.
The changes can be saved by clicking the red checkmark, or changes can be cancelled by clicking the cancel option (also available from the context menu).

license pools and opsi-products

The standard method to manage licenses is to include the license, from a single license pool, when installing the software (i.e. using the opsi-product installation software to install Acrobat Writer).

Not unusal is the case that multiple products share the same license pool. This is normal if these products are variants of the same same software. For example: the products win10-x64 and opsi-local-image-win10-x64 using the license pool p_win10-x64).

A more complicated situation (which you should avoid) might occur while installing software that requires licenses from several license pools (i.e. "Designer tools" which installs Adobe Photoshop as well as Acrobat Writer). + In this case, the opsi-product requests licenses from several license pools. At the same time, there might be other opsi-products requesting licenses from the same license pools
(e.g. the Acrobat Writerlicense pool).
So the relation between opsi-products and license pools can be ambiguous. This can be avoided by using unambiguous policies when building opsi-products.

Tip

Do not integrate more than one license needing software in one opsi product. Assign this product to the license pool which hold the licenses for this product. (Wthout this assignment the license management will not work together with the opsi WAN extenstion. see also chapter Section 9.10, “opsi WAN/VPN extension” )

The second part of the license pool tab manages the relationship between license pools and productIds (from opsi-products).

All tables in the license management module can have their columns sorted by clicking on the column header. Clicking again inverts the order (ascending or descending).

Sorting can be used to display the connections between opsi-products and license pools.
Sorting by opsi-product displays all license pools connected to a certain opsi-product, whereas sorting by license pool shows which opsi-products are connected to a license pool.

The context menu provides an option for inserting a new relationship between opsi-product and license pool.
An empty row is inserted on top of the table. Clicking into the field licensePoolId or productId displays a dropdown with the available options.

license pools and Windows software IDs

The third section of the license pools tab displays the Windows software IDs connected to the currently selected license pool (in the first section of the tab).

A Windows software ID is an unique key identifying a software packet as detected by opsi software audit.
These software IDs are also used by the opsi software inventory module to identify which software is actually installed on the client.

The assignment of software IDs to the current license pool can be changed by setting or removing the selection (ctrl-click or shift-click).
From the context menu the display can be toggled between showing all available software IDs detected by the software audit or just showing the software IDs connected to the current license pool.

Displaying the relationship between Software IDs and license pools is useful for comparing the number of actual software installations
(detected by the software audit) with the number of legal installations available from the license pool (tab "Statistics", see below).

Setting up licenses

Setting up a license for being provided by a license pool requires several steps. The second tab New license is for setting up and editing licenses.

On top is the table of available license pools to select the license pool the new license is to be assigned to.
So the first step is to select the license pool for the new license.

Before continuing with the next steps, some basic concepts and terms of license management have to be introduced:

Some aspects and terms of the license concept

Licensing means the actual deployment of a permission to use a software by installing the software on a client. This might (but doesn’t have to) include the use of a special license key(license key).

The software license is the permission to install and use a software as defined by the license contract.
Within the opsi database a software license is identified by a softwareLicenseId.

There are several types of software licenses (volume license, OEM license, time limited license etc.) which are the different license models.
A software license is based on a license contract(license contract), which is defining and documenting the juristic aspects of the license.

A license option defines the option to use a software license for a selected license pool.
Within opsi the license option is defined by a combination of softwareLicenseId and licensePoolId.
This includes the actual licenseKey (if required).

Finally the license usage documents the use of a license by assigning the license option to a client.
This is the legal and implemented licensing of a software defined by the combination of softwareLicenseId, licensePoolId, the unique client name hostId and (if required) the licenseKey.

Registering the license contract

After selecting the license pool for the new license option, the next step is to register the license contract the license is based on.
The section "Select or enter license contract" (from tab "New license") defaults to a standard contract with ID default.
The default setting can be used if the license contract is implied by purchasing the software or the contract is documented some other way.
Otherwise the contract can be selected from the table or a new contract can be registered from the context menu.
The license contract dataset comes with data fields for partner, conclusion date, notification date and expiration date.
The entry field notes can hold some additional notes like the location where the contract document is kept.
The unique contract ID (licenseContractId) is for identifiying the license contract in the license management database.
When entering a new license contract, a new unique ID is constructed based on the current date and time stamp.
This ID can be changed before saving the new data set.
When saving the data, the opsi service checks whether the ID is unique.
In case it is not, a new ID is generated and cannot be changed any more.

Configuring the license model

The third part of the Tab "New license" is named "Configure license" and is for registering the license model and license data.

Several types of license models are available:

Standard license

Volume license

OEM license

Concurrent license

Each Option is represented by a button.
Clicking a button, the form is filled with data for that type of license model.

The license model Standard license means, that this license is valid for a single installation on an arbitrary client.
So the license key (if any) is valid for a single installation only.

A Volume license is valid for a certain number n of installations.
In this case the optional license key is used for that number of installations.
Setting n = 0 means, that the number of installations is unlimited within the same network (campus license).

In case of an OEM license, the license is valid for a dedicated client only.
Clients that come with a vendor pre installed operating system often have this type of license for the pre installed OS and software packets.

The Concurrent license means that a certain number of licenses is available for a variable set of clients.
Within opsi this situation is handled like an unlimited Volume license.
The number of actual installations in use has to be managed by some external license server.

After clicking a button, the automatic generated data include a generated unique ID (derived from date and time stamp). This ID can be changed as desired.

It depends on the type of license model, which of the other fields can or cannot be changed.

The field "Expiration date" defines the expiration date of the license in a technical sense.
(This column of the license is for future use).

Saving the data

The "Send" button sends the data to the opsi service to save them permanently to the opsi data base (if they are consistent and no errors occur).

While proceeding this, data records will be generated for the new software license based on the selected software contract and the new license option assigned to that.

The list of available license options at the bottom of the window will be refreshed with the new license option selected. If necessary, the license key can be changed then.

Editing licenses

For ninety percent of the use cases editing the license data with the tabs "License pools" and "New license" will do.
But there might be some special cases affording to edit license data more specific and explicit.
Therefore the tab "Edit licenses" presents the license data in three tables, representing the internal data structure and allowing to adapt the data for some special cases.

Based on this direct data access, the following chapter shows how to configure a special license, like the Microsoft Vista or Windows 7 professional downgrade option for installing Windows XP.

Example downgrade option

Downgrade option means, that instead of the software purchased, also the preceding version can be installed.
For instance installing Windows XP based on a Windows Vista license.
In this case, the license key also can be used for an installation, which it wasn’t meant for in the first place.

In the opsi license model this case can be configured like this:

From the tab "New license" the Vista license is to be registered as usual, resulting in a new license option, which is displayed in the list of license options at the bottom of the window.
This new license option is based on a new software license identified by softwareLicenseId.

Figure 107. License management: copying the license-ID to the license options from the context menu

This softwareLicenseId is needed for the further configuration steps. You can keep it in mind or copy it with drag&drop.
You can as well look for the ID in the "Available license options" list of the "Edit licenses" tab.
The context menu supports copying the ID.

The important step now is to connect this softwareLicenseId to an additional license pool.

Therefore a new record has to be registered from the "Available license options" table of the "Edit licenses" tab.
The fields of the new record have to be filled with the softwareLicenseId and the ID of the additional license pool (in this case the pool for Windows XP licenses).
For installing Windows XP based on this license, an applicable Windows XP license key already in use by another client has to be added.

After saving the new record, there are two different license options based on the same software license!
The opsi service counts the use of either of them as an installation deducting from the maximum installation count.
So in case of a downgrade license (with maxInstallations = 1), the opsi service delivers a license key for a Vista installation or for a XP installation, but not for both of them.

Assignment and release of licenses

Using a license option by installing the software on a client results in the actual licensing (which is the use of the license option).

In the opsi context installations are done script based and automatically, which is the client running the Winst script invokes some calls to the central opsi service.

The following chapters introduce some of these service calls, which are relevant for the license management.
For further information about Winst and opsi commands see the documentation on Winst and opsi.

opsi service calls for requesting and releasing a license

The opsi service call for requesting a license option and retrieving the license key for doing the installation (as transmitted by a Winst script) is
getAndAssignSoftwareLicenseKey.

The parameters to be passed are the client hostID (hostID of the client where the software is to be installed)
and the ID of the license pool the license is requested from.
Instead of the licensePoolId also an opsi-product ID or a Windows Software ID can be passed, if they are connected to a license pool within the opsi license management.

The use of a license option can be released by calling deleteSoftwareLicenseUsage.

Again the parameters to be passed are the hostID and alternatively the licensePoolId, productID or Windows Software ID.
Calling this method releases the license option and returns it to the pool of available license options.

For the complete documentation of opsi service calls see below.

opsi-winst script calls for requesting and releasing of licenses

The opsi-winst provides the client related calls as opsi-winst commands.

A opsi-winst script can make a call to the function DemandLicenseKey
to get a license key for installing. The parameters to be passed are:

DemandLicenseKey (poolId [, productId [, windowsSoftwareId]])

The return value is the license key (can be empty) as a string:

set $mykey$ = DemandLicenseKey ("pool_office2007")

The returned license key can be used by other script command for installing the software.

For releasing a license option and license key (as to be used in a opsi-winst
deinstallation script) the command FreeLicense is available with the following syntax:

FreeLicense (poolId [, productId [, windowsSoftwareId]])

The boolean function opsiLicenseManagementEnabled can be used to check
whether the opsi license management is enabled and can be used for scripting:

License contracts

This method registers a new license contract record with the ID licenseContractId.
If no licenseContractId is passed, it will be generated automatically.
Using the licenseContractId of an existing contract, this contract can be edited.

The parameters partner (co-contractor) and notes are strings and can be filled with any information desired.
The parameters conclusionDate (date of conclusion of the contract), notificationDate (date for a reminder) and expirationDate (expiration date of the contract) are passed in the format YYYY-MM-DD (e.g. 2009-05-18).

With the string returning functions getLastServiceErrorClass and
getLastServiceErrorMessage error states can be detected and handled,
e.g. if there is no license available:

if getLastServiceErrorClass = "None"
comment "no error"
endif

The error class LicenseMissingError is returned if a license has been
demanded but there is no license available.
The error class LicenseConfigurationError is returned if the current
configuration does not allow assignment of a license pool to
a software.
This could be the case if either no assignment exists or no distinct
assignment is possible.

Manual administration of license use

Within the opsi config editor, the licenses registered by the opsi service are listed on the tab "Licenses usage":

"Reserve license for client" at the bottom of the window is to create a license reservation for a dedicated client.

By editing the field "licenseKey" from the "Usage of licenses" table, the license key can be changed.

Preservation and deletion of license usages

If a software packet is reinstalled, the call to the opsi-winst function DemandLicenseKey will return the same license option and license key as had been used before.

In case this is not favoured, the former license option has to be released by calling the opsi-winst command FreeLicense,
or by calling the opsi service call deleteSoftwareLicenseUsage or deleting the license use manually.

So, if not explicitly deleted, the license usages are preserved when reinstalling a client.

For releasing the licenses, they can be deleted from the tab "Licenses usage" or
can be deleted by the service call deleteAllSoftwareLicenseUsages passing
the client host name to delete the license uses from.

Reconciliation with the software inventory

The tab "Reconciliation" lists for each client and for each license pool
whether a use of this license pool is registered by opsi ("used_by_opsi") and
if the software inventory (swaudit) on that client reported a software, that requires a license option from that pool (Swinventory_used).

To evaluate the results from swaudit, the relevant Software IDs (as found in the client registry) have to be associated with the appropriate license pool (tab "License pools").

When data matching with the software inventory, the license management counts not more than one license per client and license pool.
So if the license pooloffice2010 is connected with ten different patterns from software inventory, indicating that office2010 is installed on this client,
this is (regarding the licenses usage count) counted as a single installation, although all of the detection patterns might to be found on the client.

As usual, this table can be copied as Drag & Drop and for instance pasted to a spreadsheet program.
If the opsi-configed process has got the required access rights (running standalone and not from the applet), the table also can be printed from the context menu.

By virtue of the config configed.license_inventory_extradisplayfields which can be edited in the host parameter page of the server you may add extra data fields for each client to the table.

Licenses usage overview

The tab "Statistics" displays a summary of the different license pools,
showing the total number of license options (license_options) and how many of them are in use (used_by_opsi) or still available (remaining opsi).

In addition to the number of license uses registered by opsi (used by opsi)
and the currently available licenses (remaining…) the ovierview also shows the total number of detected installations, that require a license (SWinventory_used).

The data from the column SWinventory_used are based on the registry scans from the opsi-productswaudit
and the assignment of the Windows software IDs (as they are found in the registry) to the license pools (as registered with the opsi license management
(tab "License pools", see the section called “license pools”).

From the context menu the table can be printed (because of restricted access rights not available from the applet),
with drag&drop data can be copied to e.g. a spreadsheet.

In case of downgrade option

A single downgrade license results in a license option for at least two different license pools,
but only one of them can be requested for an installation.
So using a downgrade license option decreases the number of available license options (remaining_opsi) in each of the license pools concerned by that downgrade option by 1.
So this looks like a single installation reduces the number of available license options by 2, which, in this case, actually is the fact.

Service methods for license management

The service methods for license management can be called from the command line tool opsi-admin.
So they are accessible for scripting, e.g. to read license keys from a file.

Examples can be found in the products license-test-….opsi
from http://download.uib.de/opsi4.0/products/license-management/.
After installing the packets with opsi-package-manager -i *.opsi, in the directory /var/lib/opsi/depot/<product name> the corresponding scripts: create_license-*.sh can be found.

As an example here the script create_license-mixed.sh
(the current version comes with the download packet).

Preconditions for using the WAN/VPN extension

There are some preconditions to use the WAN/VPN extension module.
The feature product groups is required, which is available with opsi 4.0 and above.
Also the packets
opsi-client-agent and opsi-configed are required, which come with version 4.0.1.

At the moment, the simultaneous use of both "WAN extension" and "installation on shutdown extension" is not supportet. On the same opsi server with different clients, these opsi extensions can be used.

Table 18. Required packets

opsi-Packet

version

opsi-client-agent

>=4.0.1-1

opsi-winst

>=4.10.8.12

python-opsi

>=4.0.1-7

opsi-configed

>=4.0.1.6-1

General overview of the WAN/VPN extension

opsi software deployment is mainly doing the following steps:

The opsi-login-blocker at client system startup prevents the users from logging on.

The opsiclientd service running on the client connects the opsi-config-server.

If any product actions are set for the client, it mounts a share from the opsi-depot.

The opsi-winst is starting and also connects to the opsi-config-server.

The opsi-winst executes the product actions, using the share from the opsi-depot.

If a reboot is required, it executes and the process starts all over.

When all the product actions are completed, the log files are transferred to the opsi-config-server
and the user logon is unblocked.

Now we will look at the special circumstances of a client, which is located in a remote branch, connected via WAN to the LAN,
where the opsi-config-server and opsi-depot-server are:

During communication with the opsi-config-server small amounts of data are transferred, so there is no noticeable slowdown of the software deployment in a WAN.

But processing the product actions might consume a very long time, depending on the packet sizes, bandwidth and latency of the WAN connection. There also might occur timeouts during file access.

Therefore, during the installation is processing, the user has to wait for an unreasonably long time before logon is granted.

As an alternative to providing a dedicated opsi-depot-server in the remote branch network, the remote clients can be connected via WAN/VPN extension module.
Using the WAN/VPN extension module, the opsi-client-agent can be configured this way:

At system startup, if there are no opsi-products cached and ready for installation, the user can logon immediately.

When there are product actions set for the client, the opsiclientd, which is running on the client, starts downloading the required installation files from the opsi-depot to the local file system.
This is done in the background while the user is working. The maximum download bandwidth can be configured and also can be dynamically adapted to the current network traffic status.

When the synchronization of the opsi-products is completed, a reboot request is triggered.

The logged on user can accept the reboot request, or the client will be rebooted at some time later on.

At the next system startup, the cache is found to be filled with the opsi-products to be installed and the installation starts.
In this case, the installation will use the downloaded files from the local file system, which increases the speed of installation even compared to a standard LAN installation.

Now we examine the situation of a notebook, which at system startup often cannot connect the opsi-config-server:

Trying to connect the opsi-config-server at system startup will result in a timeout.

Connecting the opsi-config-server might be possible when a user logs on and a VPN connection to the corporate network is established.

Without connection the opsi-config-server no software deployment is available.

This situation also can be solved by using the WAN/VPN extension module.
The opsi-client-agent can be configured the following way:

At system startup, if there are no opsi-products cached and ready for installation, the user can logon immediately.

Triggered by network activation or a by timer event, the opsiclientd running on the client tries to connect the opsi-config-server.

If the opsi-config-server is reachable, the opsiclientd starts to:

synchronize the configurations

download the required files from the opsi-depot to the local file system.
In combination with the opsi extension module Dynamic Depot Selection, the download is done from the best fitting opsi-depot.

When the synchronization of the opsi-products is completed, a reboot request is triggered.

The logged on user can accept the reboot request or the client will be rebooted at some time later on.

At the next system startup, the cache is found to be filled with the opsi-products to be installed and the installation starts.
In this case, the installation will use the downloaded files from the local file system, which increases the speed of installation even compared to a standard LAN installation.
So the opsiclientd takes over the function of both the opsi-config-server and the opsi-depot-server.

At the next connect to the opsi-config-server the results of the installation process (configuration change, log files …) will be synchronized.

The download mechanism of product synchronization is multiple interruptible and will continue at the point of interruption.
So files that are already downloaded will not have to be downloaded again.

The WAN/VPN extension module allows to connect clients, that are outside of the secure corporate network. Therefore additional security mechanisms are required regarding the communication between client and server.
So the opsiclientd now offers the ability to verify the identity of an opsi-server.
Therefore the key pair of the SSL certificate of the opsiconfd is used.
By this mechansim the opsi-config-server as well as the opsi-depot-server can be verified,
assumed the communication is performed via opsiconfd and SSL.
In case of an opsi-depot the file access must be done by the opsiconfd using HTTPS/WEBDAVS.
Access done via CIFS/SMB will not be checked.

Caching of opsi-products

Caching of opsi-products is done by the ProductCacheService, which is part of the opsiclientd.
The ProductCacheService synchronizes the local copy of an opsi-product with the current version of the corresponding opsi-products on the opsi-depot.
The location of the local product cache can be configured and defaults to %SystemDrive%\opsi.org\cache\depot.

Communication Protocol for accessing an opsi-depot

For transferring the product files, two different protocols are used:

CIFS/SMB

HTTP(S)/WEBDAV(S)

In case of using CIFS/SMB, a connection to the depotRemoteUrl will be established as configured with the properties of the opsi-depot.
In case of using HTTP(S)/WEBDAV(S), the depotWebdavUrl is connected, which as well is to be configured with the properties of the opsi-depot.

Which protocol is to be used, can be configured client specific by the host parameterclientconfig.depot.protocol.
Available values to be set as clientconfig.depot.protocol are cifs and webdav.

Note

Also the opsi-linux-bootimage is evaluating this setting and uses the specified protocol.

Using the .files file for Synchronization

The synchronization process is based on the file <product-id>.files, which is located in the base directory of each opsi-product on the opsi-depot.
This file contains information about the files, directories ans symbolic links used by an opsi-product.
Each line of that file contains such information. Different types of information are separated by a blank.
The first character of a line defines the type of the following entry. Available values are:

d for a directory

f for a file

l for a symbolic link

Separated by a blank follows the relative path, which is single quoted.
The next entry gives the sizes of the file (which is 0 for directories and symbolic links).
The final entry in case of a file is the MD5-sum of the file, in case of a symbolic link it is the target referred to by the symbolic link.

The .files file is generated automatically when installing opsi-product-packages (after running the postinst-Script).

Warning

When using the WAN/VPN extension, the files of opsi-products on the opsi-depot should not be changed manually, otherwise the information contained in the .files file would be outdated, causing errors during the synchronization process.

Internal processing of opsi-product caching

The synchronization of a local copy of an opsi-product processes as follows:

The .files file of the opsi-product is transferred to the local client.

Then it is checked, whether there is enough local disk space available to cache the opsi-products.
If there isn’t enough disc space available, some old opsi-products will be deleted, which haven’t been used (synchronized) for a long time.

The local caching directory will be created if it doesn’t exist.

Referring to the .files file, any old files and directories, which aren’t in use anymore, will be deleted from the local opsi-product cache.

Then the .files file will be processed in the following order.

missing directories are created.

missing files are transferred.

existing files will be checked by size and MD5-sum and be synchronized again if necessary.

The synchronization results in an exact local copy of the opsi-product from the opsi-depot.

Note

On windows systems, no symbolic links will be created. Instead of links there will be copies of the link target.

Configuring the opsi-product caching

The opsi-product caching is configured in the section [cache_service] of the opsiclientd.conf.

product_cache_max_size (integer): The maximum size of the opsi-product cache in byte.
This is important to limit the disk space to be used by opsi-product caching.

storage_dir (string): the path to the directory, in which the base directory depot for the opsi-product caching is to be created.

Further configurations can be done event specific.
Within an event configuration section [event_<event-config-id>] the following options are available:

cache_products (boolean): if the value of this option is true, in case of the event the ProductCacheService will start to cache
opsi-products, for which a product action is set.
If additionally the value of the option use_cached_products is set to true, the further processing of this section will be suspended until the caching of opsi-products is completed.

cache_max_bandwidth (integer): the maximum bandwidth in byte/s to be used for caching.
If this value is set to 0 or less, the bandwidth is unlimited.

cache_dynamic_bandwidth (boolean): if the value of this option is set to true, the bandwidth will be adapted dynamically.
Therefore the network traffic at the network interface to the opsi-depot will be monitored.
If any traffic is detected, which is not caused by the opsi-product caching, the bandwidth for the caching will be sharply reduced, to allow other processes to work at (almost) full speed.
If the caching works at reduced bandwidth and no more other network activity but the opsi-product caching is detected,
the caching process will continue with unlimited bandwidth.
The value of cache_max_bandwidth will be used to limit the maximum dynamic bandwidth.

use_cached_products (boolean): if the value of this option is set to true, the local opsi-product cache will be used for processing product actions.
If caching of the opsi-products is not completed, the processing of this event will stop and return an error code.

Caching of configurations

The caching of configurations is done by the ConfigCacheService, which is part of the opsiclientd.
The ConfigCacheService synchronizes a local client-cache-backend with the config backend of the opsi-config-server.
The opsiclientd provides per WebService an access point to the backend and thereby provides quite the same functionality as the opsiconfd.

The local client-cache-backend

The local client-cache-backend is based on SQLite and mainly consists of a local working copy,
a snapshot an a modification tracker, which records all changes of the local working copy.
The base directory of the config cache can be configured and defaults to %SystemDrive%\opsi.org\cache\config.
The snapshot reflects the configuration status on the opsi-config-server at the time of the last synchronization.
At the start of the processing, the local working copy is a copy of the snapshot, but will be modified during processing.

Internal processing of configuration synchronizing

The synchronization of the local changes of the client-cache-backend with the config backend of the opsi-config-server is processed as follows:

The changes of the local working copy registered by the modification-tracker are transferred to the opsi-config-server.
Any changes of the configuration on the opsi-config-server since the last synchronization will be detected by comparing to the snapshot.
If there are any conflicts deteced, the following rules apply:

In case of inventory data, the local client data have priority.

In case of action requests, the value from the opsi-config-server has priority.

In case of installation status and action result, the client data have priority.

If the opsi licenense management modul is switched on (config: license-management.use=true), the config server tries to find a license pool for the product by the assignment pool to productId. I free license of this pool will be reserved and this license will be replicated. Any unused licences, which have been reserved during replication, will be released again.

The opsi-config-server has priority for the status of host parameter and product properties.

The modification tracker will be cleared.

The logfiles will be transferred.

The config backend replication of the opsi-config-server to the client-cache-backend is processed as follows:

The replication only takes place, if any action requests are set on the opsi-config-server. The product actionalways does not count in this respect.
The replication process will start only if the status of action requests is changed since the last replication.

The modification tracker and the local working copy are cleared.

The configurations required for local processing will be replicated.

If action requests are set for opsi-products which are marked as to require a license,
the required software license will be reserved from a license pool, which is assigned to that opsi-product.

Additionally required data, as there are the auditHardwareConfig and the modules, will be transferred.

The snapshot and the local working copy will be updated, so they have the same content.

Configuration of config caching

The configuration of the config caching is mainly done event specific:
Within an event configuration section [event_<event-config-id>], the following options are available:

sync_config_to_server (boolean): if the value of this option is set to true, the ConfigCacheService in case of that event starts to transfer the changes registered by the modification tracker to the opsi-config-server.
The process will wait for that task to complete.

sync_config_from_server (boolean): if this value is set to true, the ConfigCacheService starts with the replication.
If additionally the value of the option use_cached_config is set to true, the processing of this event is suspended until the replication is completed.

use_cached_config (boolean): if the value of this option is set to true, the client-cache-backend will be used for processing the product actions.
If the synchronization is not completed, the processing of this event will be stopped and return an error code.

post_sync_config_to_server (boolean): has the same functionality as sync_config_to_server, but will be evaluated after the product actions have been completed.

post_sync_config_from_server (boolean): has the same functionality as sync_config_from_server, but will be evaluated after the product actions have been completed.

Recommended configuration when using the WAN/VPN extension module

The opsi-client-agent-package comes with a opsiclientd.conf prepared for the WAN/VPN extension.
For activating the WAN/VPN extension, just enabling of some events and disabling of some others is required.
The configuration of the opsi-client-agent also can be done from the web service (see: the section called “Configuration via web service (Host Parameter)”),
so it is recommended to create the following host parameter:

Figure 111. processing of an installation with WAN extension as displayed in the opsiclientd infopage

Verifying the server certificates

To activate the verifying of SSL certificates, in the opsiclientd.conf within the section [global], the option verify_server_cert is to be set to true.
This, during connection to an opsiconfd, results in verifying the opsi-server by using the SSL certificate.
The server certificates will be stored in the directory %SystemDrive%\opsi.org\opsiclientd\server-certs.
The name of the certificate is combined from the server address (IP or name) and the extension .pem.
If at connection time no stored certificate is to be found, no checking will be done.

Tip

To publish a changed certificate, the old certificate stored on the clients has to be deleted.
This can be done by the RPC-method deleteServerCerts, which is available from the control interface of the opsiclientd.

9.11. opsi-Nagios-Connector

Introduction

Beside client management is monitoring one the central functions in a modern IT service management. With opsi you got a client management tool. For monitoring tasks there are other well known open source solutions. So we build for the monitoring tasks in opsi not an own monitoring tool but an interface to existing solutions. With this opsi extension we provide a connector to Nagios.
In the following chapters the design and configuration of the opsi-Nagios-Connector is explained.

The opsi-Nagios-Connector isn’t strictly bound to Nagios. It is developed for the use with Nagios and Icinga. It should also work with other Nagios derivatives but this is whether tested nor supported.

The scope of this manual is the design and configuration of the opsi-Nagios-Connector. It is not a Nagios manual. You will need a running Nagios installation and the knowledge how to run Nagios.

Preconditions

Preconditions at the opsi server and client

This extension is at the moment a cofunding project which means that until the complete development costs are payed by co-funders, they are only allowed to use by the co-funders or for evaluation purposes. If we have earned the development cost we will give these modules for everybody for free.
see alsoopsi cofunding projectsopsi cofunding contribution

Concept

The opsi-Nagios-Connector contains of two core components. At first we will discuss these core components.

opsi web service extension

The heart of the opsi-Nagios-Connector are extended features of the opsi web service. These web service extension make it possible to run checks via web service on the opsi server. So the Nagios server calls checks via web service which are executed on the opsi-server and the results come back to the Nagios server via opsi web service. The advantage of this solution is that there is nearly nothing to do on the monitored opsi server.

The focus of the opsi web service extension lies on opsi specific checks like e.g. rollout monitoring. For the normal server monitoring you should use still standard check methods.

opsi-client-agent extension

An other part of the opsi-Nagios-Connector is an extension of the opsi-client-agent.
In a opsi environment on every managed client runs a opsi-client-agent. With this extension you may use the opsi-client-agent as Nagios agent as well. But in fact not all features of a standard Nagios agent like NSClient++ are implemented at the opsi-client-agent. You may use the opsi-client-agent to run command line programs and send back the output.

If you not use all functions like NSCA but rather some standard checks per plugin on the client or a set of own plugins on the clients you can use the opsi-client-agent.

If you need more features for the client monitoring you should rollout a standard agent like NSClient++ via opsi.

The advantage of using the opsi-client-agent as Nagios agent is, that you don’t need an additional agent on the client and that you don’t need any access data for the clients at the monitoring server. These data is not needed because all check run via the opsi server. This makes the configuration a lot more easier.

opsi-checks

The following chapter explains the goals and configurations of the opsi-checks.

Some background information about where to run the checks

Monitoring administrators know the difference between active and passive checks.

With the opsi-Nagios-Connector we get a new difference: direct and indirect.

direct:
The check which collects information about a client runs on that client, get the information direct from the client and sends the information back.

indirect:
The check which collects information about a client runs on the opsi server and get the information from the opsi configuration data which is stored in the opsi backend. So - this information may be different from the actual situation of the client.

A good example for an indirect check is the check-opsi-client-status. This check gives you for a given client information about pending action request and reported failures of the opsi software deployment.. So this are information about the client from the opsi servers point of view. Therefore this check runs on the opsi server and is an indirect check. A check which runs on the client is a direct check.

For a correct distribution and configuration of the checks you have to analyze your opsi installation.
According to the flexibility of opsi many various opsi configurations are possible. So here we can only explain some typical situations. Of course we will get help for special situations by our comercial support.

only one opsi server:
The opsi stand alone installation is the situation that you will find at the most opsi environments. At this installation the opsi config server functionality is at the same server like the (one and only) opsi depot server functionality.
This means to you, that you may ignore if a check has to be run on the config server or the depot server.

Figure 112. Scheme of a standalone opsi server

opsi with multiple depotservers:
If you have a central management of a multi location opsi environment (one config server, multiple depot servers) the situation is more complicated. So you have to understand the situation:

Figure 113. Scheme opsi multi depot environment

As the figure points out there is only one server which have data storage for the configuration data - the data backend. This is the opsi config server. The opsi depot server has no own data storage but a redirected backend. This means that if you ask a depot server for any configuration data, this question will be redirected to the config server. And this leads to the consequence that every check which runs against the opsi data backend will at least run on the config server. So you should address checks that run against the backend always to the config server. Even in the situation if you are collecting information about clients which are assigned to a depot which is different from the config server and the check is logically part of the check of this depot server.

If you running direct checks you normally also address the config server. You may address the depot server if the clients can’t be reached by the opsi config server via port 4441. In this case it is a good idea to address the depot server.

Figure 114. Distributed checks

opsi-check-plugin

At the nagios server there is only one opsi-check-plugin which provides a wide range of different checks. According to the number of features there is also a big number of command line options. So - just list all these options won’t help you much. Instead the option will be explained in the context of documentation of the possible checks.
How ever to get a listing of all options you may call check_opsi with the parameters --help or -h.

The following general options are needed for every check:

Table 20. General Options

Option

Description

Example

-H,--host

opsi server which should run the check

configserver.domain.local

-P,--port

opsi webservice port

4447 (Default)

-u,--username

opsi monitoring user

monitoring

-p,--password

opsi monitoring password

monitoring123

-t,--task

opsi check method (case sensitive)

The following chapter describes how to call the opsi-check-plugin is called on the command line. How you have to configure these calls at your Nagios server is described at the chapter configuration.

In order to install the opsi-check-plugin on your Nagios server you should add the opsi repository to your server and install the package opsi-nagios-plugins.
For example at Debian or Ubuntu with the following commands:

apt-get install opsi-nagios-plugins

On RedHat/Centos Servers please use the follwing command:

yum install opsi-nagios-plugins

And last but not least for openSUSE/SLES Installations:

zypper install opsi-nagios-plugins

The plugin it self is written in python and should ran at any distribution.

The package bases on the package nagios-plugins-basic respectivly nagios-plugins and installs the plugin to /usr/lib/nagios/plugins.
According to the flexibility of the check_plugin there is no automatic configuration.

Check: opsi web service

This check monitors the opsi web service process (opsiconfd). This check returns also performance data. You should run this check on every opsi server because every opsi server have a opsiconfd process.

This check return normally OK.
You will get other return values in the following situations:

Critical:

If the opsiconfd is in trouble and can’t reply correctly.

If the opsiconfd consumes more than 80% of the cpu.

If you have a rate of RPC errors of more than 20%.

Warning:

If the opsiconfd consumes more than 60% (but less than 80%) of the cpu.

If you have a rate of RPC errors of more than 10% but less than 20%

Unknown:
The opsi web service could not be reached.

NOTICE:
The percentage value of the cpu consumption belongs always to one cpu because the opsiconfd only may use one cpu. (This may change with the opsi multi processing extension)

Check: opsi web service pnp4nagios template

For the display of performance data there is a template for pnp4nagios which displays the data in a combined way.
Here is not described how to install pnp4nagios. We assume that pnp4nagios is installed and configured correctly. The way you have to use to configure our template may differ from the below described way according to your pnp4nagios installation (which may use different path).

Standard templates display for every performance data an own diagram. To create a combined display you have to go the following steps:

Step 1:
create at /etc/pnp4nagios/check_commands a file named check_opsiwebservice.cfg and insert the following content:

Please check that your php file is named exactly like the command_name which is defined at the /etc/nagios3/conf.d/opsi/opsicommands.cfg. If the names don’t match, a standard template will be used instead our combined template.

After installing this template you should delete the RRD data bases which belong to this check (if there any existing). You will find these data bases at /var/pnp4nagios/perfdata/<host>/ where you should (only) delete the opsi-webservice.rrd and opsi-webservice.xml files.

If you have configured everything correctly you should now able to see diagrams like the following screenshot.

Check: opsi-check-diskusage

This check monitors the usage of the resources (directories) which are used by opsi. The following table shows the resource names and the corresponding directories:

Table 21. opsi resources

Resource name

Path

/

/usr/share/opsiconfd/static

configed

/usr/lib/configed

depot

/var/lib/opsi/depot

repository

/var/lib/opsi/repository

Please note that this check monitors only opsi relevant data and do replace a general disk usage check for the server.

The default result value of this check is OK and the free space of the resources. The free space is given in Gigabyte. The default values for the Warning and Critical results are:

WARNING: If at least one resource have 5GB or less free space.

CRITICAL: If at least one resource have 1GB or less free space.

This are the default thresholds. They may changed by giving other values for Warning with the -W or --warning options and for Critical wit the -C or --critical option. With these options you can give the thresholds as Gigabyte (G) and as percent (%) as well. The produced output uses the same unit which is used to define the thresholds.
Finally an example:

Check: opsi-client-status

One of the targets of the opsi Nagios connector is the software roll out monitoring by viewing to single clients. This is one of the checks which is designed for this job. More exactly: the software roll out and last seen situation of a certain client is checked.

The result of the following checks is determined by two different states:

The roll out state of one or more software products:
The software roll out state results to:

OK if the software is installed at the in the same product and package version which is available at the server and no action request is set.

Warning if the software is installed in version that is different to the servers version or if any action request is set.

Critical if there is a failed reported by the last action.

The time since last seen:
The time since last seen results to:

OK if the client has bee seen less or equal then 30 days before.

Warning if the client has bee seen more then 30 days before.

This check may used in different variants, here is the simplest one, which includes all software packages:

In the example above the product firefox was excluded from the check. So this check would not switch to critical because the last action on firefox reported a failure.

Check: opsi-check-ProductStatus

An other target of the opsi Nagios connector is the software roll out monitoring by viewing to single product or a group of products.

The result of the following checks is determined by the following states:

The software roll out state results to:
* OK if the software is installed at the in the same product and package version which is available at the server and no action request is set.
* Warning if the software is installed in version that is different to the servers version or if any action request is set.
* Critical if there is a failed reported by the last action.

This checks has many variants and is so very flexible. The bast way to explain these variants are examples.

The simplest variant check one product on all clients. Here you have to give the product as the opsi productId.

In a simple one server opsi environment, this check is all you need to check the state of the product firefox on every client.
You will get the information how many clients are in Warning and in Critical states.

To get the information which clients exactly have the problems, you should call the check in the verbose mode:

In a opsi environment with multiple depot servers you have to use additional options to check also the clients that are not assigned to the config servers depot. If you have multiple depots, you may give the depots name as parameter:

The reason is that the version of the software packages may differ between your depots. So every client has to be checked against the versions at the depot where they are assigned to. An advantage is that can place the display of the results to the depot server.
You may give instead of the depot servers name the keyword all which means all known depot servers. But this normally make only sense if you have only one or two depots. You may also give a comma separated list of depot servers.

An other way to define the checks is to give the name of a opsi groups. So you may check the software roll out state of all products in a given opsi product group. If you have for example a product group accounting you may use the following call:

Now you will check all products that are Members of the opsi product group accounting by this single check. Important is to see, that the resolution of the opsi group is done while the check at the opsi server. So you may change the opsi group at the opsi Management interface and so you will change the products that will checked without any changes at the Nagios server.

Note

Sub groups (groups in groups) will not be resolved.

In the same way it is possible to define the clients that should be checked by giving the name of a opsi client group.
An example for a client group productiveclients:

Check: opsi-check-depotsync

If you are using multiple opsi depots the monitoring of synchronicity is important. Even if your depots are for good reasons not completely synchronize they should be synchrony as much as possible to avoid problems by moving a client from one depot to another.

This check monitors if your depots are synchronize according to product ids, product versions and package versions.

This check returns:

OK
If all is in sync.

Warning
If there is any difference

You should run this check always on the config server because all the data come from the backend of the config server.

So if you don’t give the depots which are have to be checked, all known depots will be checked. If you have a lot of depots the interpretation of the result is complicated, so it is a good idea to define a lot of single checks where the depots are given as comma separated list:

If you like to exclude a product from the check (perhaps because this product should be in different versions on different depots) you may do this by using the -x option. Here you may also use a comma separated list:

Check: Locked products on depots

During the installation of a new opsi package on an opsi server a lock will be set for the product on the depot.
Once the installation has been successfully completed the lock will be removed.
The duration of an opsi package can sometime require an usual amount of time without failing.
If the lock is kept for a long time then this can be an indication of installation problems.

This check searches for existing locks on your depots.

This check returns:

OK
If there aren’t currently any locked products on opsi-servers.

Warning
If there is at least one locked product on an opsi-server.

You should run this check always on the config server because all the data comes from the backend of the config server.

If you want to limit the checks to specific depots you have to supply them as a comma separated list.
The result can get harder to interpret if the output for multiple servers is mixed and our recommendation is to define a check per depot.

The following example checks for the two depots configserver.domain.local and depotserver.domain.local:

In order to run such a plugin on the client, it has to be installed at the client. This problem you will solve by deploying it as an opsi package. The path where the plugin is installed at client doesn’t matter because you have to give the complete path at check definition. We recommend to install all plugins in one directory to ease the maintenance of the plugins at the client.

For security reasons you should make sure that non privileged users have no write access to the plugins, because they will be executed from the opsiclientd with system privileges.

This call checks the client client.domain.local. At the client the plugin check_win_disk.exe is called with the parameter C:. This means, that the hard drive with the letter C should be checked. The output and the result value of the plugin will be fetched by the opsiclientd and will be given back to the Nagios server (via the opsi server) in a for Nagios correct format.

Another special feature is to hold the last check results, even if the client is not reachable.

This feature was implemented according to the fact that desktop clients not always are running like servers, but the most time in their life are usually switched off. Normally Nagios will show for switched off clients the result Unknown. In fact the most problems on the monitored clients will not disappear by just switching them off and on again. So the information that a client had a problem before it was switched off may be an essential information for the system administrator. (You may try to solve this problem by using Timeperiods at the Nagios configuration, but we think that this is not flexible enough and leads to a permanent configuration work). So this opsi extension give you the possibility to give back the last real check results if the client is not reachable right now.

In order to use this feature, you have to use the Nagios macros $SERVICESTATEID$ and $SERVICEOUTPUT$. $SERVICESTATEID$ gives the last result value and should be passed to the -s Option. $SERVICEOUTPUT$ gives the last output line and should be passed to the -o Option. So check can give these last values instead of Unknown if the client is not reachable.

opsi monitoring configuration

This chapter focuses on the configuration that have to been made for a working interface between the opsi and the Nagios server. Just see this as a recommendation, there will be a lot of other ways to do the job.

This description uses a Nagios server as monitoring server. On a Icinga server it should work very similar but you have to change some path entries. It should also work on other Nagios derivatives but this is not tested.

Tip

The configurationfiles from these Chapter are in opsi-nagios-connector-utils svn-Repository. To get these example configurationfiles you can connect over a browser to following url:

https://svn.opsi.org/listing.php?repname=opsi-nagios-connector-utils

or you can make a direct checkout from repository with following command:

svn co https://svn.opsi.org/opsi-nagios-connector-utils

opsi monitoring user

In monitoring environments you will often find that the access is just restricted by IP numbers. Because of the lack of security of this solution we decided to work with a real user / password security in this opsi extension.

Using the opsi standard group opsiadmin would give the Nagios more rights than needed. So you have to create an own opsi user for the opsi-Nagios-Connector.

In the following example a user named monitoring with the password monitoring123 is created for opsi:

opsi-admin -d method user_setCredentials monitoring monitoring123

The created user monitoring will be stored with its encrypted password at the /etc/opsi/passwd and is not a user which may be used to login at a shell. In fact it is no real Unix user.

You have to create this user only on your config server, even if you have multiple depots.

At your Nagios server you should mask the user and password by making an entry at the /etc/nagios3/resource.cfg. This should look for example like this:

$USER2$=monitoring
$USER3$=monitoring123

The number behind $USER may vary. If this configuration was not used before, there should be only $USER1$ be used. According to what you are using here, you might have to change the other examples in this manual.

opsi-Nagios-Connector configuration directory

To make the maintenance of the Nagios configuration easier, we recommend to put all opsi nagios connector related configuration files in one separated place.
So just create below /etc/nagios3/conf.d a new directory named opsi for these configurations.

The configuration files we will place in this directory are:

Nagios Template: opsitemplates.cfg

Hostgroups: opsihostgroups.cfg

Server Hosts: <full name of the server>.cfg

Commands: opsicommands.cfg

Contacts: opsicontacts.cfg

Services: opsiservices.cfg

All the client configuration files we recommend to put in sub directory of this place. Therefore you create below /etc/nagios3/conf.d/opsi another directory named clients.

Nagios template: opsitemplates.cfg

Using templates is a standard functionality of Nagios which will not explained here. The main advantage is that it makes the single configuration files smaller and easier to read (and write).

Inside of the templates we use some Nagios custom variables for often used values. According to the fact, that the most checks have to run on the opsi config server, we will define the name and port of the config server as such a custom variable:

_configserver configserver.domain.local
_configserverurl 4447

You will find this below in the template definitions.
These custom variables may later on be referenced by the Nagios macros: $_HOSTCONFIGSERVER$ and $_HOSTCONFIGSERVERPORT$. (These macros have leading HOST in their name, because they are defined inside of a host definition).

For more details on variable and macro take look at your Nagios documentation.

Now the first file we create in /etc/nagios3/conf.d/opsi is the template definition file opsitemplates.cfg.

This file may hold different templates. Every template is created according to the following patter (which contains comments for better understanding):

NOTE:
* The optional option icon_image may put it to an image with relative path below: /usr/share/nagios3/htdocs/images/logos/.
* Optional you may give an own contact_group, which have to be defined as contact object, for example in the file opsicontacts.cfg.