---
title: "setup samba"
author: "stephen80"
date: "2009-10-09T17:30:22Z"
tags: ["OO", "Windows"]
slug: "setup-samba"
draft: false
lastmod: "2009-10-09T17:30:22Z"
id: 483697
url: "https://stephen80.iteye.com/blog/483697"
---

setup samba 。
1.确认samba 已经安装

rpm -qa|grep samba

samba-client-3.0.28-0.el4.9
samba-common-3.0.28-0.el4.9
samba-3.0.28-0.el4.9
system-config-samba-1.2.21-1.el4.1


2. vi /etc/samba/smb.conf
 添加一个 share 资源
     [aaaaa]
    comment = Public Stuff
    path = /home/jian
    public = yes
    writable = yes
    printable = oo
    browseable = yes
    create mode = 0664
    directory mode = 0777

2'. 测试samba 配置文件
    testparm


[global]
        workgroup = MYGROUP
        server string = Samba Server Version %v
        passdb backend = tdbsam
        max log size = 50
        idmap uid = 16777216-33554431
        idmap gid = 16777216-33554431
        hosts allow = 127., 192.168.12., 10.32.
        cups options = raw

[homes]
        comment = Home Directories
        read only = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        browseable = No

[apsara]
        comment = Public Stuff
        path = /home/jian
        read only = No
        create mask = 0664
        directory mask = 0777
        guest ok = Ye


3. 添加 samba 用户
   
   sudo smbpasswd -a jian

3'。检查用户
  pdbedit –L

4. 重启 samba
  service smb restart

Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]


5. windows 连接
  \\10.***\aaaaa
