Gentoo Linux下配置Samba服务器使Linux与Windows共享

Linux大全评论309 views阅读模式

主机:Gentoo 11.2 with linux kernel 3.0.6

1、安装Samba服务器

使用默认的USE标记直接执行命令

[cpp]

  1. emerge samba  

2、配置/etc/samba/smb.conf

首先拷贝/etc/samba/smb.conf.default然后根据自己的需要修改

修改后的smb.conf文件如下

[cpp]

  1. #======================= Global Settings =====================================   
  2. [global]  
  3.    guest account = nobody  
  4.    netbios name = yan-laptop  
  5.    workgroup = WORKGROUP  
  6.    server string = Samba Server  
  7.    security = share  
  8.    load printers = no  
  9.    log file = /var/log/samba/log.%m  
  10.    max log size = 50  
  11.    wins support = yes  
  12.    dns proxy = no   
  13.    create mode = 0777  
  14.    force create mode = 0777  
  15.    directory mode = 0777  
  16.    force directory mode = 0777  
  17. [Share]  
  18.     path = /home/samba  
  19.     browseable = yes  
  20.     guest ok = yes  
  21.     writeable = yes  

3、创建文件夹

[cpp]

  1. sudo mkdir /home/samba  
  2. chmod 777 /home/samba  

4、重启samba服务

[cpp]

  1. sudo /etc/init.d/samba restart  

Gentoo Linux下配置Samba服务器使Linux与Windows共享

5、在windows下可以读写共享的文件夹

win 7下的截图

企鹅博客
  • 本文由 发表于 2020年8月12日 10:27:07
  • 转载请务必保留本文链接:https://www.qieseo.com/146383.html

发表评论