Mount Samba Share su un client

In questo post samba viene visto lato client. Qundi su un server in cui non è installato samba,  cercheremo di montare una directory condivisa di un samba server.

Sul client installare i pacchetti cifs-utils e samba-client

yum groups list --hidden

yum groups install "Network File System Client"

- Individuare la directory condivisa nel server remoto con il comando seguente

smbclient -L //<sambahost name>

oppure

smbclient -L //<sambahost ip>

Non è richiesta la password, quindi premere "Enter"

The SMB1 protocol has been disabled in the Samba server and client utilities by default. In Samba 4.11, the default values of the `server min protocol` and `client min protocol` parameters have been changed from `NT1` to `SMB2_02` because the server message block version 1 (SMB1) protocol is deprecated. If you have not set these parameters in the `/etc/samba/smb.conf` file:

Red Hat recommends to not use the SMB1 protocol. However, if your environment requires SMB1, you can manually re-enable the protocol. To re-enable SMB1 on a Samba server: * Add the following setting to the
 `/etc/samba/smb.conf` file: 
 server min protocol = NT1 
 * Restart the `smb` service:
# systemctl restart smb

To re-enable SMB1 for Samba client utilities and the `libsmbclient` library: 
* Add the following setting to the `/etc/samba/smb.conf` file:
 client min protocol = NT1
Restart the `smb` service: 
 # systemctl restart smb


- Montare la cartella condivisa con il comando:

mount -t cifs -o username=<sambauser> //<samba server>/<dir share> /<dir local>

Nell'esempio la directory locale del server1 si chiama samba


Con il comando df -h e mount verifichiamo che la direcotry è montata.

- Rendere persistente il mount modificando il file /etc/fstab

 //<samba server>/<dir share> /<dir local>  cifs _netdev,username=<sambauser>,password=<pwd-sambauser> 0 0


Infine eseguire il comando 

mount -a

Verifiche:

df -h e reboot se possibile.




Post popolari in questo blog

ORA-12154: TNS: il listener non è attualmente a conoscenza del servizio richiesto nel descrittore di connessione

Create e Drop Pluggable Database