How to set up quick and easy file sharing with Samba

Installing Samba

  1. On your Linux machine, open a terminal window.
  2. Install the necessary software with the command sudo apt-get install -y samba samba-common python-glade2 system-config-samba.
  3. Type your sudo password and hit Enter.
  4. Allow the installation to complete.

sudo cp -pf /etc/samba/smb.conf /etc/samba/smb.conf.bak

Now open the /etc/samba/smb.conf file in your favorite text editor and prepare to make some changes.

Look for this line:

workgroup = WORKGROUP

Change WORKGROUP to reflect your network needs.

The next section you need to edit is way down in the Share Definitions. Scroll down below that demarcation and add the following:

[Anonymous]

path = /samba/anonymous
browsable = yes
writable = yes
read only = no
force user = nobody

Save that file and restart Samba with this command:

sudo service smbd restart

You should be able to reach those shares from any machine on your network. Since we set that share as anonymous, users won’t have to log in to access the files and folders within.

Adding password-secured shares

We’ve just added an anonymous share that anyone could access. If you want to add a folder (we’ll use /samba/shares as an example) that is password protected, follow these steps.

  1. Open a terminal window on your Samba server.
  2. Create a new group with the command sudo addgroup smbgrp.
  3. Create a new user with the command sudo useradd shares -G smbgrp.
  4. Create a Samba password for the user with the command smbpasswd -a shares.
  5. Type and verify a password for the user.
  6. Create the folder with the command sudo mkdir -p /samba/shares.
  7. Change the permissions of the folder with the command sudo chmod -R 0770 /samba/shares.
  8. Change the ownership of the folder with the command sudo chown root:smbgrp /samba/shares.

Now open the /etc/samba/smb.conf file and add the following under the Share Definitions:

[SECURED]

path = /samba/shares
valid users = @smbgrp
browsable = yes
writable = yes
read only = no

Save the file and restart Samba with the command sudo service smbd restart. You now have a password-protected Samba share ready to use. Anyone that needs access to the share will log in with username shares and the password you set when you issued the command sudo smbpasswd -a shares.

source : https://www.techrepublic.com/article/how-to-set-up-quick-and-easy-file-sharing-with-samba/

Posted on: December 5, 2018, by :  | 11 views
https://serang.ut.ac.id/css/css/slot88/ https://tinjut.bagkeu.dikdasmen.kemdikbud.go.id/slot-maxwin/ https://dpm.polinema.ac.id/slot-gacor/ https://akademik.ft.unm.ac.id/slot-dana/ https://ppdb.probolinggokab.go.id/slot-5000/ https://bkad.sulselprov.go.id/assets/ https://ojs.balidwipa.ac.id/docs/slot-gacor/ http://korpri.pekalongankab.go.id/api/slot-gacor/ https://elang.umpp.ac.id/foto/farmasi/-/asset/ http://rsud-kelet.jatengprov.go.id/wp-content/-/asset/ https://kusdhianto-fe.staff.ugm.ac.id/slot88/ http://ppdb.probolinggokab.go.id/judi-bola/ https://bapenda.labuhanbatukab.go.id/racikan-sbobet/ http://rsud-kelet.jatengprov.go.id/wp-content/-/data/ https://agenda.riau.go.id/-/judi-bola/ https://balapan.padang.go.id/sbobet88/ http://jdih.wakatobikab.go.id/sbobet88/ http://kph.menlhk.go.id/sbobet88/ https://bkad.sulselprov.go.id/data/ https://dpm.polinema.ac.id/slot-gacor/ https://dinkes.jemberkab.go.id/storage/attachments/