Библиотека сайта 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
-d
level--debug=l
evel-
Sets the debug (sometimes called logging) level. The level can range from 0 to 10.
-l
--long
-
S
pecifies the long listing mode. This is provided for functions that print informational listings. -n
name--myname
=name-p
port--port
=port-s
filename--conf
=filename-
Specifies the name of the Samba configuration file, overriding the compiled-in default.
-U
username[%
password]--user
=username[%
password]-W
name--myworkgroup
=name
Functions
abortshutdown
ads
info
ads
join
OUads
leave
ads password
username@
REALM-U
admin_username@
REALM%admin_
passwordads printer info
[printer] [server]ads printer publish
printer_nameads printer remove
printer_nameads search
expr 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.
domain
file
file close
file_idfile info
file_id-
Prints information about the specified file, which must be open.
file user
username-
Lists all files opened on the server by the user specified by username.
group add
group_namegroup delete
group_namegroupmember add
group_name username-
Adds the user specified by username to the group specified by group_name.
groupmember delete
group_name username-
Deletes the user specified by username from the group specified by group_name.
groupmember list
group_namehelp
help
methodhelp
function-
Prints a help message for the specified function, which can be more than one word.
info
-
Must be preceded by a method. See the
ads
info
andrpc
info
functions. join
leave
lookup dc
[domain]lookup host
hostname [type]lookup kdc
[realm]lookup ldap
[domain]lookup master
[domain]password
username old_password new_passwordprinter info
printer publish
printer remove
printq
-
Prints information (including the job IDs) about printer queues on the server.
printq delete
queue_namerpc abortshutdown
rpc info
rpc join
rpc shutdown
rpc trustdom add
domain_name-
Adds an account for the trust relationship with the specified Windows NT domain.
rpc trustdom establish
domain_name-
Establishes a trust relationship with the specified Windows NT domain.
rpc trustdom revoke
domain_name-
Revokes the trust relationship with the specified Windows NT domain.
search
server
session
session delete NetBIOS_
name-
Closes the session to the server from the specified client. A synonym is
session
close
. session close
share
share add
share_name=
server_pathshare delete
share_nameshutdown
status
time
-
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 add
trustdom establish
trustdom revoke
user
-
Lists user accounts. The method can be specified as
ads
,rap
, orrpc
. user add
username [password]user delete
username-
Deletes the specified user's account. The method can be specified as
ads
,rap
, orrpc
. user info
username-
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.
-B
broadcast_address-d
debug_level-f
-h
-i
scope-
Sets a NetBIOS scope identifier. NetBIOS scope is a rarely used precursor to workgroups.
-M
-R
-r
-S
-
$
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> -s
configuration_ file-T
-U
unicast_address-
Performs a unicast query to the specified address. Used with
-R
to query WINS servers.
pdbedit |
Options
-a
-d
drive_letter-D
debug_level-e
pwdb_backend-f
full_name-
Sets the full name of the user specified with the
-u
option. -h
unc-
Sets the home directory path (as a UNC) for the user specified with the
-u
option. -i
pwdb_backend-l
-
Lists the user accounts in the database. See also the
-v
option. -m
-p
unc-
Sets the directory in which the user's profile is kept. The directory is specified as a UNC.
-s
unc-u
username-v
-
Selects verbose mode when listing accounts with the
-l
option. The account fields will be printed. -w
-x
-
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.
Options
-A
filename-
username = value password = value domain = value
-c
command_string-
Executes a sequence of semicolon-separated commands. Commands are listed in the following section.
-d
debuglevel-h
-l
logbasename-
Sets the filename for log/debug files. The extension .client is appended to the filename.
-N
-s
filename-U
username[%
password]-W
domain
rpcclient commands |