Samba is a software component that interacts with linux,unix,windows, and Sanma is a free open source software based on the GPL protocol.
Quickly configure Samba file servers
1. Turn off the firewall and SELinux
[email protected] ~]# Setenforce 0 #临时关闭
[[Email protected] ~] # sed-i "/selinux=/c selinux=disable" \
>/etc/sysconfig/selinux #永久的关闭
[[Email protected] ~] # service iptables stop #临时关闭
[Email protected]~]# servlce iptables off #永久关闭防火墙
2. Installing the Samba software
[[email protected] ~]# yum-y Install Samba
3. Create a shared directory
[[email protected] ~]# Mkdir/common---Create a directory
[[Email protected]~]# chmod 777/common---set permissions
[Email protected]~]# echo "Hello the Sky Bolg" >/common/smb.txt---Create a test file
4. Modify the configuration file
Configuration file by default in:/etc/samba/smb.conf
[Email protected] ~]# vim /etc/samba/smb.conf
Commet =common Share #共享注释
Path =/common #共享路径
Browseable =yes #所有人可见
Guest OK =no #拒绝匿名访问
Writable =yes #支持数据写入
5. Create an Access account
[[Email protected] ~] # useradd-i/sibin/nologin smbuser
[Email protected] 6~]# smbpasswd-a Smbuser
New SMB Password: #输入密码
Retype new SMB Password: #在输入一次密码
Tip This message indicates a successful addition: added User Smbuser.
6. Use of the SMBPASSWD command:
-A Add user
-X Delete User
-D Disabling users
-E Enable Account
7. Start the service
[[Email protected] ~] Service SMB start
[[email protected] ~]chkconfig SMB on
Test: Access the shared folder under win (assuming IP is: 192.168.2.3)
Start-and-run input (\\192.168.2.3) Enter the user name and password after logging in, you can see two directories common and Smbuser directory.
At this point, the Samba Quick configuration tutorial concludes.
Samba Quick Configuration