当前位置:网站首页>Proxmox VE 7.2 Install SMB 服务
Proxmox VE 7.2 Install SMB 服务
2022-07-15 08:35:00 【CIAS】
![]()
安装SMB服务
apt install samba -y配置SMB
cat >>/etc/samba/smb.conf <<EOF
[iso]
comment = this is a iso
path = /var/lib/vz/template
guest ok = no
browseable = no
write list = root
EOF添加用户
smbpasswd -a root重启smb服务
systemctl restart smbd && systemctl enable --now smbd验证SMB可用性





新建SMB多账号登录
#新增系统用户
useradd smb01
useradd smb02
useradd smb03
#新增smb用户
smbpasswd -a smb01
smbpasswd -a smb02
smbpasswd -a smb03创建smb多用户共享文件夹
mkdir -p /var/smb/{/smb01,/smb02,/smb03}
# 修改文件夹权限
chown -R smb01 /var/smb/smb01
chown -R smb02 /var/smb/smb02
chown -R smb03 /var/smb/smb03添加多用户配置文件
cat >> /etc/samba/smb.conf <<EOF
[smb01]
comment = smb01 files
path = /var/smb/smb01
guest ok = no
browseable = no
writable = yes
write list = smb01
[smb02]
comment = smb02 files
path = /var/smb/smb02
guest ok = no
browseable = no
writable = yes
write list = smb02
[smb03]
comment = smb03 files
path = /var/smb/smb03
guest ok = no
browseable = no
writable = yes
write list = smb03
EOF重启SMB服务
systemctl restart smbd一键开启SMB共享服务脚本
- 配置了local和root目录的共享。默认共享账号为root,密码为[email protected]
#!/bin/bash
#CIACM.CSDN.net
apt update && apt install samba -y
cat >>/etc/samba/smb.conf <<EOF
[local]
comment = this is local dir
path = /var/lib/vz/
guest ok = yes
browseable = yes
write list = root
[root]
comment = this is root dir
path = /root/
guest ok = no
browseable = yes
write list = root
EOF
(echo [email protected];echo [email protected]) |smbpasswd -a -s root
systemctl restart smbd边栏推荐
- [debug] vs exe runs "the application cannot start normally (0xc000007b)"
- Arkui FAQ summary [series 3]
- 【pypdf2】合并PDF、旋转、缩放、裁剪、加密解密、添加水印
- About NLP self supervised learning, I was asked to collapse during the interview!
- Install Emmet plug-in for notepad++
- What is Oracle's user and authority system?
- source insight4 配色仿vscode
- Apache Flink 在移动云实时计算的实践
- Land surface eco hydrological simulation and multi-source remote sensing data assimilation and Noah MP model
- Stm32f407 external SRAM
猜你喜欢

Communication mode - FSMC

Hisilicon universal platform construction: online debugging 3vscode plug-in

How to simplify if else through policy mode?

MySQL transaction: a master

复杂网络建模(六)

The U.S. government will invest $56million in solar product manufacturing projects

指针的理解与操作

会话跟踪技术Cookie和Session

C language basics: binary search

【无标题】
随机推荐
MySQL - MySQL download address
陆面生态水文模拟与多源遥感数据同化与Noah-MP模型
ML:机器学习可解释性之特征置换重要性之机器学习模型中哪些特征很重要?
【无标题】
Hisilicon universal platform construction: online debugging 3vscode plug-in
Search - binary sort tree (I)
二十八、持久数据的可靠性(RAID(Redundant Array of Inexpensive Disks),奔溃一致性;FSCK和日志)
JMeter常见错误怎样解决
微信小程序——在小程序自定义组件中获取元素定位及宽度
list的使用方式
Wireless sensor network -- hardware design of wireless sensor network
source insight4 配色仿vscode
Stm32f407 external SRAM
221. 最大正方形
Wechat applet - get element positioning and width in applet custom components
Network security tools 2 -- Information Collection 2
c语言基础篇:猜数字小游戏
Install Emmet plug-in for notepad++
通信方式——8080并口
Postman接口测试工具