ubuntu18.04搭建Samba服务器

Samba主要用于局域网环境下, linux系统和windows系统共享文件,其搭建步骤如下:

  1.  sudo su
  2.    创建共享目录  mkdir /home/semie/share
  3.    更改该目录的权限  chmod 777 /home/semie/share
  4.    install Samba相关  sudo apt-get install samba samba-common
  5.    add a user  and set a password          sudo smbpasswd -a semie    semie为本人用户名    
  6.    edit the samba conf              sudo nano /etc/samba/smb.conf    在配置文件最后添加如下
    [share]
    comment = share folder
    browseable = yes
    path = /home/semie/share
    create mask = 0700
    directory mask = 0700
    valid users = semie
    force user = semie
    force group = semie
    public = yes
    available = yes
    writable = yes
  7.   restart service        sudo service smbd restart 
  8.   windows下访问  \\192.168.0.105

        

你可能感兴趣的:(ubuntu18.04搭建Samba服务器)