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. 安装 ...
随机推荐
- 学习OpenCV:滤镜系列(15)——羽化(模糊边缘)
============================================== 版权所有:小熊不去实验室CSDN博客 ================================== ...
- 【Android LibGDX游戏引擎开发教程】第07期:中文字体的显示和绘制(上)
在字体的显示和绘制中,Libgdx的作者(Mario Zechner,美国人)给我们提供了一个非常好用的工具 ——Hiero,那么下面就来看看它具体的使用方法. 一.Hiero工具的使用 1.Hier ...
- 【C语言】一些重要的知识点
1.#include <stdio.h> #include 是C语言的预处理指令之一,所谓预处理,就是在编译之前做的处理,预处理指令一般以 # 开头 #include 指令后面会跟着一个文 ...
- LaTeX入门教程
LaTeX(LATEX,音译"拉泰赫")是一种基于ΤΕΧ的排版系统,由美国计算机学家莱斯利·兰伯特(Leslie Lamport)在20世纪80年代初期开发,利用这种格式,即使使用 ...
- linux服务器开发二(系统编程)--进程相关
进程相关的概念 程序与进程 程序,是指编译好的二进制文件,在磁盘上,不占用系统资源(CPU.内存.打开的文件.设备.锁等等). 进程,是一个抽象的概念,与操作系统原理联系紧密.进程是活跃的程序,占用系 ...
- CSS之纯CSS画的基本图形(矩形、圆形、三角形、多边形、爱心、八卦等)
图形包括基本的矩形.圆形.椭圆.三角形.多边形,也包括稍微复杂一点的爱心.钻石.阴阳八卦等.当然有一些需要用到CSS3的属性,所以在你打开这篇文章的时候,我希望你用的是firefox或者chrome, ...
- android浏览器 源码共享
浏览器源码共享 [天天浏览器]拥有极为精简的内核,手机App大小在2MB以内,是市场上极省用户手机内存,极少占用手机资源,速度极快的浏览器,本身功能完整强大,是极速上网必备的利器. 源代码下载地址:h ...
- linux 安装 Chrome
一.添加PPA 从Google Linux Repository(http://www.google.com/linuxrepositories/)下载安装Key,或把下面的代码复制进终端,回车,需要 ...
- [UWP小白日记-8]一些零碎的东西
设置启动窗口大小 直接上代码了没什么好解释的了,既然能设置最小,那铁定就能设置最大 public MainPage() { //设定窗口启动显示大小 ApplicationView.Preferred ...
- shell 读取文件
#!/bin/bash content=`cat test.txt` echo "begin" for i in $content do echo $i done 读取前10行 t ...