Git Product home page Git Product logo

samba-memento's Introduction

Samba-Memento

Memento to create Samba servers on Linux systems !


Prerequisite :

You can install Samba via these commands :

apt install samba -y

For Debian distributions or

dnf install samba -y

For RedHat ones

Of course, your equipment must be connected on a LAN and preferably with a static address.

In fact, it will much easier to access to the samba server if the equipment has a static address not provided by a DHCP server.

I - Create a Samba server

Once Samba is downloaded, you have to create the directory where you want users have to access. With mkdir command create the folder. For the example, we will use the directory /home/pi/shared/public.

Then, open with nano or vim the configuration file /etc/samba/smb.conf. Add the following lines :

[MyAwesomeSambaServer]
path = /home/pi/shared/public
writeable=Yes
create mask=0777
directory mask=0777
public=no

Key Description
[MyAwesomeSambaServer] Name of your Samba configuration, you can freely choose it. Moreover, it defines the point at which you will access the share. For example, ours will be at the following address: \\raspberrypi\MyAwesomeSambaServer.
path Directory of the folder we created before.
writeable When this option is set to “Yes“, it will allow the folder to be writable.
create mask This option defines the maximum permissions for files.
directory mask This option defines the maximum permissions for folders.
public If this is set to “no” the Samba server will require a valid user to grant access to the shared folder.

Finally, restart the Samba server to load our configuration changes :

sudo systemctl restart smbd

II - Authentification to the Samba server

To add a minimum of security, we will create a user with a password to prevent not authorized access to our Samba server. First, enter the command :

sudo smbpasswd -a <name_of_the_user>

Then, enter the password of the user.

III - Access to the Samba server

To access to your samba server, you will need to get the name of your Samba configuration (in this example : MyAwesomeSambaServer) and the NetBios name or the IP address of the server. This access depends of the operating system.

On Windows :

Follow this tutorial : https://www.techradar.com/how-to/how-to-map-a-network-drive-in-windows-10

On Mac OS :

Follow this tutorial : https://www.riohondo.edu/its/how-to-connect-to-a-network-shared-folder-with-mac-os-x/

On Linux :

Follow this tutorial : https://www.ghacks.net/2009/11/04/connect-to-your-samba-server-from-linux/


Updated : 30/08/2022, Author : Xen0rInspire

samba-memento's People

Contributors

xenorinspire avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.