Script Mount Samba Win – Linux

— INIZIO —

#!/usr/bin/bash
RESULT=$(mount | grep -o “//<CONDIVISIONE>”)
if [ “$?” == “1” ]; then
/usr/bin/mount -t cifs -o credentials=/etc/samba/file-credenziali,dir_mode=0777,file_mode=0777 //<CONDIVISIONE> /mnt
else
echo “Directory remota gia montata. Uscita.”
fi

— FINE —

2) creato file /etc/samba/file-credenziali ( permessi 600 ) con credenziali per accesso a //<CONDIVISIONE>

— INIZIO —
username=<USERNAME>
password=<PASSWORD>

— FINE —

3) creata schedulazione in /etc/crontab per check mount ogni 2 minuti

— INIZIO —
*/2 * * * * root /root/bin/mount-smb.sh
— FINE —

4 risposte a “Script Mount Samba Win – Linux”

  1. Alright, tried my luck at f88betvn. Honestly, not bad! The site’s pretty smooth and the odds are decent. Worth checking out if you’re looking for a new spot to place your bets. f88betvn

  2. kinggamebio – Kinggamebio: Top Philippines Slot Online & Casino Games. Experience easy Kinggamebio login, register today, and enjoy our official app download for the best gaming experience.Experience the premier Philippines slot online and casino games at Kinggamebio. Enjoy easy Kinggamebio login, fast register, and our official app download for the ultimate gaming experience. Join today! visit: kinggamebio

Lascia un commento

Il tuo indirizzo email non sarĂ  pubblicato. I campi obbligatori sono contrassegnati *