NAME 名字 testprns - 为smbd测试合法的打印机名
总览
testprns printername [printcapname]
描述
此程序是samba套件的一部分。
testprns是个非常简单的测试程序,用于检查smbd作为服务提供的打印机名是否合法。
在这里“Valid”的意思就是“在printcap中可以找到该打印机”。实际上总是使用printcap文件来指定打印机是非常明智的。
选项
- printername
- 要测试的打印机名。
- 打印机可以从printcap文件的每个记录首字段中获得,字段中用“|” 号来识别单个的打印机名和别名。注意当测试请求的打印机名时并不确认或检查printcap文件的总览。打印假脱机系统会比testprns程序更多或更少地放宽printcap文件的总览。但是,如果testprns找到了打印机的话smbd会作这样的检查。
- printcapname
- 此参数指定想要对给出的打印机名进行查找的printcap文件名。
- 如果此参数没有指定的话,testprns将尝试对编译时指定的printcap文件名。
相关文件
/etc/printcap 通常是被扫描的默认printcap文件。请参见 printcap (5).
诊断
如果发现检测的打印机合法,则显示“Printer name <printername> is valid”这样的信息。
如果发现检测的打印机不合法,则显示“Printer name <printername> is not valid”这样的信息。
所有测试结果信息通常情况下会被记录到当前目录下的test.log文件中。程序运行在调试级3上,所以会记录十分详细的信息。如果有出错或警告的话应该仔细检查这个文件。
其它信息是不需加以说明的。
另见
printcap (5), smbd (8), smbclient (1)
#p#
NAME
testprns - check printer name for validity with smbd
SYNOPSIS
- testprns {printername} [printcapname]
DESCRIPTION
testprns is a very simple test program to determine whether a given printer name is valid for use in a service to be provided by smbd(8).
"Valid" in this context means "can be found in the printcap specified". This program is very stupid - so stupid in fact that it would be wisest to always specify the printcap file to use.
OPTIONS
- printername
- The printer name to validate.
Printer names are taken from the first field in each record in the printcap file, single printer names and sets of aliases separated by vertical bars ("|") are recognized. Note that no validation or checking of the printcap syntax is done beyond that required to extract the printer name. It may be that the print spooling system is more forgiving or less forgiving than testprns. However, iftestprns finds the printer then smbd(8) should do so as well.
- printcapname
- This is the name of the printcap file within which to search for the given printer name.
If no printcap name is specified testprns will attempt to scan the printcap file name specified at compile time.
FILES
- /etc/printcap
- This is usually the default printcap file to scan. See printcap (5).
DIAGNOSTICS
If a printer is found to be valid, the message "Printer name <printername> is valid" will be displayed.
If a printer is found to be invalid, the message "Printer name <printername> is not valid" will be displayed.
All messages that would normally be logged during operation of the Samba daemons are logged by this program to the file test.log in the current directory. The program runs at debuglevel 3, so quite extensive logging information is written. The log should be checked carefully for errors and warnings.
Other messages are self-explanatory.
VERSION
This man page is correct for version 3.0 of the Samba suite.
SEE ALSO
printcap(5),smbd(8), smbclient(1)