Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2280775
  • 博文数量: 168
  • 博客积分: 6641
  • 博客等级: 准将
  • 技术积分: 1996
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-02 11:49
文章存档

2020年(4)

2019年(6)

2017年(1)

2016年(3)

2015年(3)

2014年(8)

2013年(2)

2012年(12)

2011年(19)

2010年(10)

2009年(3)

2008年(17)

2007年(80)

分类: LINUX

2007-06-02 14:03:41

Simple Samba Configure Steps.
kenthy#qingdaonews.com
2006.03.04 15:30
******************************************************
1> Anonymous Share Configure:
Server Configure:
 #ifconfig eth0 192.168.0.1/24
 #vi  /etc/samba/smb.conf
  netbios name = localhost
  workgroup = MediaServer
  server string = A Multy Media Server.
  security = share
  [movie]
   comment = New Play and Films
   path = /mnt/D/movie/
   public = yes
   browsable = no   //Hidden Share
   read only = yes
  [music]
   comment = A few songs
   path = /mnt/D/music/
   public = yes
   browsable = yes
   writeable = yes
 #service smb start
Clients Test:
 #mkdir /movie
 #mkdir /music
 #mount -t smbfs //192.168.0.1/movie  /movie
 #smbclient -L //192.168.0.1
 #smbclient //192.168.0.1/music
 #smbmount //192.168.0.1/music  /music
*************************************************************
2> User Certified Share Configure:
Server Configure:
 #ifconfig eth0 192.168.0.1/24
 #vi  /etc/samba/smb.conf
  netbios name = localhost
  workgroup = MediaServer
  server string = A Multy Media Server.
  security = users
  encrypt passwords = yes
  smb password file = /etc/samba/smbpasswd
  username map = /etc/samba/smbusers
  [movie]
   comment = New Play and Films
   path = /mnt/D/movie/
   public = yes
   browsable = yes
  ; read only = yes
   write list = tom
   valid users = tom jerry
  [music]
   comment = A few songs
   path = /mnt/D/music/
   public = yes
   browsable = yes
   writeable = yes
   valid users = jerry
 #useradd tom
 #useradd jerry
 #passwd tom
 #passwd jerry
 #cat /etc/passwd | tail -2 | mksmbpasswd.sh > /etc/samba/smbpasswd
 #smbpasswd -e tom
 #smbpasswd -e jerry
 #smbpasswd tom
 #smbpasswd jerry
 #vi /etc/samba/smbusers
  tom = public
  jerry = iloveyou
 #service smb restart
Clients Test:
 #mkdir /movie
 #mkdir /music
 #mount -t smbfs -o username=tom,password=123456 //192.168.0.1/movie /movie
 #smbclient -U iloveyou  //192.168.0.1/music  /music
 #smbtree  -S  //192.168.0.1
 #smbmount //192.168.0.1/music  /music

******************************************************************
阅读(1228) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~