Purpose
[ ] Check Operating System version
COMMAND: smbd --version
[ ] Update Operating System
COMMAND: sudo apt-get update
COMMAND: sudo apt-get upgrade
[ ] Install Samba System
COMMAND: sudo apt install samba
[ ] Where is install SAMBA system?
COMMAND: sudo systemctl status smbd
COMMAND: sudo systemctl status smbd
COMMAND: sudo systemctl start smbd && sudo systemctl enable smbd
[ ] Backup current configuration
COMMAND: sudo cp -rfvp /etc/samba/smb.conf /etc/samba/smb.conf-back
COMMAND: sudo addgroup gonsmbgrp
COMMAND: sudo useradd gonsambausr -m -G gonsmbgrpCOMMAND: sudo passwd gonsambausr
COMMAND: sudo smbpasswd -a gonsambausr
[ ] Create folder to share ( /media/EXTHD01). No secure access. All access.
COMMAND:
sudo mkdir /media/EXTHD01
sudo chmod -R 777 /media/EXTHD01
sudo chown -R nobody:nogroup /media/EXTHD01
[ ] Create folder to share ( /media/EXTHD02). Secure. User and Password.
COMMAND:
sudo mkdir /media/EXTHD02
sudo chmod -R 777 /media/EXTHD02
sudo chown -R gonsambausr:gonsmbgrp /media/EXTHD02
sudo chmod -R 777 /media/EXTHD02
[ ] Configure SAMBA
COMMAND: sudo nano/etc/samba/smb.conf
[sambagonshareanonimo]
comment = ShareGoN
path = /media/EXTHD01
read only = no
browseable = yes
guest ok = yes
force user = nobody
[Sambaseguro]
comment = ShareGoNSeguro
path = /media/EXTHD02
browseable = yes
writable = yes
browsable = yes
valid users = gonsambausr @gonsmbgrp
read only = no
COMMAND: testparm
gon@gon-desktop:/media$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
log file =
/var/log/samba/log.%m
logging = file
map to guest =
Bad User
max log size =
1000
obey pam
restrictions = Yes
pam password
change = Yes
panic action =
/usr/share/samba/panic-action %d
passwd chat =
*Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n
*password\supdated\ssuccessfully* .
passwd program
= /usr/bin/passwd %u
server role =
standalone server
server string
= %h server (Samba, Ubuntu)
unix password
sync = Yes
usershare
allow guests = Yes
idmap config *
: backend = tdb
browseable =
No
comment = All
Printers
create mask =
0700
path =
/var/spool/samba
printable =
Yes
comment =
Printer Drivers
path =
/var/lib/samba/printers
comment =
ShareGoN
force user = nobody
guest ok = Yes
path =
/media/EXTHD01
read only = No
[Sambaseguro]
comment =
ShareGoNSeguro
path =
/media/EXTHD02
read only = No
valid users =
gonsambausr @gonsmbgrp
COMMAND: sudo ufw allow samba
COMMAND:
sudo systemctl restart smbdsudo service smbd restart
[ ] Check from windows System
https://devtutorial.io/how-to-install-and-configure-samba-on-ubuntu-server-20-04.html
https://itsubuntu.com/how-to-install-samba-on-ubuntu-20-04-lts/
https://websiteforstudents.com/install-samba-on-ubuntu-20-04-18-04/
https://curiousviral.com/install-samba-server/
https://linuxize.com/post/how-to-install-and-configure-samba-on-ubuntu-18-04/
https://www.tecmint.com/install-samba-on-ubuntu-for-file-sharing-on-windows/
Check at Linux Ubuntu 4.11.6
by GoN | Published: Sept , 2020 | Last Updated:
No hay comentarios:
Publicar un comentario