samba安装与配置

简介:

samba

yum 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目录到本机,并往相关文件夹内上传文件)




本文转自 粗粮面包 51CTO博客,原文链接:http://blog.51cto.com/culiangmianbao/2052348,如需转载请自行联系原作者
相关文章
|
网络协议 Unix Linux
Samba服务的安装与配置
Samba服务的安装与配置
2483 0
|
运维 网络安全 数据安全/隐私保护
部署Samba
部署Samba
|
Ubuntu 数据安全/隐私保护 Windows
|
安全 开发工具
SAMBA 服务器安装与配置
#!/bin/bash #SAMBA  window co-connect linux #SAMBA  NETBIOS #SAMBA nmbd:137 138  smbd:139 445 #samba samba-client samba-common /etc/samba/smb.
915 0
|
测试技术 Linux 数据库
|
安全 数据库 数据安全/隐私保护
|
Linux 数据安全/隐私保护