1,  sudo apt-get install samba

  sudo apt-get install smbclient

2,  vi /etc/samba/smb.conf 

  在最后加字段(为可读可写权限)

  [share]
    comment = share folder
    browseable = yes
    path = /home/cat
    create mask = 0777
    create mask = 0777
    valid users = cat
    force user = cat
    force group = cat
    writable = yes
    public = yes
    available = yes

3、增加samba用户, 一定要操作这一步,否则windows上访问时输入用户名和密码会不对,访问不了。

@ubuntu:~$ sudo smbpasswd -a cat
New SMB password:
Retype new SMB password:

 

4, /etc/init.d/samba restart

5,在电脑端添加网络驱动器,输入linux机器ip等,即可使用

相关文章:

  • 2021-09-22
  • 2022-01-26
  • 2021-11-16
  • 2022-02-07
  • 2022-12-23
  • 2021-06-27
  • 2021-07-21
  • 2021-05-15
猜你喜欢
  • 2021-04-07
  • 2021-12-23
  • 2021-05-23
  • 2021-04-14
  • 2021-11-23
相关资源
相似解决方案