ᕕ( ᐛ )ᕗ Jimyag's Blog

samba server 运行以及挂载

sudo apt update
sudo apt install samba

mkdir -p /mnt/pool # 创建共享目录

sudo vim /etc/samba/smb.conf

[jimyag]
    comment = jimyag-zfs
    path = /mnt/pool
    read only = no
    browsable = yes
    create mask = 0644
    directory mask = 0755
    guest ok = yes


sudo systemctl restart smbd

# jimyag 一定要存在
sudo smbpasswd -a jimyag 
sudo apt-get install cifs-utils

sudo mount -t cifs -o rw,vers=3.1.1,user=jimyag,password=password,dir_mode=0755,file_mode=0644,uid=1000,gid=1000 //192.168.2.99/jimyag /mnt/pool

# fstab 
//192.168.2.99/jimyag    /mnt/pool    cifs    rw,vers=3.1.1,user=jimyag,password=password,dir_mode=0755,file_mode=0644,uid=1000,gid=1000    0    0

#samba