目得:一直使用Xmanage给linux传文件,今天试用到期没去找注册码就安装一个简单的samba服务给linux传文件,顺便把过程记录了一下,方便以后用时查看.
1. 安装samba
2.创建samba用户及设置密码
.创建用户
设置密码
3.修改smb配置文件
只需简单的去几个”;”号就可以了
修改成如下,或直接用以下配置文件就OK了
copy /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi smb.conf
#添加如下代码,如果修改以前的配置文件,红色的为修改的地方
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
netbios name = MYSERVER
interfaces = lo eth0 192.168.0.0/24
hosts allow = 127. 192.168.0. 192.168.13.
# logs split per machine
log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
winbind use default domain = no
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
#注,仿照[public]可以发布更多的目录,但一定要注意在目录上给777的权限,
#security = user
#passdb backend = tdbsam
#上面两行设小权限
[public]
comment = Public Stuff
path = /home/samba
public = yes
writable = yes
printable = no
write list = +staff
4.重新启动samba
5.客启端登录
开始/运行
输入用户名和密码
可以使用了(只有它自己的家目录有读写权)
本文转自 vfast_chenxy 51CTO博客,原文链接:http://blog.51cto.com/chenxy/166687
,如需转载请自行联系原作者