Samb can be accessed from installation to windows. This content is purely simple to run smb without considering any security issues.
[1] installation:
(1) download smb rpm package file samba-3.0.10-1.4E.11.i386.rpm
(2) run the rpm command to install the rpm-ivh -- nodeps samba-3.0.10-1.4E.11.i386.rpm
[2] adding a user
(1) Add system user useradd shwq
(2) Change the User Password userpasswd shwq
(3) add smb User smbpasswd-a shwq
(4) modify the smb configuration file vi/etc/samba/smb. conf
Modify as follows:
[Xxx]
Comment = xxx work path
Path =/home/xxx
Public = yes
Writeable = yes
Guest OK = yes
(5) disable the Firewall service iptables stop
(6) restart smb service smb restart
[3] Access in window
(1) My computer-> tool-> ing network drive-> // 192.168.0.3/xxx
[4] Successful access to smb
[Note]
1,
[Problem]
Sometimes accessing smb in windows is blocked and cannot be accessed because linux iptables blocks the ports for communication between the two.
[Solution]
1. Disable the firewall and add rules to iptabel.
Vi/etc/rc. d/firewall
Iptables-a input-p tcp -- dport 138-j ACCEPT
Iptables-a input-p tcp -- dport 139-j ACCEPT
If the smb configuration is successful but the linux iptables cannot be connected in windows
The correct method is as follows:
[1] disable iptables-F.
[2] Link
[3] If the problem occurs, add information in iptable rules to enable port 139 of smb.
139 is the communication port between windows and linux
[4] in/etc/sysyconfig/iptables
Add the following information:
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 138-j ACCEPT
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 139-j ACCEPT
References:
Http://www.lslnet.com/linux/dosc1/04/linux-124771.htm
Http://fanqiang.chinaunix.net/adm/net/2005-03-31/3071.shtml
Automatic smb running
[Solution]
Enter setup on the terminal, select System services, and then select smb on the displayed page. * It indicates that smb can be automatically started.
Test smb Configuration File Syntax