Howto Access / Mount / MAP Windows Share from Linux | RHEL / CentOS 5.x | RHEL / CentOS 6.x | Fedora 17 | Ubuntu 12.10 | Ubuntu 12.04 LTS

Hello,

This Article will show you to Access Windows Shares from Linux. You can Perform this commands to Almost all Linux like ( Red Hat Enterprise Linux, Ubuntu Desktop Edition, Ubuntu Server Edition, CentOS and Of Course Fedora).

This is very basic Howto but this can be very helpful and You can achive this with some simple steps.

Accessing Windows share is called a Mount in Linux Terms. In This Howto and in Section 2 You will able to make that share Permanent available to Linux it is like MAP Drive of Windows from Linux.

Requirements for this Howto :

1. You need to be root to execute this commands, To Access from GUI “root” access is not needed.

2. Package cifs-utils must installed, If its not installed You can Install it by following command

=> For Ubuntu

#sudo apt-get install cifs-utils

=> For RHEL/CentOS

#yum install cifs-utils

Please Perform following steps to Map / Mount / Access windows share directory from Linux

Following topics covered in this article :-

1) Mount Windows Share from Linux ( Temporary ).

2) Mount Windows Share from Linux ( Permanent, Available on re-boot).

3) Accessing Windows Share Directory using Linux GUI.

So Now Let’s Come to the poing and Start Executing Commands

1) Mount Windows Share from Linux ( Temporary ) :-

By Performing this Section you will able to mount windows shared directory from Linux but that will be on Temporary basis once you re-boot your system then it will not available. So Take a note of this.

root@tejasbarot-linux-ahmedabad:~ # mount -t cifs //<windows-ip-address>/<share-name> /<local/mount/point> -o username=username,password=password

For Example :-

root@tejasbarot-linux-ahmedabad:~ # mount -t cifs //192.168.1.3/share /mnt -o username=tejasbarot,password=linuxahmedabad

2) Mount Windows Share from Linux ( Permanent, Available on re-boot).

By Performing this Section you will able to mount windows shared directory from Linux on Permanent Basis, Even if you re-boot then it will be available, But Of-Course Windows share must available.

First of all take backup of /etc/fstab file so if anything goes wrong you can always recover.

=>  To backup /etc/fstab file execute following command.

root@tejasbarot-linux-ahmedabad:~ #cp /etc/fstab /etc/fstab.original

=> Open /etc/fstab with your Favourite text editor. I am using VIM as my editor.

root@tejasbarot-linux-ahmedabad:~ # vim /etc/fstab

=> Now Insert Following entry

//<windows-ip-address>/<share-name> /<local/mount/point> cifs username=username,password=password 0 0

For Example ( Entry Should look like below ) :-

//192.168.1.3/share /mnt cifs username=tejasbarot,password=linuxahmedabad 0 0

Save and Exit from File. To save in VIM ( Press ESC and :wq and ENTER )

=> To Test Your Entry is correct or not Execute following command :-

root@tejasbarot-linux-ahmedabad:~ # mount -a

No Error should be there once you execute this command.

=> Now You can Confirm by “df -h”

3) Accessing Windows Share Directory using Linux GUI.

This is the easiest way to Access Windows Share from Linux.

If You are Using Unity or GNOME 3.0 then you can search for “Connect to Network/Server” and Window will open and If You are using GNOME Classic then You can Perform steps as per below screen shot.

=> Click on “Places” -> Click on “Connect to Network/Server

Connect to Network/Server
Connect to Network/Server

 

=> Select “Windows Share when Next Screen Appears

Select Windows Share
Select Windows Share

=> When Next Screen Comes up,Provide Details of “Windows Share” and click on Connect.

  • Server : IP Address/Name of System where windows share is available (Only this field is required, You can skip all other fields).
  • Port : Provide If only connecting to Non-Default Port.
  • Type: Windows Share
  • Share : Share Name
  • Folder : Folder Inside Share
  • Domain Name : If You are in Domain Environment then Provide Domain Name.
  • Username : Username Who has Share Access
  • Password : Password of User which you have provided above.
Provide Share Details
Provide Share Details

That’s It. By above three methods you can Map / Access / Mount Windows Share from Linux and You can even Make it Permanent same like MAP Drive.

Hope this will helps you, Waiting for your feedback.

If you like this then Please Click Google +1 Button and Show Your Support. Your Support will encourage me to write more articles.

All Linux User’s Blog Mobile Applications :- http://www.tejasbarot.com/download-mobile-apps/

Enjoy Windows Share from Linux 🙂 Enjoy Linux MAP Drive 🙂 Enjoy Linux 🙂 Enjoy Open Source 🙂

Mount Remote folder using SSH(sshfs) on Fedora 10, Ubuntu 8.10, Ubuntu 9.04

Hi Friends,

It’s possible to mount any Remote directory using SSH with sshfs utility(command). It’s Very Easy. This Steps you can follow for Fedora 10, Ubuntu 8.10 and Ubuntu 9.04 Linux.

First Let us know something about SSHFS.

What is SSHFS?

SSHFS allows you to conect to any host that supports SSH and mount the remote directory in your local directory. This means you will be able to access files as if they were on your own system and best of all the transactions are encrypted using SSH.

This is much faster, easier, and more effecient than using FTP. Still Some people are actually using regular FTP to transfer files. The problem with FTP is that not only are your files sent in clear text but username and password are also in plain sight for anyone to can see it.

For Fedora 10 :-

Step 1 :- Login as a root by executing following command from user.
[linuxuser@tejasbarot.com]$ su – root

Step 2 :- Execute Following command to install SSHFS on your Fedora Box.
[root@tejasbarot.com]# yum -y install sshfs*

Step 3:- Once Installation Done Login as a user now.Now Create One Local Directory(Where you want to mount Remote Directory). (You can also mount to your existing directory)
[root@tejasbarot.com]# su – linuxuser

[linuxuser@tejasbarot.com]$ mkdir ~/SSHFS

Step 4:- Now Execute command to mount remote directory into Local Directory.

[linuxuser@tejasbarot.com]$ sshfs root@192.168.100.55:/home/linuxuser/ ~/SSHFS. (sshfs username@ssh-server-ip:/directory-you-want-mount <local-directory-where-you-want-to-mount-remote-folder)

Step 5 :- It will ask your for password of user which you have provided.Now Check your ~/SSHFS ( Local Directory where you mounted SSH Remote Folder).You will able to see Your all files into ~/SSHFS

For Ubuntu 8.10 and Ubuntu 9.04

Step 1 :- Login as a root by executing following command from user.
linuxuser@tejasbarot.com:~$ su – root

Step 2 :- Execute Following command to install SSHFS on your Fedora Box.
root@tejasbarot.com:~# apt-get install sshfs -y

Step 3:- Once Installation Done Login as a user now.Now Create One Local Directory(Where you want to mount Remote Directory). (You can also mount to your existing directory)
root@tejasbarot.com:~# su – linuxuser

linuxuser@tejasbarot.com:~$ mkdir ~/SSHFS

Step 4:- Now Execute command to mount remote directory into Local Directory.

linuxuser@tejasbarot.com:~$ sshfs root@192.168.100.55:/home/linuxuser/ ~/SSHFS. (sshfs username@ssh-server-ip:/directory-you-want-mount <local-directory-where-you-want-to-mount-remote-folder)

Step 5 :- It will ask your for password of user which you have provided.Now Check your ~/SSHFS ( Local Directory where you mounted SSH Remote Folder).You will able to see Your all files into ~/SSHFS

All Comments Accepted.

Enjoy Linux 🙂 Enjoy Remote Mounting 🙂

Mounting NTFS Partition on RHEL 5.x

irst Setup RPMForge Repository by running this command :- wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

Install DAG’s GPG Key by executing following command:-
rpm – -import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

Verify the package you have downloaded:-
rpm -K rpmforge-release-0.3.6-1.el5.rf.*.rpm

Install the package :-

rpm -i rpmforge-release-0.3.6-1.el5.rf.*.rpm

or if you dont find packages here try some other repositories like rpmfusion, epel hope you will get it..

after this run yum list command if that runs completely
then Intall gcc packages from your RHEL CD/DVD or any other repository where gcc packages available.

GCC Packages is must for Mounting NTFS.

After GCC installed

run this command :-

yum -y install fuse fuse-ntfs-3g dkms dkms-fuse

if you are running xen kernel then only run this command

yum install kernel-xen-devel

if you are running PAE kernel then only run this command

yum install kernel-PAE-devel

Now Make Entry in your /etc/fstab file

make backup of your /etc/fstab by executing this command

cp /etc/fstab /etc/fstab.bkp

now open your /etc/fstab file in your favorite editor

vim /etc/fstab like below example

/dev/sda1          /mnt/ntfs      ntfs-3g      defaults       0  0


save & exit from file

Then execute this two commands in exact order

umount -a

mount -a

That’s it. Now You will able to see NTFS by executing df -kh or access your NTFS Volume from your mount point.