注册 | 登录
欢迎注册会员

当前位置:首页 > 系统知识 > LINUX系统知识 > 正文

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

来源:程序人生 【 】 浏览:152 添加日期:2010-05-28 02:08:17 我要评论(0)

  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=cbaccess
  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
  
  
  
  
你浏览的文章是 - 《LINUX8.0下SAMBA的配置方法(一)》!
文章出处:https://www.procedurelife.com/content/bbdcl.html
0% (0)
0% (0)
评论0
游客
1 2