码迷,mamicode.com
首页 > 其他好文 > 详细

安装配置samba服务

时间:2015-05-13 17:04:05      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:samba

1. install samba

yum install -y samba samba-client samba-common

run ntsysv to setting  smb auto startup

 

2. create user and group

groupadd -g 666 smbgroup

useradd smbuser -g smbgroup

passwd smbuser

pdbedit -a -u smbuser

#add user to smb group,set passwd for system user and smb user,the same user name

#the user and group can customized by yourself

 

3. create samba dir, set owner

 

mkdir /smbdir

chown smbuser:smbgroup /smbdir

#the dir of samba can customized by yourself

 

4. edit /etc/samba/smb.conf

##global settings

[global]

  dos charset = cp936 

  #windows

  unix charset = utf8

  #ref /etc/sysconfig/i18n

  display charset = utf8

  #same as unix charset

  workgroup = MYGROUP

  server string = Samba Server

  max log size = 1024 # KB

  log level = 1

  # log level max 10

  log file = /var/log/samba/log.%m 

  # samba log

  security = user

  passdb backend = tdbsam

  read only = Yes

 

  socket options = TCP_NODELAY  IPTOS_LOWDELAY

  read raw = yes

  write raw = yes

  max xmit = 65535

  local master = No

  kernel oplocks = No

 

  short preserve case = No

  oplocks = No

  level2 oplocks = No

  dos filetime resolution = Yes

  load printers = No

  printing = bsd

  printcap name = /dev/null

  disable spoolss =yes

  smb ports=139 

  # port

 

#### client access path   [\\serversIP\smbdir]

[smbdir]

  path = /smbdir

  # local path

  writable = no    

  browseable = yes

  # valid users = @smbgroup

  # access user is member of smbgroup

  read list = @smbgroup

  # access user is member of smbgroup

  # create mask = 0664

  # directory mask = 0775

 

5. service smb start

6. you can access \\serverIP\smbdir on windows, you will be noticed to input user and password,if it is right,you can access the dir and file in the dir.


安装配置samba服务

标签:samba

原文地址:http://8409200.blog.51cto.com/8399200/1651001

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!