Link to home
Start Free TrialLog in
Avatar of deklinm
deklinmFlag for United States of America

asked on

CentOS and Windows File Server

Is there a way a CentOS server can access a file share hosted on a Windows Domain File Server?
Avatar of arnold
arnold
Flag of United States of America image

Yes, there are two.
One uses Unix Tools on windows (component that can be installed, feature depending on  the os version) and the shares are accessed using NFS (Network File Share)
The other is using samba.

You can would need  to integrate the centos box into the domain using samba and winbind.

Usually the centos box is a file server
ASKER CERTIFIED SOLUTION
Avatar of Vijay Pratap Singh
Vijay Pratap Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is another step by step.
Here's another way with smbclient instead of services for unix.

Install smbclient on Centos/Redhat.
yum install smbclient

List the shares on the remote system
smbclient -l WINDOWS_HOST

Mount the windows share.
/usr/bin/smbclient \\\\WINDOWS_HOST\\SHARE mypasswd


http://www.tldp.org/HOWTO/SMB-HOWTO-8.html
Correction to post 39308674, to list shares it is "-L" -

smbclient -L $host -U username

Open in new window


You can use mount command and include in /etc/fstab on a reboot. As long as you have smbclient installed -
mount -t cifs //$host/$share /tmp/share1 -o username=xxx,passwrd=xxx

Open in new window