default
menu home
Icon library Sign up Login favorite_border message help_outline
Online notes - online bookmark

家用服务器proxmox 7.3开启samba共享目录

styleTags: All CSS html javascript php/other IT
by: fanshome  2023-07-28 06:04(UTC)

大家知道,proxmox本身是debian系统,所以直接在debian系统安装samba服务即可开启共享,windows和linux、android、macOS、ios等均可访问。

以比较新的proxmox 7.3为例,首先切换更新源,从enterprise换到community,否则安装samba时会报错:

sudo nano /etc/apt/sources.list.d/pve-enterprise.list

注释掉enterprise部分,添加如下内容:

#deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise

deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription

惯例更新一下:

sudo apt-get update

sudo apt-get upgrade

安装samba:

sudo apt-get install samba -y

修改samba配置文件:

sudo nano /etc/samba/smb.conf

由于是家庭内网环境,所以配置共享为公开,不设用户名和密码,内容如下:

[share] #分享名,任意

path = /mnt/pve/share #分享目录路径,目录属性记得chmod 777

guest ok = yes

writable = yes

browseable = yes

write list = root

重启samba服务:

sudo systemctl enable smbd

sudo systemctl restart smbd

此时,在同一局域网内的windows机器可以通过proxmox的ip地址访问共享目录了,比如:\\192.168.1.88

visibility 839


- for heavy web user Online notes
adimg
logo Post a comment

captcha
Please check the captcha code
Cancel