1
2
3 
4
5
6
7<html><head><title>testprns (1)</title>
8
9<link rev="made" href="mailto:samba@samba.org">
10</head>
11<body>
12
13<hr>
14
15<h1>testprns (1)</h1>
16<h2>Samba</h2>
17<h2>23 Oct 1998</h2>
18
19
20    
21<p><a name="NAME"></a>
22<h2>NAME</h2>
23    testprns - check printer name for validity with smbd 
24<p><a name="SYNOPSIS"></a>
25<h2>SYNOPSIS</h2>
26     
27<p><strong>testprns</strong> <a href="testprns.1.html#printername">printername</a> [<a href="testprns.1.html#printcapname">printcapname</a>]
28<p><a name="DESCRIPTION"></a>
29<h2>DESCRIPTION</h2>
30    
31<p>This program is part of the <strong>Samba</strong> suite.
32<p><strong>testprns</strong> is a very simple test program to determine whether a
33given printer name is valid for use in a service to be provided by
34<a href="smbd.8.html"><strong>smbd</strong></a>.
35<p>"Valid" in this context means "can be found in the printcap
36specified". This program is very stupid - so stupid in fact that it
37would be wisest to always specify the printcap file to use.
38<p><a name="OPTIONS"></a>
39<h2>OPTIONS</h2>
40    
41<p><dl>
42<p><a name="printername"></a>
43<p></p><dt><strong><strong>printername</strong></strong><dd> The printer name to validate.
44<p>Printer names are taken from the first field in each record in the
45printcap file, single printer names and sets of aliases separated by
46vertical bars ("|") are recognized. Note that no validation or
47checking of the printcap syntax is done beyond that required to
48extract the printer name. It may be that the print spooling system is
49more forgiving or less forgiving than <strong>testprns</strong>. However, if
50<strong>testprns</strong> finds the printer then <a href="smbd.8.html"><strong>smbd</strong></a> should
51do so as well.
52<p><a name="printcapname"></a>
53<p></p><dt><strong><strong>printcapname</strong></strong><dd> This is the name of the printcap file within
54which to search for the given printer name.
55<p>If no printcap name is specified <strong>testprns</strong> will attempt to scan the
56printcap file name specified at compile time.
57<p></dl>
58<p><a name="FILES"></a>
59<h2>FILES</h2>
60    
61<p><strong>/etc/printcap</strong> This is usually the default printcap file to
62scan. See <strong>printcap (5)</strong>.
63<p><a name="DIAGNOSTICS"></a>
64<h2>DIAGNOSTICS</h2>
65    
66<p>If a printer is found to be valid, the message "Printer name
67&lt;printername&gt; is valid" will be displayed.
68<p>If a printer is found to be invalid, the message "Printer name
69&lt;printername&gt; is not valid" will be displayed.
70<p>All messages that would normally be logged during operation of the
71<a href="samba.7.html"><strong>Samba</strong></a> daemons are logged by this program to the
72file <code>test.log</code> in the current directory. The program runs at
73debuglevel 3, so quite extensive logging information is written. The
74log should be checked carefully for errors and warnings.
75<p>Other messages are self-explanatory.
76<p><a name="SEEALSO"></a>
77<h2>SEE ALSO</h2>
78    
79<p><strong>printcap (5)</strong>, <a href="smbd.8.html"><strong>smbd (8)</strong></a>, <a href="smbclient.1.html"><strong>smbclient
80(1)</strong></a>
81<p><a name="AUTHOR"></a>
82<h2>AUTHOR</h2>
83    
84<p>The original Samba software and related utilities were created by
85Andrew Tridgell <a href="mailto:samba@samba.org"><em>samba@samba.org</em></a>. Samba is now developed
86by the Samba Team as an Open Source project similar to the way the
87Linux kernel is developed.
88<p>The original Samba man pages were written by Karl Auer. The man page
89sources were converted to YODL format (another excellent piece of Open
90Source software, available at
91<a href="ftp://ftp.icce.rug.nl/pub/unix/"><strong>ftp://ftp.icce.rug.nl/pub/unix/</strong></a>)
92and updated for the Samba2.0 release by Jeremy Allison.
93<a href="mailto:samba@samba.org"><em>samba@samba.org</em></a>.
94<p>See <a href="samba.7.html"><strong>samba (7)</strong></a> to find out how to get a full
95list of contributors and details on how to submit bug reports,
96comments etc.
97</body>
98</html>
99