1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="testprns">
5 <refentrytitle>testprns</refentrytitle>
6 <manvolnum>1</manvolnum>
11 <refname>testprns</refname>
12 <refpurpose>check printer name for validity with smbd</refpurpose>
17 <command>testprns</command>
18 <arg choice="req">printername</arg>
19 <arg choice="opt">printcapname</arg>
24 <title>DESCRIPTION</title>
26 <para>This tool is part of the <ulink url="samba.7.html">
27 Samba</ulink> suite.</para>
29 <para><command>testprns</command> is a very simple test program
30 to determine whether a given printer name is valid for use in
31 a service to be provided by <ulink url="smbd.8.html"><command>
32 smbd(8)</command></ulink>. </para>
34 <para>"Valid" in this context means "can be found in the
35 printcap specified". This program is very stupid - so stupid in
36 fact that it would be wisest to always specify the printcap file
43 <title>OPTIONS</title>
47 <term>printername</term>
48 <listitem><para>The printer name to validate.</para>
50 <para>Printer names are taken from the first field in each
51 record in the printcap file, single printer names and sets
52 of aliases separated by vertical bars ("|") are recognized.
53 Note that no validation or checking of the printcap syntax is
54 done beyond that required to extract the printer name. It may
55 be that the print spooling system is more forgiving or less
56 forgiving than <command>testprns</command>. However, if
57 <command>testprns</command> finds the printer then
58 <command>smbd</command> should do so as well. </para></listitem>
62 <term>printcapname</term>
63 <listitem><para>This is the name of the printcap file within
64 which to search for the given printer name. </para>
66 <para>If no printcap name is specified <command>testprns
67 </command> will attempt to scan the printcap file name
68 specified at compile time. </para></listitem>
79 <term><filename>/etc/printcap</filename></term>
80 <listitem><para>This is usually the default printcap
81 file to scan. See <filename>printcap (5)</filename>.
89 <title>DIAGNOSTICS</title>
91 <para>If a printer is found to be valid, the message
92 "Printer name <printername> is valid" will be
95 <para>If a printer is found to be invalid, the message
96 "Printer name <printername> is not valid" will be
99 <para>All messages that would normally be logged during
100 operation of the Samba daemons are logged by this program to the
101 file <filename>test.log</filename> in the current directory. The
102 program runs at debuglevel 3, so quite extensive logging
103 information is written. The log should be checked carefully
104 for errors and warnings. </para>
106 <para>Other messages are self-explanatory. </para>
111 <title>VERSION</title>
113 <para>This man page is correct for version 2.2 of
114 the Samba suite.</para>
118 <title>SEE ALSO</title>
119 <para><filename>printcap(5)</filename>,
120 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>,
121 <ulink url="smbclient.1.html"><command>smbclient(1)</command></ulink>
126 <title>AUTHOR</title>
128 <para>The original Samba software and related utilities
129 were created by Andrew Tridgell. Samba is now developed
130 by the Samba Team as an Open Source project similar
131 to the way the Linux kernel is developed.</para>
133 <para>The original Samba man pages were written by Karl Auer.
134 The man page sources were converted to YODL format (another
135 excellent piece of Open Source software, available at
136 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
137 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
138 release by Jeremy Allison. The conversion to DocBook for
139 Samba 2.2 was done by Gerald Carter</para>