smb
sudo apt-get update
sudo apt-get install samba
mkdir /home/user/share/
sudo mousepad /etc/samba/smb.conf
At the bottom of the file, add the following lines:
[share]
comment = SMB share on user
path = /home/user/share/
read only = no
browsable = yes
writeable = yes
guest ok = no
public = no
valid users = smbuser1
sudo chmod -R 0755 /home/user/share/
sudo chown -R nobody:nogroup /home/user/share/
Create & modify users? for example «smbuser1»:
useradd smbuser1
passwd smbuser1
* These settings can be viewed or altered in the /etc/default/useradd file.
The useradd command will make changes to the /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow files
see too https://linuxconfig.org/useradd
smbpasswd -a smbuser1
type&retype on screen password
* file /etc/passwd
for modify:
smbpasswd -a smbuser1
sudo smbpasswd -a smbuser1
for delete:
# smbpasswd -x smbuser1
then:
# userdel -r smbuser1
Username used must belong to a system account, else it won’t save.
Now that we have our new share configured, save it and restart Samba for it to take effect:
sudo service smbd restart
or For RHEL/CentOS 6:
service smb reload
For RHEL/CentOS 7:
systemctl reload smb
Update the firewall rules to allow Samba traffic:
sudo ufw allow samba
so:
sudo apt-get install ufw
Win:
\\ip-address\share
* cmd -> netstat
Linux & mac:
smb://ip-address/share
# ip addr
— to view ip address
https://help.ubuntu.com/community/Samba/SambaServerGuide
https://www.thegeekdiary.com/how-to-add-or-delete-a-samba-user-under-linux/
smb://192.168.1.202/share/