giovedì 22 settembre 2011

451 4.4.0 DNS query failed

The Problem

For whatever reason, Exchange (and DNS) is hyper sensitive to a DNS domain that provides a bogus response (say one Name Server is healthy, the other is not). It appears to be an issue where we need to wait until the DNS TTL expires or, we perform the 'solution' below. This is a temporary measure as we work with the end user domain, to find out what is going on with their DNS (in both cases, after flushing DNS locally and my AD DNS server, I would get a different DNS NS result, and sometimes an MX record, sometimes not … strange, but their problem). However, Exchange 2007 seems to be especially sensitive to this…



For example, with the domain below, here is the error I've been experiencing (in the Exchange 2007 Queue…) – 451 4.4.0 DNS query failed







The Solution

Or should I say, the workaround. The solution is contact the destination DNS/domain provider and have them fix their problems (though perhaps a future fix from Microsoft/Exchange will resolve this, or maybe they have and I'm somehow unable to stumble across the answer). However, the workaround is…


■Flush your Active Directory DNS Cache (to do this, you'll need to have 'advanced' turned on, the View option in DNS)






On your Exchange 2007 Server(s), flush your local DNS Cache



IPCONFIG /FLUSHDNS



For me, repeatedly, when I click 'retry' in the Exchange 2007 Message queue, the message leaves immediately. Sure enough, a few hours later I have a crap record but it does at allow the messages to flow. Now to get the target domain/DNS provider to cooperate and recognize they have a problem, of some sort…

Controlla anche connettore d'invio in trasporto Hub, nella scheda rete, che sia flagggata la casella Utilizza le impostazioni di ricerca dns esterno nel server di trasporto

venerdì 26 agosto 2011

Sysprep in windows 2008

Con il tool fornito da Microsoft sysprep, che in Windows 2008 è disponibile nella directory C:\Windows\system32\sysprep, si effettua la procedura per il cambio del SID.

Per evitare possibili imprevisti dovuti ad un’errata procedura, gli step raccomandati da seguire sono due:



1. Aprire il Command Prompt con diritti di Administrator
2. Eseguire il comando:


c:\windows\system32\sysprep\sysprep.exe /quiet /generalize /oobe /shutdown

giovedì 25 agosto 2011

Rimuovere download Microsoft Update da Win2008

1. Open Start >> Run or press window key + r

2. Type “services.msc” (without quotes) and Click OK , this will open services window.

3. Right click on Automatic Updates Service and select Stop.

4. After the service is stopped, press window key + r

5. Type “%windir%\SoftwareDistribution” (without quotes) and press enter.

6. Open the Download folder and delete all contents of the Download folder.

7. Close the window, press Window Key + r ( or Open Start >> Run )

8. Type “services.msc” (without quotes) and Click OK

9. Right click on Automatic Updates Service and select Start.

10. That’s it Done

domenica 21 agosto 2011

OracleVm re-Register host

Hi Honza,

just tried it:

Before:
# /opt/ovs-agent-latest/utils/repos.py -l
[ * ] b2638dcd-fa49-4646-a7da-83e91e7e26c4 => /dev/hdb1
# du /var/ovs/mount/B2638DCDFA494646A7DA83E91E7E26C4/running_pool
2316896 /var/ovs/mount/B2638DCDFA494646A7DA83E91E7E26C4/running_pool/30_OEL1

Then:
# /opt/ovs-agent-latest/utils/cleanup.py
This is a cleanup script for ovs-agent.
It will try to do the following:

*) stop o2cb heartbeat
*) offline o2cb
*) remove o2cb configuration file
*) umount ovs-agent storage repositories
*) cleanup ovs-agent local database

Would you like to continue? [y/N] y
Cleanup done.

No Repos anymore:
# /opt/ovs-agent-latest/utils/repos.py -l

Create New:
/opt/ovs-agent-latest/utils/repos.py -n /dev/hdb1
[ NEW ] b2638dcd-fa49-4646-a7da-83e91e7e26c4 => /dev/hdb1
/opt/ovs-agent-latest/utils/repos.py -r b2638dcd-fa49-4646-a7da-83e91e7e26c4

Not mounted yet:
# df -k
/dev/hda2 4466156 930456 3305168 22% /
/dev/hda1 101086 45803 50064 48% /boot
tmpfs 296536 0 296536 0% /dev/shm

Initializing:
/opt/ovs-agent-latest/utils/repos.py -i

Mounted!:
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 4466156 930468 3305156 22% /
/dev/hda1 101086 45803 50064 48% /boot
tmpfs 296536 0 296536 0% /dev/shm
/dev/hdb1 33551720 6040232 27511488 19% /var/ovs/mount/B2638DCDFA494646A7DA83E91E7E26C4

And data still there:
# du /var/ovs/mount/B2638DCDFA494646A7DA83E91E7E26C4/running_pool
2316896 /var/ovs/mount/B2638DCDFA494646A7DA83E91E7E26C4/running_pool/30_OEL1

However as noted above: The /OVS link to the /var/ovs/mount point will be created when you register the server with OVM Manager.
All additional data will be left on the device.

venerdì 19 agosto 2011

Server database Aruba down 20 agosto 2011




I server dei database di Aruba dalle 23 del 19 agosto 2011, sono andati down, o almeno non sono raggiungibili, il problema riguarda solo i server con database, tanto è vero che i siti rispondono, ma viene visualizzato un errore di connessione.

Rimaniamo in attesa di una comunicazione ufficiale da parte di Aruba.


giovedì 11 agosto 2011

HA initiated a failover action in cluster Vmware

Ho trovato questo messaggio “HA initiated a failover action in cluster your-cluster-name in datacenter your-datacenter-name” sul mio vCenter. Niente è cambiato, le vm non sono state riavviate l'HA continua a funzionare tranquillamente, per risolvere ho usato il seguente metodo:


1. Turn OFF VMware HA on Cluster Feature setting.
2. Enable VMware HA setting again.

martedì 28 giugno 2011

Active directory Backup and Restore

Active Directory Recovery
One of the most important step in a recovery strategy for domain controllers is to perform the proper backups while everything is working correctly. In addition to regular full backups, you should perform regular system state backups. Restoring from a system state backup, is faster than restoring from a full server backup.


Be aware of the Windows editions when performing a system state backup:

With Windows Server 2008 R2 you can use Windows Backup (GUI) to take a systemstatebackup.


With Windows Server 2008 you must use wbadmin start systemstatebackup (CMD) to take a system state backup. The backup can only be saved to a local drive (not the same drive as the system state data), not to a shared folder or a disc.



There is 3 type of restoring Active Directory / AD Objects

1. Nonauthoritative:

A nonauthoritative restore returns the domain controller and the Active Directory database to its state at the time of backup. When the domain controller returns online, Active Directory replicates the database with other DC’s on the domain. Any changes that took place since the backup are replicated to the restored domain controller.

Most common use of a nonauthoritative restore is to bring an entire DC back from a failure.

2. Authoritative:

An authoritative recovery used to restore a designated object or container of objects to its state at the time of the backup. Fx., if an administrator accidentally deletes an OU that contains a large number of users. If you restore the server from backup, the default nonauthoritative process doesn’t restore the deleted OU because the domain controller is updated to the current status of its replication partners, which means that the OU is deleted.

When you perform an authoritative restore, you prevent specific objects from the backup from being overwritten by Active Directory replication. With the authoritative restore, the Update Sequence Number (USN) is incremented so that it is higher than the existing USN of the (deleted) object in the Active Directory replication system.

Use an authoritative restore to restore specific objects in Active Directory.

3. Active Directory Recycle Bin

You can use Active Directory Recycle Bin if your AD DS run with Windows Server 2008 R2 FFL/DFL . AD Recycle Bin helps to minimize directory service downtime by enhancing your ability to preserve and restore accidentally deleted Active Directory objects without restoring Active Directory data from backups, restarting Active Directory Domain Services (AD DS), or rebooting domain controllers.

Click Here if you want to Enable AD Recycle Bin.

The following methods show how to perform a domain controller restore. If possible, use the first method in the table.

Dcpromo:

If the server boots but Active Directory is corrupt, you can use dcpromo.

Run dcpromo to remove Active Directory from the domain controller (The server will become a member server)
Run dcpromo again to install Active Directory. The AD data will be copied from another DC on the network.
Run dcpromo /forceremoval if you are unable to remove Active Directory.

The disadvantage of using dcpromo is that the entire Active Directory database must be replicated across the network from another domain controller. However, you can use the Install from Media option to copy the database from media to reduce network traffic.

Restore system state:

If the server boots but Active Directory is corrupt, you can restore the system state data from a recent backup. After the backup is restored, Active Directory replication copies only the changed data to the restored domain controller. To use this method to restore a domain controller:

Reboot the server in Directory Services Restore Mode (DSRM). Use one of the following methods:
Reboot the server. Following the BIOS screen, press F8. Select Directory Services Restore Mode (DSRM) .
At a command prompt, type:
bcdedit /set safeboot disrepair
shutdown -t 0 -r
From Command Prompt (Run as Administrator) Run wbadmin start systemstaterecovery to restore the system state data.
Restart the server in normal mode. If you used bcdedit to start the server in DSRM, type the following at a command prompt:
bcdedit /deletevalue safeboot
shutdown -t 0 -r
Critical volume or full server restore:

If you are unable to reboot the server, you will need to perform a critical volume or full server restore. This restore rebuilds the entire server, along with the Active Directory database. Use the wbadmin start recovery command to start the restore. A full server restore not only restores Active Directory, but data on all other volumes as well.





To enter DSRM, you must supply the recovery mode password. You set this password during the domain controller installation. If you need to set or change the password, use the following steps:

Open an elevated command prompt by clicking Start, then right-clicking Command Prompt and selecting Run as administrator.
Type ntdsutil.
Type set dsrm password.
Type reset password on server .
Enter the password.
Confirm the password.
Type quit, then quit again.

fonte: http://thelaith.net/2010/09/29/active-directory-backup-and-restore/

lunedì 27 giugno 2011

Liferay avviare

Per avviare Liferay:

/opt/liferay/liferay-portal-6.0.6/tomcat-6.0.29/bin
./startup.sh

lunedì 13 giugno 2011

Connettere o disconnettere unità di rete

Supponiamo che il computer che ospita la risorsa condivisa si chiami SRV01, che esso condivida una cartella DATI, alla quale ha accesso l’utente Bob, che può essere definito localmente su SRV01 oppure appartenere al dominio DOMAIN. Tutti i comandi vengono impartiti da un secondo PC connesso in rete; per semplicità assumiamo che SRV01 sia configurato per accettare le connessioni dal questa seconda macchina.

La situazione più comune è la mappatura di una unità di rete, che possiamo effettuare con il comando:
net use z: \\SRV01\DATI /user:Bob password se l’utente Bob è locale a SRV01, oppure
net use z: \\SRV01\DATI /user:DOMAIN\Bob password se l’utente è di dominio.
Con lo swith /savecred, nome e password vengono salvate.
Se invece di indicare esplicitamente la lettera da usare per la mappatura dell’unità, vogliamo utilizzare la prima lettera disponibile sul client, il comando diventa:
net use * \\SRV01\......

Nel caso non si volesse scrivere in chiaro la password su una riga di comando, basta sostituirla con un asterisco, ed il sistema ce la chiederà, oscurandola.
Aggiungendo al comando lo switch /persistent:yes, la connessione verrà ripristinata al riavvio.
Una volta terminato il lavoro, per sconnettere l’unità, possiamo impartire il comando:
net use z: /delete

Se si desiderasse eliminare la richiesta di conferma (serve se il comando si inserisce in uno script), il comando diventa:
net use z: /delete /yes
per cancellare tutte le mappature:
net use * /delete o net use * /delete /yes

A volte può essere necessario navigare nelle risorse di un computer remoto; se un doppio click non fosse sufficiente a visualizzare la finestra di immissione di nome e password, possiamo usare il comando per autenticarci preventivamente:
net use \\SRV01 /user:ecc ecc ecc
Quest’ultimo comando serve anche per poter stampare su una stampante di rete su un host che ha bisogno di una autenticazione preventiva. Il caso tipico è quello di chi collega il proprio PC a diverse reti con diversi domini, ad esempio il sistemista che frequenta le sedi dei propri clienti e si trovi nella necessità di stampare.
Utilizzare i comandi dall’interfaccia carattere è molto più veloce dell’interfaccia grafica, che spesso si “pianta” inesorabilmente quando si cerca di navigare all’interno di risorse senza la preventiva autorizzazione.

fonte: http://www.andreabeggi.net/2007/01/29/net-use/

lunedì 30 maggio 2011

T-sql restore db SqlServer

RIpristinare un db tramite t-sql



RESTORE FILELISTONLY
FROM DISK = 'D:\wvoce_sin2010\dbwvoce.bak'
GO


----Make Database to single user Mode



ALTER DATABASE db-name
SET SINGLE_USER WITH
ROLLBACK IMMEDIATE

----Restore Database
RESTORE DATABASE db-name
FROM DISK = 'D:\file.bak'
WITH REPLACE,MOVE 'filem-df' TO 'D:\file.bak',
MOVE 'file-log' TO 'C:\file.ldf'

ALTER DATABASE pentaho SET MULTI_USER
GO

T-sql dare permessi a user

Per dare i permessi ad un user esistente sul nostro motore db Sql Server, tramite t-sql questi comanda da dare:

USE db_name;
CREATE USER user_name FOR LOGIN login_name;
EXEC sp_addrolemember 'db_datareader', 'username'
EXEC sp_addrolemember 'db_datawriter', 'username'
EXEC sp_addrolemember 'db_owner', 'username'

sabato 28 maggio 2011

Wordpress google adsense 3 posts

Google Adsense allows 3 ad strips per page as you all know. Generally, Most of the bloggers concentrate on monetizing the single pages of their blogs and leave their homepage clean without ads. If you are one of them who like ads on the Home Page like me, this will help you do it in a better way. Most of us want to show up Google ads in the first 3 posts of the blog as they grab the attention of the readers.

This can be done with a small piece of code, without using any kind of Plugins. So, In order to integrate ads efficiently into your WordPress theme. Open up your index.php file and look for the loop. The loop begins like this..


<?php if (have_posts()) : while (have_posts()) : the_post(); ?>



and this loop should end as


<?php endwhile; else: ?>

<p>Sorry, nothing matches that criteria.</p>

<?php endif; ?>



Your Google Adsense code should be placed between the start and the end of this loop. So, just pick a position (after the title or at the end of the content,where ever you want) and place the following code..


<?php if ($wp_query->current_post < 3) { ?>

<!– Google Adsense Code goes here –>

<?php } ?>





Now you have to replace the commented line ( ) with your adsense code, save this file and update your theme. Now your theme should display three units of adsense code in your first 3 posts just like you always wanted.

lunedì 16 maggio 2011

Servizio Email Router Crm non parte

Microsoft Dynamics CRM in Microsoft Dynamics CRM 4.0: "il servizio router di posta elettronica potrebbe non eseguire il thread di background principale di servizio"
Per risolvere il problema, attenersi alla procedura descritta di seguito:

Eliminare il file Microsoft.Crm.Tools.EmailAgent.SystemState.xml.

Note
Per impostazione predefinita, il file Microsoft.Crm.Tools.EmailAgent.SystemState.xml è nella seguente cartella:
C:\Program Files\Microsoft CRM Email\Service
Per impostazione predefinita, la cartella è una cartella nascosta. Per visualizzare questa cartella, è necessario modificare le impostazioni di Esplora risorse per visualizzare le cartelle nascoste e file nascosti.
Riavviare il servizio router di posta elettronica di Microsoft Dynamics CRM.

Il file Microsoft.Crm.Tools.EmailAgent.SystemState.xml viene ricreato.


Se gli utenti di Microsoft Dynamics CRM sono impostati per utilizzare il router di posta elettronica e non a inoltra Mailbox, per posta elettronica in arrivo, è possibile eliminati messaggi di posta elettronica restituito a Microsoft Dynamics CRM dopo l'implementazione di questa risoluzione. Se un messaggio di posta elettronica non è stato eliminato dalla cassetta postale dell'utente, il router di posta elettronica Impossibile trovare il messaggio di posta elettronica dell'utente nella posta in arrivo, non cercare in Microsoft Dynamics CRM e creare nuovamente il messaggio di posta elettronica in Microsoft Dynamics CRM. Per evitare questo problema, il messaggio di posta elettronica dovrà essere eliminato anche dalla cassetta postale dell'utente insieme a Microsoft Dynamics CRM.

Per evitare questa situazione, eseguire un backup dei file elencati di seguito e regolarmente memorizzarli sul desktop del server stesso.

Microsoft.Crm.Tools.EmailAgent.Configuration.bin
Microsoft.Crm.Tools.EmailAgent.SystemState.Xml


Se si verifica un errore gestione di configurazione router di posta elettronica di Microsoft Dynamics CRM all'avvio o non è possibile avviare il servizio router di posta elettronica di Microsoft Dynamics CRM, sostituire i file sopra 2 in C:\Program Files\Microsoft CRM Email\Service. Riavviare il servizio router di posta elettronica di Microsoft Dynamics CRM e quindi avviare Microsoft Dynamics CRM E-Mail router Configuration Manager. Se il backup di questi file è più recente, sarà necessario completare la configurazione del router di posta elettronica.


http://support.microsoft.com/kb/954522/it

mercoledì 4 maggio 2011

Exchange 2010 W3WP High Memory Usage

Exchange 2010 High w3wp Memory Usage, it may happen that the w3wp service IIS going to saturate the Ram Exchange Server 2010 SP1.
This disruption can be caused by a worm Conficker.B, causing delays in the delivery of mail, with frequent disconnections client.

Solution:

Stop IIs

Downloaded from Windows Update, the update control worms in April
2011 and verify that there is rollup5 Microsoft Exchange 2010.

giovedì 21 aprile 2011

Export e Import reservation dhcp su Win2008

Gli scope dei dhcp in windows2008 non possono essere modificati una volta creati, la subnet mask non può essere cambiata, quindi quando bisogna espandere una classe di una lan, bisogna ricreare un nuovo scope.
Il problema è che cancellando lo scopo esistente, vanno perse anche le reservation e le option, quindi bisogna esportarle in questo modo:

netsh dhcp server scope dump>dump.txt

mentre per importarle:

netsh exec dump.txt

martedì 22 febbraio 2011

Architettura database Mysql

L’articolo descrive le caratteristiche tecniche di un Database creato in ambiente MySQL, la corrispondenza tra Database e Directory sul filesystem, i tipi di tabella supportati da MySQL e l’uso della memoria.

Caratteristiche generali

Tutti i database creati in ambiente MySQL corrispondono fisicamente a delle sottodirectory della directory definita come datadir nel file di configurazione /etc/mysql/my.cnf

All’interno del file my.cnf troviamo qualcosa di simile a:

user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp language = /usr/share/mysql/english

In questo caso la directory definita come datadir è la /var/lib/mysql. Questo significa che se si crea un nuovo database db_name, automaticamente verrà creata la seguente directory sul filesystem: /var/lib/mysql/db_name.

Un database può essere vuoto, in tal caso la directory corrispondente sul filesystem sarà vuota, oppure può contenere alcune tabelle, in questo caso la directory conterrà alcuni file. Un database non può contenere un altro database. A ogni tabella del database corrisponde un file all’interno della directory corrispondente al database sul filesystem. Il file della tabella, conterrà la definizione della struttura della tabella stessa. A seconda del tipo di tabella creata, nella directory del database possiamo trovare diversi tipi di file. Per tutti i tipi di tabelle create in un database MySQL, viene generato un file che ha lo stesso nome della tabella ed estensione .frm, tale file contiene al suo interno la definizione della struttura della tabella. Quando viene creato un nuovo database in MySQL, all’interno della diretory del database viene generato il file db.opt dove vengono registrate le caratteristiche del database.

Il contenuto del file db.opt potrebbe essere simile a:

default-character-set=latin1
default-collation=latin1_swedish_ci

Tipi di tabelle

MySQL supporta i seguenti tipi di tabelle:

Tabelle tipo MyISAM
Tabelle tipo InnoDB
Tabelle tipo MERGE
Tabelle tipo HEAP
Tabelle di tipo MyISAM

Le tabelle di tipo MyISAM hanno le seguenti caratteristiche:

Ogni tabella è rappresentata sul disco da un file che ne descrive il formato con estensione .frm, da un file che contiene i dati con estensione .MYD e da un file contenente gli indici con estensione .MYI. Tutti i file sono memorizzati all’interno della directory del database;
La clausola AUTO_INCREMENT è più flessibile di tutti gli altri tipi di tabelle;
Possono essere utilizzate per creare tabelle di tipo MERGE;
Possono essere convertite in tabelle compresse, a sola lettura, molto veloci;
Supportano il tipo di ricerca FULLTEXT;
Supportano il lock a livello di tabella. In lettura l’accesso è consentito simultaneamente a più query, mentre in scrittura viene utilizzato un lock esclusivo a livello di tabella;
Tabelle di tipo InnoDB

Le tabelle di tipo InnoDB hanno le seguenti caratteristiche:

Ogni tabella è rappresentata sul disco da un file che ne descrive il formato con estensione .frm, mentre i dati e gli indici sono scritti all’interno di uno o più file utilizzati come tablespace comune a tutte le tabelle di questo tipo;
Questo tipo di tabella supporta le transazioni, operazioni definite all’interno degli statement BEGIN, COMMIT, ROLLBACK...
InnoDB fornisce un sistema per il recupero automatico dei dati in caso di crash server MySQL o del pc sul quale il server è in esecuzione;
InnoDB supporta le relazioni (foreign keys) e i vincoli di integrità referenziali;
La gestione della concorrenza per le query è gestita tramite multi- versioning e il lock a livello di riga;
Tabelle di tipo MERGE

Le tabelle di tipo MERGE hanno le seguenti caratteristiche:

Una tabella MERGE è il risultato dell’insieme di più tabelle MyISAM. Ogni tabella MERGE è rappresentata da due file, uno con estenzione .frm che contiene la definizione della struttura della tabella e uno con estensione .MRG contenente la lista dei file MyISAM che costituiscono le tabelle unite nella MERGE;
L’interrogazione di una tabella MERGE comporta l’interrogazione di tutte le tabelle che la compongono;
Una tabella MERGE può essere utile quando si ha la necessità di memorizzare grandi quantità di dati essendo un’unità logica che supera di gran lunga la capacità massima di memorizzazione dati di una tabella MyISAM;
Tabelle di tipo HEAP

Le tabelle di tipo HEAP hanno le seguenti caratteristiche:

Ogni tabella è rappresentata sul disco da un file che ne descrive il formato con estensione .frm, mentre i dati e gli indici sono scritti in memoria. Ne consegue che questo tipo di tabella è molto veloce, per contro i dati memorizzati in queste tabelle non sopravvivono al riavvio del server;
Le tabelle HEAP utilizzano una gran quantità di memoria, quindi non vengono usate per memorizzare grandi moli di dati;
MySQL e la memoria

Il server MySQL è multithread, tecnicamente un thread è un flusso di controllo, ovvero un percorso di esecuzione attraverso il codice indipendente all’interno di un processo. Per ogni client connesso, il server di MySQL crea un thread per gestire quella connessione. Il server mantiene una cache dei gestori dei thread; quando avviene la disconnessione da parte di un client, il thread che gestiva quella connessione viene messo in cache se la cache non è piena, allo stesso modo quando un client si connette al server, gli viene assegnato un thread presente in cache. Questa gestione dei thread in cache aumenta notevolmente le prestazioni in termini di tempi di connessione e disconnessione al database.

Il server MySQL, utilizza una serie di buffer per mantenere in memoria le informazioni necessarie a ridurre al minimo il numero degli accessi al disco. Tra i buffer utilizzati dal server di MySQL troviamo:

le grant tables (tabelle di sistema) dove sono memorizzati i dati degli utenti del database (info, permessi, etc.). In MySQL l’accesso ai dati viene controllato per ogni query inviata dai client, bufferizzando le grant tables i tempi di risposta del server diminuiscono notevolmente;
il key buffer che tiene in memoria i blocchi degli indici delle tabelle;
la table cache che tiene in memoria i descrittori delle tabelle aperte;
la query cache che tiene in memoria il piano di esecuzione delle query eseguite ripetutamente;
la host cache che tiene in memoria la coppia nome_host / indirizzo_ip ottenuta mediante interrogazione del server DNS

mercoledì 19 gennaio 2011

Montare cartella windows su Ubuntu/debian con Samba

Se non lo avete fatto in precedenza, installate il pacchetto smbfs:

sudo apt-get install smbfs

Create in /mnt una cartella con il nome del pc o della condivisione alla quale connettersi. Nell’esempio creeremo una cartella di nome punto_di_mount:

sudo mkdir /mnt/punto_di_mount

Si presume che si abbiano delle valide credenziali di accesso al sistema Windows.

Adesso montiamo una ipotetica cartella condivisa di Windows chiamata cartella_condivisa:

sudo mount -t smbfs -o username=username_valida //nome_pc_win/nome_condivisione /mnt/punto_di_mount


In ambiente di rete Windows, avendo crededenziali appartenenti al gruppo Administrator, ci si può connettere direttamente alla “root” di un determinato hard disk pur non essendo formalmente stato condiviso come “cartella condivisa” semplicemente aggiungendo il simbolo $ accanto alla lettera d’unita.

Stessa tipologia di connessione vale per il comando mount.

Nell’esempio seguente montiamo nella solita cartella tutto il disco C del pc windows senza che sia stata ufficialmente condiviso il disco:

sudo mount -t smbfs -o username=username_valida //nome_pc_win/c$ /mnt/punto_di_mount

In questi casi, senza esplicita condivisione e avendo credenziali del gruppo Administrator, possiamo montare solo la “root” del disco. File e directory saranno però liberamente sfogliabili.

Una piccola nota sui parametri del comando mount:

Il parametro -t smbfs specifica che stiamo montando un filesystem di tipo smbfs

Il parametro -o indica che ciò che segue è un opzione. Nel nostro caso l’opzione è il parametro username


Montare automaticamente una cartella condivisa
Per fare in modo che la nostra Debian monti automaticamente all'avvio la risorsa condivisa Windows, dobbiamo modificare il file /etc/fstab, il file che contiene tutte le informazioni sui filesystem montati:

# nano /etc/fstab
Alla fine del file aggiungiamo la riga:

//windowsserver/cartella /mnt/windowsserver smbfs username=ferdy,password=MiaPassword 0 0