Linux samba sharing, share-Linux Enterprise Application-Linux server application information, the following is a detailed description. [Root @ localhost root] # rpm-qa | grep samba
// Check whether samba is installed
Samba-2.2.7a-7.9.0
Redhat-config-samba-1.0.4-1
Samba-common-2.2.7a-7.9.0
Samba-client-2.2.7a-7.9.0
[Root @ localhost root] # service smb start
// Start the samba Service
Start the SMB service: [OK]
Start NMB service: [OK]
[Root @ localhost root] # pgrep smbd
// Check whether the smb server is running
2709
[Root @ localhost root] # pgrep nmbd
// Check whether nmb is running. If not, check whether the ip address and subnet mask are configured.
[Root @ localhost root] # ifconfig
// The linux ip address and subnet mask are not configured. Next, configure the ip address and subnet mask. The subnet mask of the ip address in the same network segment as that in windows xp
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: 64: 79: 7C
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 93 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 16 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 100
RX bytes: 9592 (9.3 Kb) TX bytes: 5472 (5.3 Kb)
Interrupt: 10 Base address: 0x2024
Lo Link encap: Local Loopback
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Up loopback running mtu: 16436 Metric: 1
RX packets: 7505 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 7505 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 512783 (500.7 Kb) TX bytes: 512783 (500.7 Kb)
[Root @ localhost root] # ifconfig eth0 172.19.23.11 netmask 255.255.254.0
[Root @ localhost root] # ping-c 4 172.19.23.21
// Ping the IP address of windows xp to check whether the IP address can be pinged.
PING 172.19.23.21 (172.19.23.21) 56 (84) bytes of data.
64 bytes from 172.19.23.21: icmp_seq = 1 ttl = 64 time = 0.823 MS
64 bytes from 172.19.23.21: icmp_seq = 2 ttl = 64 time = 0.161 MS
64 bytes from 172.19.23.21: icmp_seq = 3 ttl = 64 time = 0.137 MS
64 bytes from 172.19.23.21: icmp_seq = 4 ttl = 64 time = 0.111 MS
--- 172.19.23.21 ping statistics ---
4 packets transmitted, 4 bytes ed, 0% packet loss, time 3006 ms
Rtt min/avg/max/mdev = 0.111/0.308/0.823/0.297 MS
[Root @ localhost root] # netstat-tlnp | grep smb
// View the port occupied by smb. the smb port is 139.
Tcp 0 0 0.0.0.0: 139 0.0.0.0: * LISTEN
2709/smbd
[Root @ localhost root] # iptables-F
// Clear firewall rules
[Root @ localhost root] # cp/etc/samba/smb. conf/etc/samba/smb. conf. bak
// Back up the samba configuration file, just in case
[Root @ localhost root] # vi/etc/samba/smb. conf
// Edit the smb file to find security = user and assign it to security = share
Press ESC
: Wq
Save and exit
[Root @ localhost root] # service smb restart
// Restart the samba server to make the configuration file take effect.
Disable the SMB service: [OK]
Disable NMB service: [OK]
Start the SMB service: [OK]
Start NMB service: [OK]
[Root @ localhost root] # mkdir/mnt/text
// Create a sub-directory text under the/mnt directory
[Root @ localhost root] # chmod 0777/mnt/text
// Grant the sub-file text, user, group, and other users the permission to execute and read/write the sub-File
[Root @ localhost root] # vi +/etc/samba/smb. conf
// Edit the smb. conf configuration file. Place the cursor at the end of the file and add a series of content.
# This is samba text // annotation description
[Text] // name of the shared directory
Comment = text
Path =/mnt/text // shared directory path
Read only = no // specify whether the directory is readable
Writable = yes // specify whether the directory is feasible
Public = yes // specify whether the directory can be accessed by guest
// Press ESC
: Wq
// Save and exit
[Root @ localhost root] # service smb restart
// Restart the samba Service
Disable the SMB service: [OK]
Disable NMB service: [OK]
Start the SMB service: [OK]
Start NMB service: [OK]
// Enter the address of samba server in the IE Address Bar of windows xp to access the text shared folder.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.