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. 安装 ...
随机推荐
- 不想再做"鸟蛋"
至今为止学习C++两个学期了,有过迷茫,有过自信,有过崩溃,有过希望,有过伤心,有过高兴.这一路走来,C++虐我千百遍,我待C++如"初恋". ...
- CoreCRM 开发实录 —— 单元测试、测试驱动开发和在线服务
测试不是问题,问题是怎么测试. ## 单元测试 我认为单元测试已经是无可争议的最佳开发实践之一.但是很多人并不同意这个观点.他们的说法无非是:写测试需要花很多时间,需求又经常变动,一但变动,一大片测试 ...
- web页面在微信里打开,字体颜色不正常显示
问题:写的web项目在微信里的webview里打开(iphone手机),会出现颜色的不识别.写的是白色,数字的部分会过了3-5秒后,变成黑色! 原因:在iphone手机里,数字的部分(具体的长度没有测 ...
- IQueryable 和 IEnumerable
IQueryable 和 IEnumerable 其实,对于上面的即有过虑又有排序的条件查询Linq语句,EF是读取数据库中整个Books表中的数据到内存,还是根据Linq查询语句智能的生成SQL再执 ...
- OllyDBG V1.10聆风听雨汉化版
软件名称:OllyDBG V1.10聆风听雨汉化版 软件语言: 简体中文 授权方式: 免费软件 运行环境: Win 32位/64位 软件大小: 3.84MB 图片预览: 软件简介: Ollydbg2. ...
- mysql的数据类型与列属性
- 《C++反汇编与逆向分析技术揭秘》——流程控制语句的识别
if...else...语句 示例: if构成多分支语句 switch 有序线性的switch: 3E82D8位置存放了一个表,标明了要跳转到的地址: 这里的每四字节都标明的是每个case块的首地址: ...
- 第一百一十七节,JavaScript,DOM元素尺寸和位置
学习要点: 1.获取元素CSS大小 2.获取元素实际大小 3.获取元素周边大小 本章,我们主要讨论一下页面中的某一个元素它的各种大小和各种位置的计算方式,以便更好的理解. 一.获取元素CSS大小 1. ...
- Python学习笔记——基础篇【第七周】———FTP作业(面向对象编程进阶 & Socket编程基础)
FTP作业 本节内容: 面向对象高级语法部分 Socket开发基础 作业:开发一个支持多用户在线的FTP程序 面向对象高级语法部分 参考:http://www.cnblogs.com/wupeiqi/ ...
- 梅特卡夫法则(Metcalfe's law)
如果一个网络中有n个人,那么网络对于每个人的价值与网络中其他人的数量成正比,于是网络对于所有人的总价值与n*(n-1)成正比.