rpm -qa | grep samba
[root@nutch vmware-tools-distrib]# rpm -qa | grep samba
samba-winbind-clients-3.6.9-169.el6_5.x86_64
samba4-libs-4.0.0-58.el6.rc4.x86_64
samba-3.6.9-169.el6_5.x86_64
samba-client-3.6.9-169.el6_5.x86_64
samba-common-3.6.9-169.el6_5.x86_64
samba-winbind-3.6.9-169.el6_5.x86_64
[root@roothomes ~] yum install samba
[root@nutch vmware-tools-distrib]# service smb restart
关闭 SMB 服务: [确定]
启动 SMB 服务: [确定]
You have new mail in /var/spool/mail/root
Service smb stop
Service smb start
[root@nutch vmware-tools-distrib]# cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
[global]
workgroup=WORKGROUP
server string=Samba Server
security=share
netbios name=SambaServer
[share]
comment = SambaServer
path = /home
public = yes
writables = yes
only guest = yes
[root@nutch 桌面]# smbclient //192.168.232.140/share
WARNING: The security=share option is deprecated
Enter root's password: #在这儿不需要输入密码,因为我们的security=share
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.9-169.el6_5]
Server not using user level security and no password supplied.
smb: \> ls
. D 0 Tue Sep 9 15:00:52 2014
.. DR 0 Tue Sep 9 16:33:36 2014
nutch2 D 0 Fri Feb 21 15:21:10 2014
share D 0 Tue Sep 9 15:08:23 2014
hadoop D 0 Fri Jan 17 17:40:29 2014
35418 blocks of size 524288. 19689 blocks available
smb: \>
\\192.168.232.140\share
在/etc/init.d/rc 这个文件中加入
#start smba
/etc/init.d/smb restart
注:似乎普通用户没办法查看防火墙状态
[root@master1 ~]# /etc/init.d/iptables status
#防火墙未开启
表格:filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
[root@master1 ~]# service iptables stop
chkconfig iptables on/off
[root@nutch 桌面]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@nutch 桌面]# /etc/rc.d/init.d/smb restart
或者重启计算机
reboot
[root@nutch 桌面]# chmod 766 /home/test/a.txt