This appendix is a reference listing of command-line options and other information to help you use the programs that come with the Samba distribution.
smbd |
nmbd |
findsmb |
findsmb [subnet_broadcast_address]
The output from findsmb looks like this:
$ findsmb *=DMB +=LMB IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION --------------------------------------------------------------------- 172.16.1.1 TOLTEC *[METRAN] [Unix] [Samba 2.2.6] 172.16.1.3 MIXTEC +[METRAN] [Unix] [Samba 2.2.6] 172.16.1.4 ZAPOTEC [METRAN] [Windows 5.0] [Windows 2000 LAN Manager] 172.16.1.5 HUASTEC [ METRAN ] 172.16.1.6 MAYA [ METRAN ] 172.16.1.7 OLMEC [METRAN] [Windows 5.1] [Windows 2000 LAN Manager] 172.16.1.10 UTE [ METRAN ] 172.16.1.13 DINE [METRAN] [Windows NT 4.0] [NT LAN Manager 4.0]
make_smbcodepage |
This program is part of the internationalization features of Samba 2.2 and is obsolete in Samba 3.0, which supports Unicode automatically. The make_smbcodepage program compiles a binary codepage file from a text-format codepage definition. It can also perform the reverse operation, decompiling a binary codepage file into a text version. Examples of text-format codepage files can be found in the Samba distribution in the source/codepages directory. After Samba has been installed, examples of binary codepages can be found in the directory /usr/local/samba/lib/codepages.
make_unicodemap |
net |
Sets the debug (sometimes called logging) level. The level can range from 0 to 10.
Specifies the long listing mode. This is provided for functions that print informational listings.
Specifies the name of the Samba configuration file, overriding the compiled-in default.
Prints details about the Active Directory computer account of the system.
Changes the Active Directory password for the local system's computer trust account.
Prints information about the specified file, which must be open.
Lists all files opened on the server by the user specified by username.
Adds the user specified by username to the group specified by group_name.
Deletes the user specified by username from the group specified by group_name.
Prints a help message for the specified function, which can be more than one word.
Must be preceded by a method. See the ads info and rpc info functions.
Prints information (including the job IDs) about printer queues on the server.
Adds an account for the trust relationship with the specified Windows NT domain.
Establishes a trust relationship with the specified Windows NT domain.
Revokes the trust relationship with the specified Windows NT domain.
Closes the session to the server from the specified client. A synonym is session close.
Displays the system time—in Unix date command format—on the target system.
Sets the local system's hardware clock using the time obtained from the operating system.
Sets the time on the local system using the time obtained from the remote system.
Prints the time zone (in hours from GMT) in use on the system.
Lists user accounts. The method can be specified as ads, rap, or rpc.
Deletes the specified user's account. The method can be specified as ads, rap, or rpc.
Lists the domain groups to which the specified user belongs. The method can be specified as ads, rap, or rpc.
nmblookup |
Interprets netbios_name as an IP address and does a node status query on it.
Sets a NetBIOS scope identifier. NetBIOS scope is a rarely used precursor to workgroups.
$ nmblookup -S toltec querying toltec on 172.16.1.255 172.16.1.1 toltec<00> Looking up status of 172.16.1.1 TOLTEC <00> - M <ACTIVE> TOLTEC <03> - M <ACTIVE> TOLTEC <20> - M <ACTIVE> ..__MSBROWSE__. <01> - <GROUP> M <ACTIVE> METRAN <00> - <GROUP> M <ACTIVE> METRAN <1b> - M <ACTIVE> METRAN <1c> - <GROUP> M <ACTIVE> METRAN <1d> - M <ACTIVE> METRAN <1e> - <GROUP> M <ACTIVE>
Performs a unicast query to the specified address. Used with -R to query WINS servers.
pdbedit |
Sets the full name of the user specified with the -u option.
Sets the home directory path (as a UNC) for the user specified with the -u option.
Lists the user accounts in the database. See also the -v option.
Sets the directory in which the user's profile is kept. The directory is specified as a UNC.
Selects verbose mode when listing accounts with the -l option. The account fields will be printed.
Deletes the user (specified with the -u option) from the account database.
rpcclient |
This is a program for issuing administrative commands that are implemented using Microsoft RPCs. It provides access to the RPCs that Windows administrative GUIs use for system management. The rpcclient command is mainly for use by advanced users who understand the RPCs. More information on these can be found in Microsoft's Platform Software Development Kit (SDK), available for download from the Microsoft web site at http://www.microsoft.com.
You can run a single rpcclient command by using the -c command string option, or interactively with rpcclient prompting for commands.
username = value password = value domain = value
Executes a sequence of semicolon-separated commands. Commands are listed in the following section.
Sets the filename for log/debug files. The extension .client is appended to the filename.
rpcclient commands |