标签:samba ;linux
安装:
yum install -y samba samba-client
2.编辑配置文件
vim /etc/samba/smb.conf [global] workgroup = JIUGE server string = Samba Server Version %v log file = /var/log/samba/log.%m max log size = 50 security = user passdb backend = tdbsam load printers = yes cups options = raw [ge] comment = share all path = /test/tt browseable = yes public = yes writable = yes
检查配置的smb.conf是否正确 testparm
3.增加用户
useradd -M -s /sbin/nologin test
pdbedit -a test
依提示设置访问samba的密码
pdbedit -L #列出samba用户
4.启动:/etc/init.d/smb start
Linux访问samba共享文件
安装客户端软件 yum install -y samba-client cifs-utils
命令格式:smbclient //IP/共享名 -U 用户名
如:smbclient //127.0.0.1/share 如果是匿名访问可以省略掉-U
mount挂载samba目录:
mount -t cifs //192.168.0.22/ge /mnt -o username=test,password=123456
本文出自 “Study@Linux” 博客,请务必保留此出处http://2016xyz.blog.51cto.com/9695924/1768005
标签:samba ;linux
原文地址:http://2016xyz.blog.51cto.com/9695924/1768005