Cài đặt Samba

Cài đặt

apt update
apt install samba smbclient cifs-utils  

Thư mục chia sẻ & user

   61  adduser --system skywirex
   62  chown -R skywirex /mnt/hdd4tb

Cấu hình

    14  mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
   15  vim /etc/samba/smb.conf
   16  nano /etc/samba/smb.conf
   17  chmod -R 0755 /mnt/hdd4tb
   18  chown -R nobody:nobody /mnt/hdd4tb
   19  groupadd smbshare
   20  chgrp -R smbshare /mnt/hdd4tb
   21  chmod 2775 /mnt/hdd4tb
   22  useradd -M -s /sbin/nologin skywirex
   23  usermod -aG smbshare skywirex
   24  id skywirex
   25  systemctl restart nmbd
   26  nano /etc/samba/smb.conf
   27  systemctl restart nmbd
   28  chmod 777 /mnt/hdd4tb
   29  systemctl restart nmbd
   30  adduser --system skywirex
   31  nano /etc/samba/smb.conf
   32  mv /etc/samba/smb.conf /usr/local/samba/lib
   33  mkdir -p /usr/local/samba/lib
   34  mv /etc/samba/smb.conf /usr/local/samba/lib
   35  nano /usr/local/samba/lib/smb.conf
   36  systemctl restart nmbd
   37  journalctl -xe
   38  mv /usr/local/samba/lib/smb.conf /etc/samba
   39  systemctl restart nmbd
   40  smbpasswd -a skywirex
   41  smbpasswd -e skywirex
   42  systemctl restart nmbd
   43  nano /etc/samba/smb.conf
   44  systemctl restart nmbd
   45  nano /etc/samba/smb.conf
   46  systemctl restart nmbd
   47  nano /etc/samba/smb.conf
   48  sudo chown -R root:root /mnt/hdd4tb
   49  sudo chmod -R 0660 /mnt/hdd4tb
   50  sudo chmod -R ug+X /mnt/hdd4tb
   51  sudo chown -R skywirex:skywirex /mnt/hdd4tb
   52  sudo chmod -R 0660 /mnt/hdd4tb
   53  sudo chmod -R ug+X /mnt/hdd4tb
   54  systemctl restart nmbd
   55  nano /etc/samba/smb.conf
   56  systemctl restart nmbd
   57  nano /etc/samba/smb.conf
   58  dduser --system skywirex
   59  adduser --system skywirex
   60  userdel skywirex

   63  nano /etc/samba/smb.conf
   64  systemctl restart nmbd
   65  usermod -aG smbshare skywirex
   66  id skywirex
   67  systemctl restart nmbd
   68  nano /etc/samba/smb.conf
   69  systemctl restart nmbd\
   70  systemctl restart nmbd
   71  nano /etc/samba/smb.conf
   72  systemctl restart nmbd
   73  history
   74  nano /etc/samba/smb.conf
   75  systemctl restart nmbd
   76  reboot
   77  history
https://kifarunix.com/quick-way-to-setup-samba-file-server-on-debian-10/

https://www.chrisrmiller.com/mount-samba-share-in-ubuntu/