samba安装
samba安装
samba是一个很好用的跟windows共享的工具,可以将linux某个目录映射成windows的一个网络磁盘。
下面以centos安装为例。
samba软件
yum install samba
修改samba配置
vi smb.conf
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
ntlm auth = yes
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[jkhere]
comment = gitbook Directories
path = /usr1
browseable = Yes
available = Yes
public = Yes
writeable = Yes
read only = No
guest ok = Yes
valid users = root
重点是global的ntlm auth字段和自己的共享字段。其他字段的意思可以自己慢慢查,但是这样设置应该就够了。
设置samba密码并重启samba服务
在/etc/samba目录下,执行:
touch smbpasswd
smbpasswd -a root
service smbd restart