ubuntuでファイルサーバとしてsamba設定。
sudo apt update
sudo apt upgrade
sudo apt install -y samba
cd /etc/samba/
sudo cp -a smb.conf smb.conf.default
vi smb.conf
下記追記
[htdocs]
comment = httpd
path = /var/www
writable = yes
hosts allow = 217.178.34.168/32
hosts deny = 0.0.0.0/0
Sambaのユーザーに追加
sudo pdbedit -a username
retype new password:
Unix username: username
NT username:
省略.............
samba 再起動
sudo systemctl restart smbd
sudo systemctl restart nmbd
WindowsPCにてファイルサーバとしてアクセス。



