手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

samba服务及访问控制

[日期:2013-05-22] 来源:51cto  作者:tanxin [字体:大 中 小]

二.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

linux
相关资讯       samba 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款