Fedora 10 Samba server 配置

 1.  install packages:

# yum install samba


2.  edit /etc/samba/smb.conf,   add shared directory


[global]
server string= dev-91
Workgroup= WORKGROUP
security= user
domain master= yes
preferred master= yes
local master= yes
os level= 20
invalid users= bin daemon adm sync shutdown halt mail news uucp gopher
map to guest= Bad User
host msdfs= no
msdfs root= no
null passwords= yes
strict allocate= no
encrypt passwords= yes
printcap name= lpstat
printing= cups
printable= no
load printers= yes
max smbd processes= 500
getwd cache= yes
display charset= UTF-8
log level= 0
syslog= 0
max log size= 50
use sendfile= yes
log file = /var/log/samba/log.%m

[public]
path= /home/export/share
max connections= 50
directory mode= 0777
create mode= 0777
follow symlinks= yes
wide links= no
writeable= yes
public= yes
store dos attributes= yes
write list= foo


after completion,  try run '#testparm smb.conf' 

3.  adduser in linux

#adduser foo -p xxx  -d /home/foo

4. adduser and password for samba login

#pdbedit -u foo -d /home/foo

#smbpasswd foo

# vi /etc/samba/smbusers

(add a login user string for 'foo'


5. check SELinux setting

#getsebool -a | grep samba


Guarantee the following parameters are on:

samba_create_home_dirs --> on
samba_domain_controller --> off
samba_enable_home_dirs --> off
samba_export_all_ro --> on
samba_export_all_rw --> on
samba_run_unconfined --> on
samba_share_fusefs --> off
samba_share_nfs --> off
use_samba_home_dirs --> on
virt_use_samba --> off


How to set, ex:

# setsebool -P samba_export_all_ro on


6.  check firewall setup

(1)  use command  "system-config-firewall" to disable fireware,  or

(2)  'iptables --flush' ,  and

(3) 

#service iptables status
#service iptables start
# iptables -A INPUT -p tcp --sport 137 -j ACCEPT
# iptables -A INPUT -p tcp --sport 138 -j ACCEPT
# iptables -A INPUT -p tcp --sport 139 -j ACCEPT
# service iptables stop


7.   start service

# sudo /sbin/chkconfig --level 35 smb on
# sudo /sbin/chkconfig --level 35 nmb on
# sudo /sbin/service smb start
# sudo /sbin/service nmb start


8.  On Win client

'run'  as  '\\192.168.1.1\public' 


sometimes need to ' service.mvc'   to stop 'NetLogon'  and 'workstation'  services and then start them ( if cannot start,  then need a reboot). 





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值