LINUX8.0下SAMBA的配置方法(一)

发表于:2007-07-04来源:作者:点击数: 标签:
Linux8.0下SAMBA的安装及配置(-) 从光盘中找到与SAMBA相关的文件,执行 rpm –ivh samba-common-2.2.5-10 rpm –ivh samba-2.2.5-10 rpm –ivh samba-client-2.2.5-10 然后进入/etc/samba执行vi smb.conf 命令,文件编辑如下: [global] workgroup=cbacce

  Linux8.0下SAMBA的安装及配置(-)
  从光盘中找到与SAMBA相关的文件,执行
  rpm –ivh samba-common-2.2.5-10
  rpm –ivh samba-2.2.5-10
  rpm –ivh samba-client-2.2.5-10
  然后进入/etc/samba执行vi smb.conf 命令,文件编辑如下:
  [global]
  workgroup=cbaclearcase/" target="_blank" >ccess
  netbios name=Hello
  server string=Hello’s Linux Server
  hosts allow=192.168.7. 192.168.1. 192.168.2. 127.
  printcap name=/etc/printcap
  load printers=yes
  printing=bsd
  guest account=dragon
  log file=/var/log/samba/%m.log
  max log size=50
  security=user
  encrypt passwords=yes
  smb passwd file=/etc/samba/smbpasswd
  unix password sync=yes
  passwd program=/usr/bin/passwd %u
  passwd chat=*New*password*%n\n * Retype*new*password*%n\n
  passwd:all*authentication*tokens*updated*successfully*
  pam password change=yes
  obey pam restrictions=yes
  socket option=TCP_NODELAY SO_RECVBUF=8192 SO_SNDBUF=8192
  interfaces=192.168.7.148/24
  dns proxy=no
  [homes]
  comment=Hello’s Home Directories
  browseable=no
  writable=yes
  valid users=%s
  [printers]
  comment=All Printers
  path=/var/spool/samba
  browseable=no
  guest ok=yes
  writable=no
  printable=yes
  [public]
  comment=Public Stuff
  path=/
  browseable=yes
  guest ok=yes
  public=yes
  writable=yes
  printable=no
  write list=@staff
  [dragon]
  comment=Fred’s Printer
  valid users=dragon
  path=/home/dragon
  printer=dragon_printer
  public=no
  writable=no
  printable=yes
  配置完成后执行 chmod a+w / 使整个机器共享
  cd /etc/rc.d/init.d
  ./smb restart
  创建一个Linux的用户,
  useradd dragon
  passwd dragon
  smbpasswd –a dragon
  成批添加
  cat /etc/passwd |mksmbpasswd.sh >/etc/samba/smbpasswd
  /usr/sbin/smbd –D
  /usr/sbin/nmbd –D
  
  
  
  

原文转自:http://www.ltesting.net