SambaUse of software packages
Packages provided by Fedora Core/RedHat Linux
Samba Server Software Package
Samba-client samba client Tool
Samba-common tools and libraries
Install the rpmdb-fedora/rpmdb-RedHat package (usually on the third disc)
However, this software package cannot be found in fc5.
Installing rpmdb can solve the dependency problem.
# Rpm-IVH rpmdb-fedora *. rpm
# Rpm-IVH -- aid samba *. rpm is valid only when rpmdb is installed.
1. # rpm-IVH cups-libs *. RPM first disc
2. # rpm-IVH samba *. RPM first disc (client, common)
3. # rpm-IVH samba *. RPM second disc
# Rpm-Qa | grep Samba view the list of all software packages
# Rpm-QL Samba | more query a Software List
SambaClient tools
Smbtree
Purpose: display the list of all shared hosts and directories in the LAN (the current user is logged on by default)
Usage: smbtree [-B] [-D] [-u username % Password]
-D indicates that only the workgroup name is displayed, and the host is not displayed.
-B: queries the list using broadcast instead of the WINS server.
-D and-u cannot be shared, because it is impossible to use all hosts in the same user's Region
Nmblookup
Purpose: display the nethios Host Name of a host.
Nmblookup my-Server Query Server IP
Nmblookup/* query the IP addresses of all active hosts
Smbclient
Purpose: Display/log on to the shared folder in the LAN
Usage: smbclient-l host
Smbclient // host/share
Smbclient-l 192.168.0.22-u RedHat % RedHat Log On As a RedHat user and display the shared directory
Smbclient // 192.168.0.22/Linux-u RedHat % RedHat
Log on to the directory, view the directory content, and download the file through put and get.
Smbtar
Remote Backup of files in network neighbors
Smbtar-s Win2000-u RedHat-P RedHat-x chinalab-T itlab.tar
Mount the shared directory to the local directory and then access
Mount. CIFS // 192.168.0.22/Linux/mnt-O username = RedHat % RedHat
Tar tvf lab.tar: displays the files in the backup package
SambaServer Configuration
1. modify the configuration file/etc/samba/smb. conf.
Workgroup = workgroup
Security = Share
[Docs]
Path =/usr/share/doc
Comment = share documents # description of the shared directory
Public = Yes
2. Restart the SMB server
# Service SMB restart
# Chkconfig SMB on enables Automatic startup of SMB each time
3. Test
# Smbclient-l localhost
Chkconfig SMB-list to view the service startup status
SMB provides name explanation Service
Nmb provides data transmission service
The two always work together
Samba File Server
(WINS) The host list is not visible to the network neighbor. You can directly enter an IP address in the address bar such as // 192.168.0.1 to view the shared directory.
The host list displayed by the network neighbor mainly consists of three sources: the configuration file LmHosts, which corresponds to the IP address.
Second, browsing the server
3. Obtain the host list through broadcast