Samba: Server setup..
To make samba shard folder permission clear, there are 3 kind of permission need to be paid attention:
1. permission written in /etc/samba/smb.conf of certain folder
2. folder need to be shared by be labeled as samba_shared_t, check by ls -ldZ (Note: needed only while under SElinux environment)
3. folder's own permission according to the login-user. check it by ls -l, best to change the folder's owner by chown.
2 days passed, and I finally find it done with samba server.. with utube
to set up a samba server:
1. install samba;
2. add /etc/samba/smb.conf to the tail: (also if sure about safety of network environment, turn off smb encryption by adding 'smb encrypt = disabled' to [global] section of smb.conf)
- [wwt] # This is the shared folder name displayed in the guest
- path = /home/wwt # This is the dest folder in the host
- available = yes
- valid users = wwt root # space seperated [vital]
- writable = yes
- write list = wwt root # users guaranteed to write the folder
- browseable = yes
- public = yes
- workgroup = ADMIN # This line is for windows users to login, no use in linux
3. chcon -t samba_share_t /home/wwt -R (Changing SElinux security context)
to make all the folder/file be samba_shared_t.
4. add samba user wwt/root [ the mentioned user wwt in the smb.conf]:
- smbpasswd -a wwt
- smbpasswd -a root
In linux guest:
- smbclient -L 10.0.5.2
- smbclient \\\\10.0.5.2\\wwt password
In windows guest:
- win-r<CR>
- \\10.0.5.2
the test finished.
but if want to put into real work circumstances.. we need yum install cifs-utils:
- # first install the mount.cifs tool
- mount.cifs //10.0.5.2/wwt /mnt/wwt -o user=wwt,pass=123456
- # input the password
- cd /mnt/wwt
- # done..
------Another need----
We have 1 remote linux server, 1 local linux machine and 1 windows.
The need is to let the local linux sshfs mount the remote linux dir, and let windows access the files through samba service.
Several things to do:
1. the remote linux should have port 22 and sshd service enabled;
2. the local linux machine should sshfs mount the remote dir with option 'allow_other', by:
- # Uncomment #user_allow_other in fuse.conf
- vim /etc/fuse.conf
- # sshfs mount remote dir
- sshfs user@machine:/path/to/dir /local/path -C -o allow_other -o umask 0000 -o delay_connect -o reconnect -o IdentityFile=/home/.ssh/id_rsa
3. local linux machine should have samba installed (service port accessible), and configure the /etc/samba/smb.conf (there is no need to restart smbd.service), set user passwd by smbpasswd user...
4. windows side type \\localmachine
Samba: Server setup..的更多相关文章
- samba server install
要求: create vnc service for win7 access it via vnc viewer. 1TB disk for this Centos PC is used as Sam ...
- [转]Android与电脑局域网共享之:Samba Server
大家都有这样的经历,通过我的电脑或网上邻居访问另一台计算机上的共享资源,虽然电脑和手机之间可以有多种数据传输方式,但通过Windows SMB方式进行共享估计使用的人并不是太多,下面我就简单介绍一下, ...
- samba server 设置
samba server 设置yum install samba.x86_64systemctl start smb.servicesystemctl enable smb.servicesamb ...
- The Guideline of Setting Up Samba Server on linux(Ubuntu)
The Guideline of Setting Up Samba Server on linux(Ubuntu) From terminate command window, install the ...
- How to configure Samba Server share on Debian 9 Stretch Linux
Lubos Rendek Debian 13 June 2017 Contents 1. Objective 2. Operating System and Software Versions 3. ...
- How To Configure SAMBA Server And Transfer Files Between Linux & Windows
If you are reading this article it means you have a network at home or office with Windows and Linux ...
- Samba Server possible problem and solving
Configured samba server at RHEL7, problem encountered and solved. 1, yum install samba*, RHEL7 syste ...
- How to install Samba server on Ubuntu 12.04
Part 1: Configuring anonymous share with samba server To install the samba package,enter the followi ...
- CentOS 7 samba server 配置
samba是linux上的文件共享服务软件,相当与Windows上的共享文件夹,当然也是要在同一网段上的. 当前用的版本是4.4.4,好吧!下面介绍怎么去安装配置它,here we go! 1. 安装 ...
随机推荐
- linux内核skb操作
1,struct sk_buff数据结构 struct sk_buff{ //这两个结构必须放在最前面 struct sk_buff *next; struct sk_buff *prev; stru ...
- VMware vSphere 服务器虚拟化之二十 桌面虚拟化之准备虚拟桌面模版
VMware vSphere服务器虚拟化之二十 桌面虚拟化之准备虚拟桌面模版 在虚拟桌面的部署中,我们必须准备好作为桌面模板的父映像,通过父映像使用完整克隆或者View Composer的链接克隆,创 ...
- DPDK support for vhost-user
转载:http://blog.csdn.net/quqi99/article/details/47321023 X86体系早期没有在硬件设计上对虚拟化提供支持,因此虚拟化完全通过软件实现.一个典型的做 ...
- 设计模式 -- 桥接模式(Bridge Pattern)
桥接模式 Bridge Pattern 结构设计模式 定义: 分离抽象部分和实现部分,使他们独立运行. 避免使用继承导致系统类个数暴增,可以考虑桥接模式. 桥接模式将继承关系转化为关联关系,减少耦合, ...
- 第一百三十二节,JavaScript,封装库--下拉菜单
JavaScript,封装库--下拉菜单 封装库,增加了3个方法 shu_biao_yi_ru_yi_chu()方法,给元素设置鼠标移入移出事件,接收两个参数,参数是移入和移出时的执行函数(包含代码) ...
- 第一百三十节,JavaScript,封装库--连缀
JavaScript,封装库--连缀 学习要点: 1.连缀介绍 2.改写库对象 本章我们重点来介绍,在调用库的时候,我们需要能够在前台调用的时候可以同时设置多个操作,比如设置CSS,设置innerHT ...
- UIView类绘图出现错误提示
一:问题: Jan 16 15:49:53 CUBOT Band Ⅲ[2082] <Error>: CGContextSetLineWidth: invalid context 0x0. ...
- 使用java连接MySql,中文乱码解决的方法
排查MySql中文乱码的问题 1.在cmd中启动MySql. 打开命令提示符cmd,输入"mysql -uusername -ppassword",回车,就可以连接到数据库. 如输 ...
- Vim扩展YouCompleteMe插件
在Vim中安装YouCompleteMe插件 一.安装前的说明: 1.确保vim版本>=7.4,若MAC OS,建议直接安装MacVim(8.0版本). ps:如果不想使用MacVim的GUI, ...
- TypeScript 学习二 表达式和循环
表达式: 1,箭头表达式:将function用箭头代替,参数相应进行处理: 用来声明匿名函数,消除了传统匿名函数的this指针问题: 1) 例:简单的方法体为单行的方法,此时不需要大括号和return ...