debian8.8建立samba服务器与win7共享文件
来源:互联网 发布:淘宝穿过的鞋子退货 编辑:程序博客网 时间:2024/06/04 20:03
在Debian安装好以下软件:
安装samba: sudo apt-get install samba
安装smbclient:sudo apt-get install smbclient
2、修改配置文件
nano /etc/samba/smb.conf 编辑smb.conf 文件
增加
[debian]
path = /opt/share
valid users = infly
public = no
writable = yes
read only = no
重启samba /etc/init.d/samba restart
写配置文件时候可以用testparm
命令检查配置文件语法是否正确
注:infly已经是我debian系统中的一个用户名。若smbpasswd -a test,增加samba用户不是系统中的用户名,会出现提示Failed to add entry for user
[root@debian~]# smbpasswd -a test
New SMB password:
Retype new SMB password:
Failed to add entry for user test.
解决办法:
这是因为没有加相应的系统账号,所以会提示Failed to add entry for user的错误,只需增加相应的系统账号test就可以了:
[root@debian~]# groupadd test -g 6000
[root@debian~]# useradd test -u 6000 -g 6000 -s /sbin/nologin -d /dev/null
这时就可以用smbpasswd -a test增加test这个samba账号了!为了增加系统的安全性,所以加的系统账号不要给shell它,也不给它指定目录,到时在/home目录给test账号建个文件夹,该文件夹只有test有读写权限即可!
如:
[root@debian~]# mkdir /home/test
[root@debian~]# chown -R test:test /home/test
若不想让另人访问,只让test用户可以访问,只需执行命令:
[root@debian~]# chmod u+rwx,g+rwx,o-rwx /home/test
这时可以用smbpasswd命令增加samba账号test了
[root@debian~]# smbpasswd -a test
New SMB password:
Retype new SMB password:
Added user test.
- debian8.8建立samba服务器与win7共享文件
- win7下建立与linux文件共享——samba
- Ubuntu samba服务器建立并与windows文件共享
- VMware中Ubuntu10.10下建立samba服务器与Windows共享文件
- debian8.8访问win7共享文件夹
- Ubuntu14.04中安装samba服务器实现与Win7的文件共享
- Ubuntu下搭建samba服务器和win7共享文件
- 虚拟机ubuntu14.04系统使用samba与win7文件共享
- Linux文件共享------Samba服务器
- 配置Samba文件共享服务器
- CentOS 配置 samba服务器建立共享文件夹
- centOS7 建立samba服务器,实现目录共享
- win7访问linux samba服务器共享解决方法
- Samba服务器实现Linux与Windows的文件共享
- VMware 与Ubuntu通过samba服务器共享文件
- VMware 与Ubuntu通过samba服务器共享文件
- CentOS7搭建SAMBA服务器实现与WIN10匿名共享文件
- VMware 与Ubuntu通过samba服务器共享文件
- Windows下安装python版的XGBoost教程(基于Anaconda)
- Greenplum pg_hba.conf entry for host "192.168.2.111", user "gpadmin", database "template1", SSL off
- codeforces #378C(733.C) Epidemic in Monstropolis
- Kafka 踩坑记录
- VS2013中如何解决error C4996: 'fopen'问
- debian8.8建立samba服务器与win7共享文件
- Python笔记(3)----日期和时间、函数、文件I/O、File方法
- [SDOI2009]SuperGCD(高精度压位)
- 递归调用简单解析
- C语言 网络编程:linux下socket编程详解(续)
- C++抽象编程——储存模式(1)——内存结构
- Notepad++ 配置 MinGW(gcc)编译环境配置 以及问题解决
- Android Studio 快速打开GitHub下载的项目
- spring-boot with docker