GNU/Linux >> Linux Esercitazione >  >> Debian

Server autonomo Samba Debian 4.0 (Etch) con backend tdbsam

Questo tutorial spiega l'installazione di un file server Samba su Debian Etch e come configurarlo per condividere file tramite il protocollo SMB e aggiungere utenti. Samba è configurato come server autonomo, non come controller di dominio. Per configurare Samba come controller di dominio, dai un'occhiata a questo howto:https://www.howtoforge.com/samba_domaincontroller_setup_ubuntu_6.10

Nella configurazione risultante, ogni utente ha la propria home directory accessibile tramite il protocollo SMB e tutti gli utenti hanno una directory condivisa con accesso in lettura/scrittura.

Installazione di Samba

Installa i pacchetti Debian Samba:

apt-get install libcupsys2 samba samba-common

Rispondi alle seguenti domande:

Please specify the workgroup you want this server to appear to be in when queried by clients. Note that this parameter also controls the domain name used with the security=domain setting.
Workgroup/Domain Name:

-> gruppo di lavoro

If your computer gets IP address information from a DHCP server on the network, the DHCP server may also provide information about WINS servers ("NetBIOS name â servers") present on the network. This requires a change to your smb.conf file so that DHCP-provided WINS settings will automatically be read from /etc/samba/dhcp.conf.
The dhcp3-client package must be installed to take advantage of this feature.
Modify smb.conf to use WINS settings from DHCP?

-> no

Modifica il file smb.conf:

vi /etc/samba/smb.conf

Nella sezione globale, rimuovi ";" all'inizio della riga security =user quindi appare così:

security = user

per consentire agli utenti del sistema Linux di accedere al server Samba.

Nella sezione [case] cambia scrivibile =no a:

writable = yes

Chiudi il file e riavvia Samba:

/etc/init.d/samba restart

Ora aggiungerò una condivisione accessibile a tutti gli utenti.

Crea la directory per condividere i file e cambia il proprietario nel gruppo utenti.

mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/

Alla fine del file /etc/samba/smb.conf aggiungi le seguenti righe:

[allusers]
  comment = All Users
  path = /home/shares/allusers
  valid users = @users
  force group = users 
  create mask = 0660
  directory mask = 0771
  writable = yes

Ora riavviamo Samba:

/etc/init.d/samba restart

Aggiunta e gestione degli utenti

In questo esempio, aggiungerò un utente chiamato tom. Puoi aggiungere tutti gli utenti di cui hai bisogno allo stesso modo, basta sostituire il nome utente tom con il nome utente desiderato nei comandi.

useradd tom -m -G users

Ora aggiungi l'utente al database degli utenti di Samba.

smbpasswd -a tom

-> Inserisci la password per il nuovo utente

Ora dovresti essere in grado di accedere dalla tua workstation Windows con Esplora file utilizzando il nome utente tom e la password scelta e archiviare i file sul server Linux nella home directory di tom o nella directory condivisa pubblica.

  • http://www.debian.org
  • http://www.samba.org

Debian
  1. Server autonomo Samba Ubuntu 7.10 (Gutsy Gibbon) con backend tdbsam

  2. Server autonomo Samba Ubuntu 8.10 con backend tdbsam

  3. Server autonomo Samba Ubuntu 9.10 con backend tdbsam

  4. Server autonomo Samba Ubuntu 12.10 con backend tdbsam

  5. Server autonomo Samba Ubuntu 13.04 con backend tdbsam

Server autonomo Samba Ubuntu 12.04 con backend tdbsam

Installazione del server Samba su Debian 8 (Jessie)

Installazione del server Samba Standalone su Debian 9 (Stretch)

Server autonomo Samba CentOS 6.4 con backend tdbsam

Server autonomo Samba OpenSUSE 12.3 con backend tdbsam

Come configurare Samba Server con Debian 11