二.Samba的基本配置
(1)安装
[root@tx1 ~]# yum install samba -y
简单定义一个属于自己的共享目录
[root@tx1 ~]# vim /etc/samba/smb.conf

[root@tx1 ~]# useradd t2
[root@tx1 samba]# smbpasswd -a t2
New SMB password:
Retype new SMB password:
Added user t2.
[root@tx1 samba]# /etc/init.d/smb start
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
(2)设置共享路径
[root@tx1 samba]# mkdir /tmp/samba -pv
mkdir: created directory `/tmp/samba'
[root@tx1 samba]# chmod 1757 /tmp/samba
注意权限设置好哦!
[root@tx1 samba]# /etc/init.d/smb restart
(3)linux客户端测试
客户端查看服务器有哪些共享信息:

挂载使用:
[root@tx2 ~]# mount //192.168.8.70/public /mnt -o user=t2
Password:
或者
[root@tx2 ~]# mount //192.168.8.70/public /mnt -o user=t2,password=123
[root@tx2 ~]# cd /mnt/
[root@tx2 mnt]# touch tx
返回到服务端查看:
[root@tx1 samba]# cd /tmp/samba/
[root@tx1 samba]# ls
tx
(4)Windos端测试:

(5)客户端实现开机自动挂载
[root@tx2 ~]# vim /etc/fstab

