标签:
-通过SMB协议进行文件共享
-通过SMB协议进行文件打印
-加入一个windows2000/2003/2008域环境
-通过windows域环境进行认证操作
yum install -y samba
\\192.168.1.100\testdir
smb://192.168.1.100/testdir
smbclient //192.168.1.100/testdir -U username
mount -t cifs //192.168.1.100/testdir /mnt -o username=lynn,password=‘abc123‘
/etc/samba/smb.conf
-User-Level # 默认安全模式,使用用户名、密码进行认证
-Share-Level # 只需要密码既可访问共享,但与部分windows客户端有兼容问题,不推荐使用
-[ global ] # 定义全局性配置
-[ homes ] # 定义对用户家目录的共享目录
-[ printers ] # 定义打印机共享配置
workgroup = Baidu # 当前工作组
server string = This is Baidu.com WorkGroup # 工作组简介信息
security = user
-user 默认(用户级)
-share 创建匿名共享时(共享级)
-domain (用户级)
-ads (用户级)
-server (用户级)
[ homes ]
comment = Home Directories
browseable = no
writable = yes
smbpasswd -a username
service smb start
smbclient //192.168.1.100/testdir -U username
[linuxcast-smb]
comment = This is LinuxCast.net demo samba share
path = /linuxcast-smb
valid users = linuxcast lynn
public = no
browsable = yes
writable = yes
printable = no
create mask = 0765
[ globle ]
security = share
[ linuxcast-pub ]
commnet = LinuxCast.net Public Readonly Share
path = /linuxcast-pub
read only = yes
guest only = yes
(使用share安全级别可能会与一些windows客户端不兼容)
testparm
smbclient -L 192.168.1.100
smbclient -L 192.168.1.100 -U username
标签:
原文地址:http://www.cnblogs.com/magina/p/4974220.html