共有フォルダーの設定 /etc/samba/smb.confii samba 2:4.1.13+dfsg-4ubuntu3 amd64 SMB/CIFS file, print, and login server for Unix
再起動#======================= Global Settings ======================= [global] security = user map to guest = Bad User #======================= Share Definitions ======================= [samba] path = /var/tmp/samba writeable = yes force create mode = 0666 force directory mode = 0777 guest ok = yes guest only = yes # [uchida] path = /tmp writeable = yes force create mode = 0666 force directory mode = 0777 guest ok = yes guest only = yes
# systemctl restart smbd # systemctl restart nmbd
$ smbd -V $ smbstatus
# pacman -S samba # cp /etc/samba/smb.conf.default /etc/samba/smb.conf # useradd -m smbuser # passwd smbuser # pdbedit -a -u smbuser/etc/samba/smb.confpdbedit - manage the SAM database (Database of Samba Users)# systemctl start smbd nmbd
$ smbclient -L localhost $ smbclient -L host_server
$ smbclient //host_server/folder_aa $ smbclient //host_server/folder_aa -U username $ smbclient //host_server/folder_aa -U username%password
# smbpasswd -a scottscript
# function samba_add { (echo "$pass"; echo "$pass") | smbpasswd -s -a $user } user=scott pass=tiger samba_add
Had to chmod 755 /var/cache/samba/msg, enable and start nmbd