LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Closed Thread
 
Search this Thread
Old 04-08-2008, 10:58 PM   #1
Linuxfan0001
Member
 
Registered: Apr 2008
Posts: 47

Rep: Reputation: 15
share a windows folder in Linux


i want to copy some files from Linux folder to a folder in windows using scp command
but every time i try to execute scp command:
scp /root/common/sample.cpp 'user@172.20.104.16:d:/test'
it connects to the remote machine and doesnot allow to copy sample.cpp from Linux m/c to test folder on windows....
Please let me know how to share a windows folder or give read/write rights to a Linux user...
Thanks
 
Old 04-09-2008, 12:58 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
Old 04-09-2008, 01:02 AM   #3
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 4&5, Fedora 10, CentOS 5.4, IPCop
Posts: 569

Rep: Reputation: 55
If /test on your Windows machine is shared, then mount it on the Linux machine - like mapping a Windows share to a drive letter like M:.

To do this, use a command like this:-
Code:
mount -t cifs -o credentials=/etc/samba/cred.txt //winPC/test /tmp/test
This command will mount the Windows share to /tmp/test on my Linux box. I can now copy files from the Linux filesystems to /tmp/test, which is really the Windows share. Make sure the directory /tmp/test exists before you perform the mount. Also, only root can perform the mount command.

The file /etc/samba/cred.txt contains authentication data for the winPC computer:-
Code:
username=administrator
password=xxxxx
Change "administrator" and "xxxxx" to whatever makes sense for your Windows share.

The mount command refers to //winPC/FaxReceived. These are the server and share names for your Windows PC and shared directory. Make sure that your Linux machine can resolve the name ("winPC" in my case) to an IP address. If you don't have winPC in your host table, then replace "winPC" with the IP address of the Windows PC.
 
Old 04-09-2008, 01:21 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
Follow-ups to
http://www.linuxquestions.org/questi...chines-633628/
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share Linux Folder to Windows chuchsn Linux - Newbie 5 04-04-2008 08:24 AM
how to accessing windows share folder from Linux Machine imughal Linux - Newbie 1 02-29-2008 01:49 AM
share folder on Linux to Windows ashley75 Linux - General 3 06-10-2005 04:12 PM
writing windows share folder boToo Linux - Newbie 2 06-09-2005 10:30 AM
creating a share folder and open it with windows me dhorn Linux - Networking 1 01-17-2004 09:25 AM


All times are GMT -5. The time now is 12:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration