Feb 28, 2012

Mount Windows Share in Linux


Mount Windows Share in Linux

Release:
RedHat Enterprise Linux
SUSE Linux
AIX 5.3
Windows Server 2003

Problem:
Need to mount the windows share in the Linux Server using the CIFS.

Solution:

In RHEL:

            Mount Windows partition in RHEL using the below command

                        # mount -t cifs -o username=administrator,password='XXXXXX' //172.16.1.50/files /mnt

            By default windows share mounted with the full permission (777) in Linux. If u want to change the default permission use the “dir_mode” and “file_mode” options to set directory and file permission.

                        # mount -t cifs -o username=administrator,password='XXXXXX',dir_mode=0755,file_mode=0755 //172.16.1.50/files /mnt

Where,
/mnt – mount point name
//172.16.1.50/files – share folder name with server IP address


In SUSE Linux:

            Mount windows partition in SUSE Linux using the below command

                        # mount -t smbfs -o username=administrator,password='XXXXXX' //172.16.1.50/files /mnt


In AIX:

            Mount the windows partition in AIX using the below command

                        # mount -v cifs -n serverip/username/password -o wrkgrp=domain,fmode=755 /sharename /localmountpoint

Example:

                        # mount -v cifs -n 172.16.1.50/administrator/XXXXXX -o wrkgrp=domainname,fmode=755 /files /mnt



6 comments:

tuxthink said...

That was use ful info, thanks for sharing it.

Anonymous said...

Gracias Amigo!!

Unknown said...

Thanks dude!

Anonymous said...

Most Appreciated I struggled sharing an external raid array from windoze to Linux. The above command worked great.

DigimonDigitizer said...

This is the best, the fastest and easiers tut... Thanks Bro!

Unknown said...

You note about RHEL and the dir_mode directive saved me just now. Thanks for posting this!