1.samba 配置文件
 [global]服务器
  workgroup = ?(域名或组名)
  server string = 解释信息
  netbios name = redhat (samba主机名)
  security = share(不需要用户验证)/user(默认安全级别)/server(验证数据库不在本地)
  ;password server = <>(前面设置了server的时候用)
  log file /var/log/samba/log.%m(变量%m意思是客户机的主机名)(man smb.conf)
  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  include = /etc/samba/smb.conf.%m(不同用户访问的东西不同)
  interfaces = 12.168.0.0/24(启动smb服务的网段)
  ;name resolve order =
  ;wins support = yes(是否自己要做WINS服务器)
  ;wins server = w.x.y.z(指定wins服务器地址)  
 [home]用户目录
 [...]用户自定义目录
2. :!service smb restart
3.nmblookup server
4.访问控制
  一、全局访问控制
 [global]
    host deny = all except ...
    host allow = 10.0.0.(主机名IP通配符)
  二、局部访问控制(man 5 hosts_access)
 [sales]
    path = /home/sales
    comment = sales
    public = no
    valid users = @sales
    write list = @sales
    create mask = 0770
    directory mask = 0770
 [doc]
(允许优先)
5.useradd -g sales -s /bin/false tom
6.for user in(指定一个列表) red blue
  do
  useradd -g tech -s /bin/false $user
  smbpasswd -a $user
  done
  批量添加用户