ArchLinux Plasma 6 开启Samba服务(文件共享)

在 Plasma 6 中的 Dolphin 使用文件共享

在 Plasma 6 中的 Dolphin 使用文件共享

安装相关的插件

1
pacman -Sy kdenetwork-filesharing

编辑 Samba 配置文件

文件路径 /etc/samba/smb.conf

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[global]  
 usershare path = /var/lib/samba/usershares  
 usershare max shares = 100  
 # usershare allow guests = yes  
 usershare owner only = no  
 workgroup = WORKGROUP  
 security = user  
 passdb backend = smbpasswd  
 name resolve order = lmhosts bcast host wins  
 unix charset = UTF-8  
 load printers = no  
 printing = bsd  
 printcap name = /dev/null  
 disable spoolss = yes  
 show add printer wizard = no  
 server string = Samba Server  
 log file = /var/log/samba/log.%m  
 # Put a capping on the size of the log files (in Kb).  
 max log size = 50  
 dns proxy = no  
#============================ Share Definitions ==============================  
#    
#[homes]    
# 启用这个块会默认共享对应用户的home目录
#  comment = Home Directories  
#  browsable = no  
#  writable = yes

配置用户组和文件夹

1
2
3
4
5
mkdir /var/lib/samba/usershares
groupadd fileshare
usermod -a -G fileshare $(whoami)
chown root:fileshare /var/lib/samba/usershares
chmod 1771 /var/lib/samba/usershares

启动 Samba 服务

1
2
systemctl restart smb nmb
systemctl enable smb nmb

将Linux用户添加到Samba数据库

这一步可以为Samba用户设置独立的密码

1
smbpasswd -a $(whoami)

重启

1
reboot
Licensed under CC BY-NC-SA 4.0
昵称
邮箱
网址
0/500
  • OωO
  • |´・ω・)ノ
  • ヾ(≧∇≦*)ゝ
  • (☆ω☆)
  • (╯‵□′)╯︵┴─┴
  •  ̄﹃ ̄
  • (/ω\)
  • ∠( ᐛ 」∠)_
  • (๑•̀ㅁ•́ฅ)
  • →_→
  • ୧(๑•̀⌄•́๑)૭
  • ٩(ˊᗜˋ*)و
  • (ノ°ο°)ノ
  • (´இ皿இ`)
  • ⌇●﹏●⌇
  • (ฅ´ω`ฅ)
  • (╯°A°)╯︵○○○
  • φ( ̄∇ ̄o)
  • ヾ(´・ ・`。)ノ"
  • ( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
  • (ó﹏ò。)
  • Σ(っ °Д °;)っ
  • ( ,,´・ω・)ノ"(´っω・`。)
  • ╮(╯▽╰)╭
  • o(*////▽////*)q
  • >﹏<
  • ( ๑´•ω•) "(ㆆᴗㆆ)
  • 😂
  • 😀
  • 😅
  • 😊
  • 🙂
  • 🙃
  • 😌
  • 😍
  • 😘
  • 😜
  • 😝
  • 😏
  • 😒
  • 🙄
  • 😳
  • 😡
  • 😔
  • 😫
  • 😱
  • 😭
  • 💩
  • 👻
  • 🙌
  • 🖕
  • 👍
  • 👫
  • 👬
  • 👭
  • 🌚
  • 🌝
  • 🙈
  • 💊
  • 😶
  • 🙏
  • 🍦
  • 🍉
  • 😣
  • 颜文字
  • Emoji
  • Bilibili
0 条评论
没有评论