Библиотека сайта rus-linux.net
Appendix C. Summary of Samba Daemons and Commands
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 |
Command synopsis
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 |
Miscellaneous options
-dlevel--debug=level-
Sets the debug (sometimes called logging) level. The level can range from 0 to 10.
-l--long-
Specifies the long listing mode. This is provided for functions that print informational listings. -nname--myname=name-pport--port=port-sfilename--conf=filename-
Specifies the name of the Samba configuration file, overriding the compiled-in default.
-Uusername[%password]--user=username[%password]-Wname--myworkgroup=name
Functions
abortshutdownadsinfoadsjoinOUadsleaveads passwordusername@REALM-Uadmin_username@REALM%admin_passwordads printer info[printer] [server]ads printer publishprinter_nameads printer removeprinter_nameads searchexpr attribads status-
Prints details about the Active Directory computer account of the system.
change localhost pass-
Changes the Active Directory password for the local system's computer trust account.
domainfilefile closefile_idfile infofile_id-
Prints information about the specified file, which must be open.
file userusername-
Lists all files opened on the server by the user specified by username.
group addgroup_namegroup deletegroup_namegroupmember addgroup_name username-
Adds the user specified by username to the group specified by group_name.
groupmember deletegroup_name username-
Deletes the user specified by username from the group specified by group_name.
groupmember listgroup_namehelphelpmethodhelpfunction-
Prints a help message for the specified function, which can be more than one word.
info-
Must be preceded by a method. See the
adsinfoandrpcinfofunctions. joinleavelookup dc[domain]lookup hosthostname [type]lookup kdc[realm]lookup ldap[domain]lookup master[domain]passwordusername old_password new_passwordprinter infoprinter publishprinter removeprintq-
Prints information (including the job IDs) about printer queues on the server.
printq deletequeue_namerpc abortshutdownrpc inforpc joinrpc shutdownrpc trustdom adddomain_name-
Adds an account for the trust relationship with the specified Windows NT domain.
rpc trustdom establishdomain_name-
Establishes a trust relationship with the specified Windows NT domain.
rpc trustdom revokedomain_name-
Revokes the trust relationship with the specified Windows NT domain.
searchserversessionsession delete NetBIOS_name-
Closes the session to the server from the specified client. A synonym is
sessionclose. session closeshareshare addshare_name=server_pathshare deleteshare_nameshutdownstatustime-
Displays the system time—in Unix date command format—on the target system.
time set-
Sets the local system's hardware clock using the time obtained from the operating system.
time system-
Sets the time on the local system using the time obtained from the remote system.
time zone-
Prints the time zone (in hours from GMT) in use on the system.
trustdom addtrustdom establishtrustdom revokeuser-
Lists user accounts. The method can be specified as
ads,rap, orrpc. user addusername [password]user deleteusername-
Deletes the specified user's account. The method can be specified as
ads,rap, orrpc. user infousername-
Lists the domain groups to which the specified user belongs. The method can be specified as
ads,rap, orrpc.
| nmblookup |
Options
-A-
Interprets netbios_name as an IP address and does a node status query on it.
-Bbroadcast_address-ddebug_level-f-h-iscope-
Sets a NetBIOS scope identifier. NetBIOS scope is a rarely used precursor to workgroups.
-M-R-r-S-
$
nmblookup -S toltecquerying 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> -sconfiguration_ file-T-Uunicast_address-
Performs a unicast query to the specified address. Used with
-Rto query WINS servers.
| pdbedit |
Options
-a-ddrive_letter-Ddebug_level-epwdb_backend-ffull_name-
Sets the full name of the user specified with the
-uoption. -hunc-
Sets the home directory path (as a UNC) for the user specified with the
-uoption. -ipwdb_backend-l-
Lists the user accounts in the database. See also the
-voption. -m-punc-
Sets the directory in which the user's profile is kept. The directory is specified as a UNC.
-sunc-uusername-v-
Selects verbose mode when listing accounts with the
-loption. The account fields will be printed. -w-x-
Deletes the user (specified with the
-uoption) 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.
Options
-Afilename-
username = value password = value domain = value
-ccommand_string-
Executes a sequence of semicolon-separated commands. Commands are listed in the following section.
-ddebuglevel-h-llogbasename-
Sets the filename for log/debug files. The extension .client is appended to the filename.
-N-sfilename-Uusername[%password]-Wdomain
| rpcclient commands |
