Difference between revisions of "Cool Solution - Printer assignment"

From Univention Wiki

Jump to: navigation, search
(Replaced content with "This page has been moved to the Knowledge Base Cool Solutions in the Forum. [https://help.univention.com/t/cool-solution-printer-assignment/11780 Cool Solution - Printer...")
Tag: Replaced
 
(20 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{Cool Solutions Disclaimer|Repository=yes|UCS=3.0}}
+
This page has been moved to the Knowledge Base Cool Solutions in the Forum.
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 ==
+
[https://help.univention.com/t/cool-solution-printer-assignment/11780 Cool Solution - Printer assignment]
  
The package univention-printer-assignment is available in the [[Howtos UCS 3.1|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.
 
<syntaxhighlight lang=bash>
 
ucr set repository/online/component/cool-solutions=yes repository/online/component/cool-solutions/parts=unmaintained
 
</syntaxhighlight>
 
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:
 
[[File:Printerassign ucs 3-0.jpeg|200px|thumb|right|Assignment of a printer to the group Guests]]
 
<syntaxhighlight lang=bash>
 
univention-install univention-printer-assignment
 
</syntaxhighlight>
 
After the installation, you have to run the join-scripts, to add the ''Printer Assignment'' field to your UMC.
 
<syntaxhighlight lang=bash>
 
univention-run-join-scripts
 
</syntaxhighlight>
 
[[File:Groupassign.jpg|200px|thumb|right| 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.
 
 
[[File:prntassigndebug.jpg|200px|thumb|right|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:
 
<syntaxhighlight lang=bash>
 
ucr set ldap/acl/read/anonymous=yes
 
</syntaxhighlight>
 
 
'''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.<br>
 
To set the variable in the command shell, the following command is needed:
 
<syntaxhighlight lang=bash>
 
ucr set samba/netlogon=yes
 
</syntaxhighlight>
 
 
 
'''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.<br>
 
To enter the debug-mode in the command shell, the following command is needed:
 
<syntaxhighlight lang=bash>
 
ucr set printer/assignment/debug=yes
 
</syntaxhighlight>
 
 
'''Removeall'''[[File:prntassigndebug.jpg|200px|thumb|right|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.<br>
 
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.
 
<br>
 
To set the variable in the command shell, the following command is needed:
 
<syntaxhighlight lang=bash>
 
ucr set printer/assigment/removeall=yes
 
</syntaxhighlight>
 
 
'''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:
 
<pre>
 
invoke-rc.d slapd restart
 
</pre>
 
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.
 
 
[[Category:Cool Solutions Repository]]
 
 
[[Category:EN]]
 
[[Category:EN]]
 +
[[Category:Howtos]]

Latest revision as of 12:41, 9 April 2019

This page has been moved to the Knowledge Base Cool Solutions in the Forum.

Cool Solution - Printer assignment

Personal tools