Home  >  Article  >  php教程  >  Linux Samba服务器搭建

Linux Samba服务器搭建

WBOY
WBOYOriginal
2016-07-06 14:25:231409browse

Linux Samba服务器搭建

1、Samba:英文名为 SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,
它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。
2、安装samba服务器:sudo apt-get install samba;
3、配置samba服务器:sudo vim /etc/samba/smb.conf;
仿照[printers],在它后面添加下图所示红色框中的内容,配置用户名为smb,
共享文件夹为home目录

4、添加访问用户(即添加从windows访问ubuntu中home目录需要登录的用户名和密码)
(1)添加smb系统用户:
命令:sudo useradd smb
(2)设置smb用户登录密码:
命令:sudo smbpasswd –a smb
5、samba 服务的:启动,停止和重新启动
终端下输入命令,分别是:
启动samba服务: sudo /etc/init.d/smbd start
停止samba服务: sudo /etc/init.d/ smbd stop
重启samba服务: sudo /etc/init.d/ smbd restart
6、Samba 配置好后重启samba服务即可:sudo /etc/init.d/ smbd restart;
7、从win7下访问ubuntu共享目录home
在开始搜索里面输入ubuntu的IP地址
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn