|
Sams Teach Yourself Samba in 24 Hours |
||||||||||||||||||||||||||
|
Hour 4: Installing and Testing the Configuration |
||||||||||||||||||||||||||
|
In addition to the tools already mentioned, several other utilities are also included with Samba (see Table 4.2). These can be found in the /usr/local/samba/bin/ directory.
Tool name |
Description |
This tool reports on the current status of connections and locked files. | |
This utility queries NetBIOS name information over TCP/IP. | |
This simple utility verifies whether a printer name is valid for use as a service name. This means that the printer name can be found in the /etc/printcap specified. | |
This tool allows for the compiling or decompiling of code page files for use with the internationalization features of Samba. | |
|
This shell script provides a means of backing up and restoring files on remote SMB shares to UNIX tape drives by using the smbclient utility. Backups are discussed more in Hour 23, "Tips and Tricks." | |
This small glue program is used by smbd to execute shell commands. By glue I mean that it acts as an interface to allow smbd to run some type of shell scripts or other command-line tools. | |
|
This command-line tool analogous to smbclient allows for performing DCE/RPC to Windows NT and Samba servers. This is discussed more in Hour 22, "Experimental PDC Support." | |
|
This GUI administrative tool manages the smb.conf file. GUI administration tools are examined more in Hour 9, "GUI Administration Tools." | |
|
These tools provide means of manipulating changing the LanMan and NT hashes stored in the private/smbpasswd file used by Samba when encrypted passwords have been enabled. Encryption is discussed more in Hour 6. |
Two of the tools listed, which can be extremely useful, are smbstatus and nmblookup. You will look at both of these diagnostic tools here, beginning with smbstatus.
The smbd daemon for a connection runs as root until it is necessary to perform some operation on behalf of the user connected. At that time, the process uid becomes the user's UNIX uid and then switches back to root. This can result in some difficulty when trying to determine which smbd process belongs to which user. smbstatus displays information about currently connected users and currently locked files. The following output shows that I'm connected to my home directory and currently have a file open for editing:
root# smbstatus Samba version 2.0.0beta4 Service uid gid pid machine ---------------------------------------------- jerryc jerryc users 472 queso (192.168.1.72) Tue Dec 29 11:31:05 1998 Locked files: Pid DenyMode R/W Oplock Name -------------------------------------------------- 472 DENY_NONE RDONLY EXCLUSIVE+BATCH src/samba/source/Makefile Tue Dec 29 11:31:56 1998 Share mode memory usage (bytes): 1048368(99%) free + 136(0%) used + 72(0%) overhead = 1048576(100%) total
The second tool that I often use is nmblookup. This command-line utility provides a means of querying NetBIOS names and returning the associated IP address:
root# /usr/local/samba/bin/nmblookup eagle Sending queries to 192.168.1.255 192.168.1.73 eagle<00>
nmblookup defaults to locate the <00> type name. By appending #<xx> to the NetBIOS name you querying, nmblookup can resolve a different resource type, such as the messenger server name type <03>:
root# /usr/local/samba/bin/nmblookup eagle#03 Sending queries to 192.168.1.255 192.168.1.73 eagle<03>
nmblookup can . also resolve group names:
root# /usr/local/samba/bin/nmblookup fowlplay Sending queries to 192.168.1.255 192.168.1.73 fowlplay<00>
And finally, you can use the -S switch to perform a node status request on the name and return output similar to the nbtstat.exe -a netbios name command run from a Windows box:
root# /usr/local/samba/bin/nmblookup chipsndips -S
Sending queries to 192.168.1.255
192.168.1.72 chipsndips<00>
Looking up status of 192.168.1.72
received 8 names
QUESO <00> - M <ACTIVE>
CHIPSNDIPS <00> - <GROUP> M <ACTIVE>
QUESO <03> - M <ACTIVE>
QUESO <20> - M <ACTIVE>
CHIPSNDIPS <1e> - <GROUP> M <ACTIVE>
CARTEGW <03> - M <ACTIVE>
CHIPSNDIPS <1d> - M <ACTIVE>
..__MSBROWSE__. <01> - <GROUP> M <ACTIVE>
num_good_sends=0 num_good_receives=0
|
Sams Teach Yourself Samba in 24 Hours |
||||||||||||||||||||||||||
|
Hour 4: Installing and Testing the Configuration |
||||||||||||||||||||||||||
|
© Copyright Macmillan USA. All rights reserved.