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】Shell学习笔记之四——文件和目录管理(硬连接和软连接)
在这节将要学习linux的连接档,在之前用"ls -l" 查看文件属性的命令时, 其中第二个属性是连接数.那么这个连接数是干什么的?这就要理解inode. 先说一下文件是怎么存储的 ...
- continue与break
1.continue语句,1至20内奇数累加和 #include<iostream> using namespace std; void main(){ int i=0; int sum= ...
- linux内核——进程,轻量级进程,线程,线程组
1.进程.轻量级进程.线程.线程组之间的关系 2.及它们的标识相关说明 一.进程.轻量级进程.线程.线程组之间的关系 借助上图说明: 进程P0有四条执行流,即线程, 主线程t0是它的第一个线程,且与进 ...
- OOAD(面向对象分析和设计)GRASP之创建者模式(Creator)又称生成器模式学习笔记
说OOAD是一门玄学,一点都不为过.又或许是因为我之前一直没有很好的建立面向对象的思想,更有可能是因为练得不够多...总之,一直没能很好理解,哪怕把一本叫做<UML和模式应用>的书翻来覆去 ...
- git shell 常用命令
git branch 查看本地所有分支 git status 查看当前状态 git commit 提交 git branch -a 查看所有的分支 git branch -r 查看远程所有分支 git ...
- SVN使用教程之-分支/标记 合并 subeclipse
首先说下为什么我们需要用到分支-合并.比如项目demo下有两个小组,svn下有一个trunk版.由于客户需求突然变化,导致项目需要做较大改动,此时项目组决定由小组1继续完成原来正进行到一半的工作[某个 ...
- 使用 Rx 中预定义的 Subject
看到一幅有趣的关于 Rx 学习的图,想知道学习 Rx 的学习曲线?不,是峭壁! 我们可以直接通过 Rx 的 Observer 来创建 Observable 对象. 但是,使用这种方式往往比较复杂,在特 ...
- jQuery+HTML5声音提示
WEB应用中,有时需要播放特定的声音,比如有新消息或者在线聊天消息声音提示,以前我们通过flash实现,今天我们将使用jQuery和HTML5结合示例来实现如何把声音提示带入WEB应用中. 在本例中, ...
- quagga源码分析--内核通信netlink
Linux操作系统中当CPU处于内核状态时,可以分为有用户上下文的状态和执行硬件.软件中断两种.其中当处于有用户上下文时,由于内核态和用户态的内 存映射机制不同,不可直接将本地变量传给用户态的内存区: ...
- 常见sql语句
1.去最新插入表数据与当前时间差额 select *,(TIME_TO_SEC(SYSDATE())-TIME_TO_SEC(t.cre_time)) from t_sms_flow t where ...