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