samba安装与配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了samba安装与配置相关的知识,希望对你有一定的参考价值。
sambayum install -y samba samba-client (安装Samba的客户端和服务)
mkdir /tmp/sambadir (创建Samba的共享目录)
vim /etc/samba/smb.conf (修改Samba配置文件)
workgroup = WORKGROUP
security = share
[workspace]
comment = share all
path = /tmp/sambadir
browseable = yes
public = yes
writeable = no
/etc/init.d/smb start (启动Samba服务)
smbclient //192.168.111.129/workspace (linux上连接Samba服务命令)
yum install -y cifs-utils (安装Samba挂载包)
mount -t cifs //192.168.111.129/workspace /opt/ (将Samba目录挂载到opt文件夹下)
创建有用户名及密码的Samba
vim /etc/samba/smb.conf (编辑配置文件)
security = user
[sharespace]
comment = share for users
path = /tmp/sambadir
public = yes
writeable = no
useradd smbuser1 (添加系统用户)
pdbedit -a smbuser1 (添加Samba用户)
/etc/init.d/smb restart (重启服务)
smbclient -Usmbuser1 //192.168.111.129/sharespace (登陆Samba)
mount -t cifs -o username=smbuser1,password=evildragonfly23 //192.168.111.129/sharespace (使用挂载的方法来挂载Samba目录到本机,并往相关文件夹内上传文件)
以上是关于samba安装与配置的主要内容,如果未能解决你的问题,请参考以下文章