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) |