centos安装 samba

使用 yum install samba 更新最新的 samba 包

邻居来轻松访问安装了Samba的UNIX/LINUX服务器。
1.安装centos时在防火墙中开启文档共享服务,并选择安装文档共享服务器
2.启动 Samba 服务。
# chkconfig smb on  ← 配置 Samba 自启动
# service smb start      ← 启动Samba服务
Starting SMB services:       [ OK ]
Starting NMB services:       [ OK ]
# smbpasswd -a root  ← 将系统用户 root 加入到 Samba 用户数据库
New SMB password:  ← 输入该用户用于登录 Samba 的密码
Retype new SMB password:  ← 再次确认输入该密码
Added user centospub.
3.配置Samba
通过编辑 /etc/samba/smb.conf 让将要被共享的目录拥有充分的读写权限属性。
在smb.conf文档最后加入下面内容
[all file]     
   comment = centos all file
   path = /
   valid users = root
   public = no
   writable = yes
   printable = no
   create mask = 0777
   directory mask = 0777

发布者

admin

互联网web开发管理