testparm 中文man页面

系统
此程序是samba套件的一部分。 testparm是个非常简单的程序,用于检查smbd配置文件的内部正确性。如果程序报告没有什么问题,那么你可以放心地使用这个配置文件,并且smbd也会非常顺利地装入它。

名字

testparm - 检查smb.conf配置文件的内部正确性

,SH 总览

testparm [-s] [-h] [-L servername] [configfilename] [hostname hostIP]

描述

此程序是samba套件的一部分。

testparm是个非常简单的程序,用于检查smbd配置文件的内部正确性。如果程序报告没有什么问题,那么你可以放心地使用这个配置文件,并且smbd也会非常顺利地装入它。

注意,这并不保证配置文件中指定的服务可以获得或者如你所愿地那样进行操作。

如果在它的命令上指定可选的主机名和主机IP地址的话,测试程序将通过服务接口运行并报告是否指定的主机可以访问每个服务。

如果testparm在smb.conf文件中找到一个错误的话,它会向调用程序返回退出代码1,否则返回退出代码0。这样shell脚本可以测试testparm的输入。

选项

-s
如果不带这个参数,testparm将提示在列出服务名和服务定义项之间打一个回车。
-h
列出用法信息
-L servername
对服务项名字设定%L这样的宏值。对于测试包含这样的宏值的文件非常有用。
configfilename
指定要检查的配置文件名。如果不指定的话,程序对默认的smb.conf文件进行检查。
hostname
如果命令行带有这个参数时,测试程序将检查smb.conf文件中的“hosts allow”和“hosts deny”参数用以测试这些IP地址对应的主机名是否可以访问smbd服务器。如果用这样的参数时, hostIP参数也必须一并使用。
hostIP
这个参数用于指定前面给出的主机名相对应的IP地址。如上说述,主机名参数和这个地址必须一并使用。

相关文件

smb.conf,通常这是smbd使用的配置文件名。  

诊断

The program will issue a message saying whether the configuration file loaded OK or not. This message may be preceded by errors and warnings if the file did not load. If the file was loaded OK, the program then dumps all known service details to stdout. 程序运行的结果将给出装入的配置文件是否正确的信息。如果文件没有被装入时可能显示的是错误和警告信息。反之,装入文件正确的话,程序会在标准输出上列出所有可知的服务细节。  

版本

此手册页是针对samba套件版本2.0的。  

另见

smb.conf (5), smbd (8)

#p#

NAME

testparm - check an smb.conf configuration file for internal correctness  

SYNOPSIS

testparm [-s] [-h] [-v] [-L <servername>] [-t <encoding>] {config filename} [hostname hostIP]

DESCRIPTION

 

This tool is part of the samba(7) suite.

testparm is a very simple test program to check an smbd(8) configuration file for internal correctness. If this program reports no problems, you can use the configuration file with confidence that smbd will successfully load the configuration file.

Note that this is NOT a guarantee that the services specified in the configuration file will be available or will operate as expected.

If the optional host name and host IP address are specified on the command line, this test program will run through the service entries reporting whether the specified host has access to each service.

If testparm finds an error in the smb.conf file it returns an exit code of 1 to the calling program, else it returns an exit code of 0. This allows shell scripts to test the output from testparm.

OPTIONS

-s
Without this option, testparm will prompt for a carriage return after printing the service names and before dumping the service definitions.
-h|--help
Print a summary of command line options.
-V
Prints the program version number.
-L servername
Sets the value of the %L macro to servername. This is useful for testing include files specified with the %L macro.
-v
If this option is specified, testparm will also output all options that were not used in smb.conf(5) and are thus set to their defaults.
-t encoding
Output data in specified encoding.
configfilename
This is the name of the configuration file to check. If this parameter is not present then the default smb.conf(5) file will be checked.
hostname
If this parameter and the following are specified, then testparm will examine the hosts allow and hosts deny parameters in the smb.conf(5) file to determine if the hostname with this IP address would be allowed access to the smbd server. If this parameter is supplied, the hostIP parameter must also be supplied.
hostIP
This is the IP address of the host specified in the previous parameter. This address must be supplied if the hostname parameter is supplied.
 

FILES

smb.conf(5)
This is usually the name of the configuration file used by smbd(8).
 

DIAGNOSTICS

The program will issue a message saying whether the configuration file loaded OK or not. This message may be preceded by errors and warnings if the file did not load. If the file was loaded OK, the program then dumps all known service details to stdout.

VERSION

This man page is correct for version 3.0 of the Samba suite.

SEE ALSO

smb.conf(5), smbd(8)

 

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-11-01 13:46:50

中文mantac

2011-08-25 16:55:26

gets中文man

2011-08-25 15:49:02

freopen中文man

2011-08-25 16:00:56

fflush中文man

2011-08-25 16:08:55

fsetpos中文man

2011-08-25 15:33:18

exit中文man

2011-08-24 17:19:00

raw中文man

2011-08-25 10:55:37

services中文man

2011-08-25 09:35:26

units中文man

2011-08-24 13:57:35

DECLARE中文man

2011-08-11 15:28:43

ali中文man

2011-08-23 17:18:44

umount中文man

2011-08-23 17:24:11

userdel中文man

2011-08-23 17:33:22

rdev中文man

2011-08-23 18:05:21

ABORT中文man

2011-08-18 19:15:25

group中文man
点赞
收藏

51CTO技术栈公众号