How to install a pakage on a set of machines automatically

I have to install a package on all or on a set of computers. This should be done out of a insall script. What is the common way to achive this goal in an univention environment?

Thanks, Ritchi


you can do this with policies.

Thank you for the information.

I have now to work out how to create policies automaticly.
It seems that univention-directory-manager is the right tool for this.
Have any one created policies with a script and can help out with an example.


Hello Ritchi,

just for clarification: If you are using a maintenance policy with the help of package lists, there shouldn’t be the need for additional scripting.
You can create policies with the help of the UMC, so, with an UI. There you also can create package lists and specifiy when the maintenance should be done (boot, shutdown, etc.). In the UMC you can also link the policies with computer objects.
Please also see UCS - Policies for a general overview on creating/linking/working with policies.

Kind regards,
Tim Petersen

Hello Tim Petersen,

I am working on an App for the Univention-App-Store. So the installation must be performed without user interaction. The approach to use policies for software distribution in this case looks good. What do you thing?



Yes, this approach should work and looks fine. Depending on which package you actually want to install automatically on a set of hosts, this may be a litte tricky, though. If the package is part of the app itself, remote hosts do not have access to this package in general. The repository is only available on the host itself (unless to activate the app repository on all of these hosts).

Adding the policy and the reference to some (or all) UCS servers in the domain can be done in the join script. Please also think of the possibility that the app is uninstalled. In this case you would need to remove the policy and maybe somehow clean up the installation on the remote hosts. This would require an unjoin script. Please have a look at … ation:join.

An alternative approach could be to require these hosts to install an app that has these packages as “DefaultPackages” defined in its ini file?

Dirk Wiesenthal

Hello Mr Wiesenthal

the package that should be installed on a set of hosts is delivered by the app. As you mentioned the app repository have therefore to be activated on these hosts. Could this be done remote form the host where the app is installed or must the repository be activated on each host manually?

After uninstall of the app a ‘packageRemove’ policy is left. Such a policy is necessary because the package that have been installed on the other hosts formerly have to be uninstalled also. After the package have been uninstalled from all of these hosts the administrator may remove this policy manually. Is this procedure acceptable by univention?

The alternative approach sounds interesting. Do you propose in that case to provide two apps: the original app and a second one that provide ‘the package’ and that have to be installed on the other hosts?

Richard Rafalski


this can be done remotely by a UCR policy (so basically it is the same mechanism as with the install package list). This needs to be reverted as well. To attach policies to hosts, in general you need LDAP credentials. So an Administrator needs to actively give his/her password for those scripts to work.

I think two apps are far less complicated. One “server app”, one “client app”. You would probably want to explain the relationship in a README file that apps may ship so that users understand where to install which app.

Dirk Wiesenthal

I have to install a package on all or on a set of computers. This should be done out of a insall script. What is the common way to achive this goal in an univention environment?

Thanks, Ritchi[/quote]
Hallo zusammen,
ich moechte das auch.Danke schoen fuer diese Antworten!