Azimout's Linux weblog

mounting windows network shares

leave a comment »

There are two “fs-types” for accessing “network drives”, a.k.a. folders shares on a Windows server: smbfs and cifs. Cifs is newer than smbfs and recommended in most cases.

The command to mount a network share is:

sudo mount -t cifs <remote_path> <local_path> -o username='<domain>\<username>’,uid=1000,mask=000

You will be asked for your password every time you do that, but I preferred this solution to writing my password in a file and changing the permissions.

The command I use to synchronize a local with a remove directory is:

sudo rsync -rv –progress –delete <local_dir> <remote_dir>

(note that, <remote_dir> is the local path where the remote dir was mounted by the previous command)

Don’t forget to install the smbfs package!!!

It may also be a good idea to run baobab (the disk usage analyzer) on the local folder before starting the sync, to find any extra large subfolders (e.g. a local copy of a software dvd) you don’t actually want to put on the server…


Written by azimout

30/01/2009 at 14:54

Posted in Reference

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: