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:
- 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
- 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.