Samba服务器架设指南

Configure Samba Server

安装samba

# apt-get install samba samba -common

打开配置档

# vim /etc/samba/smb.conf

 

 

[global]

# 这是配置文件中关于全局参数的设置部分。

        netbios name = data

# 主机名称,出现在“网络邻居”中的主机名。

        server string = software

# 服务器主机的说明信息,这个不重要。

        workgroup = Lab

# 工作群组,这是服务器所要加入的工作组的名称。

        security = user

        passdb backend = ldapsam:ldap://192.168.1.6/

# 帐户认证数据库的地址

        obey pam restrictions = yes

 

        ldap admin dn = "cn=admin,dc=gmshi,dc=org"

        ldap suffix =  dc=gmshi,dc=org

        ldap group suffix = ou=groups

        ldap user suffix = ou=people

        ldap machine suffix = ou=machines

        ldap passwd sync = Yes

         ldap ssl = off

# 关于 LDAP 的设置

        domain logons = no

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

# 日志文件存放地址,当 samba 不能正常工作时分析 log 是最有效率的方法。

        max log size = 1000

# 日志文件的最大容量(以 KB 为单位)

        dns proxy = NO

        panic action = /usr/share/samba/panic-action %d

 

        include = /etc/samba/dhcp.conf

 

        printcap name = cups

               show add printer wizard = NO       

               load printers = yes

        printing = cups

        use client driver = no

 

[printers]

        comment = Printer

        browseable = yes

        path= /var/spool/samba

        browseable = yes

        public = no

        printable = yes

        writable = no

        valid users = @general

        create mask = 0700

 

[print$]

        comment = Printer Drivers

        path = /var/lib/samba/printers

        browseable = yes

        read only = yes

        valid users = @general

 

 

##sharing documents

[homes]

        comment = Home Directories

        preexec = /home/fpzeng/buildhome %U

 

[software]

        comment = General and Useful Software

        path = /srv/software

        browseable = yes

        read only = yes

        writable = yes

         public = yes

 

  [research]

        comment = Research Resources

        path = /srv/research

        browseable = yes

        read only = yes

        writable = no

        public = yes

 

[wmsn]

        comment = WMSN Group

        path = /srv/wmsn

         browseable = yes

        read only = no

        writable = yes

        public = no

        valid users = @wmsn

当我们设定完成了 smb.conf 这个主要设定档之后,而想要查看一下 SAMBA 的所有设定参数与 smb.conf 的设定项目是否正确时,就需要使用这个 testparm 来查看 ( 其实就是 test parameters 的简写! ) !所以说,每次在修改完 smb.conf 之后,请务必要使用 testparm 查看看是否有设定错误喔!

 

 

你可能感兴趣的:(服务器,Parameters,Path,resources,printing,wizard)