Mounting Shared Folder from Linux using Samba

Posted on

Sometimes there is a need for mounting folder and file sharing definition which is located in either Linux or Windows operating system. The process is quite simple. As long as the shared folder definition is already configured, the mounting process can be done by executing the following command in the bash prompt :

mount -t cifs -o username=backup,password=passwdbackup,domain=WORKGROUP //xxx.xxx.xxx.xxx/backup/DUMP_SERVERS/server01/ /backup_server01/

Description : 
mount : It is the mount command used to mount any resources in any filesystem available.
-t : It is an option for the mount command which is used to specify the type of the filesystem in order to attach or to mount specific resource.
cifs : It is an abbreviation of Common Internet File System (CIFS). It is a filesystem type used for computer users share files across intranets and internet. It is also a native file-sharing protocol in Windows 2000.  
-o : It is an option for the mount command which is used to specify the username, password and also domain in order to attach or to mount specific resource. 
username=backup : It is an option for the mount command which is used to specify the variable of user and also the value of it in order to attach or to mount specific resource.  
password=passwdbackup : It is an option for the mount command which is used to specify the variable of password and also the value of it and it is the suitable one for the user defined in order to attach or to mount specific resource. 
domain=WORKGROUP : It is an option for the mount command which is used to specify the variable of domain and also the value of it in order to attach or to mount specific resource. 
//xxx.xxx.xxx.xxx/backup/DUMP_SERVERS/server01 : It is the URL or path of folder and file sharing available and has already defined in the other host, server or workstation. 
/backup_server01/  : It is the mount point available on local host, server or workstation.

The above description about mount command is not only defining the pattern of command execution but also giving an example.

All of the above values including username, password, domain even URL of folder and file sharing and also the mount point which is normally a directory exist in local host, workstation or server must be adjusted with the condition or situation of each case or environment of each attribute of folder and file sharing access.

The above example is an attempt to copy all the available folder and files from a server into a dedicated backup server which the folder and file sharing itself has already been defined.

If the execution of the above command has been successfully delivered, in the mount point of /backup_server01/ at the local host, server or workstation, the content of every available folders or files exist in URL sharing //xxx.xxx.xxx.xxx/backup/DUMP_SERVERS/server01 is indeed can be viewed.

2 thoughts on “Mounting Shared Folder from Linux using Samba

Leave a Reply