Difference between revisions of "Cool Solution - Printer assignment"

From Univention Wiki

Jump to: navigation, search
Line 1: Line 1:
{{Cool Solutions Disclaimer}}
+
{{Cool Solutions Disclaimer|Repository=yes|UCS=3.0}}
{{Version|UCS=3.0}}
 
 
This article is about the '''univention-printer-assignment''' package, as well as the functions of this package and the handling on the site of Windows Systems.
 
This article is about the '''univention-printer-assignment''' package, as well as the functions of this package and the handling on the site of Windows Systems.
 
The package '''univention-printer-assignment''' searches over the LDAP service for all printers in the network and sorts them in alphabetic order according to their group affiliation. The printer that was added first, in the alphabetic first group will be set as the default printer.
 
The package '''univention-printer-assignment''' searches over the LDAP service for all printers in the network and sorts them in alphabetic order according to their group affiliation. The printer that was added first, in the alphabetic first group will be set as the default printer.

Revision as of 10:13, 7 April 2014

Produktlogo UCS Version 3.0

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Packages provided by a Cool Solutions Repository are built by Univention, but will not be maintained. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.

This article is about the univention-printer-assignment package, as well as the functions of this package and the handling on the site of Windows Systems. The package univention-printer-assignment searches over the LDAP service for all printers in the network and sorts them in alphabetic order according to their group affiliation. The printer that was added first, in the alphabetic first group will be set as the default printer.

Installation

The package univention-printer-assignment is available in the Cool Solutions Repository for UCS 3.0. Before installing the univention-printer-assignment package make sure that the UCR-variable repository/online/unmaintained is set to yes. To activate this variable over the UMC, search for *unmaintained* in the UCR-module. After this you have to activate the Cool-Solutions repository. To activate the Cool-Solutions repository set the variable repository/online/component/cool-solutions to yes and repository/online/component/cool-solutions/parts to unmaintained.

ucr set repository/online/component/cool-solutions=yes repository/online/component/cool-solutions/parts=unmaintained

To activate this variable over the UMC, search for *cool-solutions* in the UCR-module. If the search returns no results, you have to add the variable. Execute the command you see above in a command shell, in the UMC, open the UCR-module and click on the Add field and insert a variable as well as a value. The package can be installed after activating the repository:

Assignment of a printer to the group Guests
univention-install univention-printer-assignment

After the installation, you have to run the join-scripts, to add the Printer Assignment field to your UMC.

univention-run-join-scripts
Assignment of a computer to the group Guests

Now printers can be assigned to groups in the group administration in the Advanced settings tab. The printer definition will be distributed to the corresponding Microsoft Windows systems via Netlogon.

Setting the debug variable on yes, by using the graphical interface

A feature of the univention-printer-assignment package is, that it is possible to set group-specific default printers. For that a computer and a printer (or more) have to be assigned to a group. To assign a computer to a group you have to select a group over the Group Administration in the UMC and add, in the Advanced settings in the field Host members, a computer to the group. If there are printers assigned to the group an own default printer will be assigned to the group, after executing the printer-assignment.vbs script.

With UCS 3.0 the anonymous ldap search has to be allowed, otherwise ldap can't find the DN of the computer. To enable the anonymous ldap search in the UMC, search for *anonymous* in the UCR-module and set the variable ldap/acl/read/anonymous to yes. To enable the anonymous ldap search in the command shell, the following command is needed:

ucr set ldap/acl/read/anonymous=yes

Netlogon scripts

To define global netlogon scripts, the variable samba/logonscript has to be set. To activate this variable over the UMC, you have to search in the UCR-module for *logonscript* and set the samba/logonscript, just by clicking at the variable and change the previous entry to yes.
To set the variable in the command shell, the following command is needed:

ucr set samba/netlogon=yes


Samba 3 In Samba 3 the netlogon-scripts are stored in the directory /var/lib/samba/netlogon

Samba 4 In Samba 4 the netlogon-scripts are stored in the directory /var/lib/samba/sysvol/%DOMAIN NAME%/scripts

For the univention-printer-assignment package are variables available, that can be set for testing the functions of this package.

Debug-mode To enter the Debug-mode in the UMC, you have to search for *assignment* and set the variable printer/assignment/debug on yes.
To enter the debug-mode in the command shell, the following command is needed:

ucr set printer/assignment/debug=yes

Removeall

Setting the removeall variable on yes, by using the graphical interface

Another feature of the univention-printer-assigment package is the removeall variable. If this variable is set, the printer-assignment.vbs will be executed, all printers in the network will be deleted from the printer overview and new printers will be added in the printer overview.
To activate this variable over the UMC, you have to search in the UCR-module for *assignment* and set the printer/assignment/removeall on yes.
To set the variable in the command shell, the following command is needed:

ucr set printer/assigment/removeall=yes

Windows The printer-assignment.vbs script is found in the network on the logon server in directory \\%LOGONSERVER%\netlogon. It is sufficient to execute the file as the domain administrator. The sorting of the printers, as well as the setting of an default printer are processed automatically.

Please Note: The univention-printer-assignment package works only correct with Windows XP (or with earlier versions) with a 32-Bit architecture. With Windows 7 (wether 32- or 64-Bit) the package doesn't work.

Configuration

For the VB-script to work, a new group must be added. This group includes the users that are allowed to execute the script, the computers on which the script is executed and the printers whereas the first printer in the list is set as the default printer.

The allowed useres are assigned, as in any other group, on the first page of the group configuration dialog, the allowed computers and the printers are assigned on the [Advanced settings] tab in Host members and Printer Assignment. After the changes are saved, the slapd must be restarted on the server:

invoke-rc.d slapd restart

The next time the script printer-assignment.vbs is executed the printer, that was added first into the group, will be set as default printer in MS Windows.

Personal tools