Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-05-2005, 09:36 PM   #1
Registered: Sep 2005
Posts: 850

Rep: Reputation: 30
Smbclient copy from Linux to windows

Guys, is there a way to copy file from Linux to a shared folder in Windows?

I tried using the smbclient and have successfuly logged-in without a password. However, I like to include the it in crontab in such a way that it will copy the /home/users directory to windows shared folder without being prompted by a password. Hope you can help me on this. Thanks
Old 10-06-2005, 04:33 AM   #2
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
How about mounting that Windows-share in your Linux?
Put this in /etc/fstab:
//servername/sharename       /mountpoint        cifs    noauto,user,username=pingu,passwd=xxxx,gid=501,uid=501,iocharset=iso8859-15
If you want it done automatically at bootup, change "noauto" to "auto"
Now those "uid=,gid=,iocharset=" are appropriate for me. It makes my Linux-user own the directory and uses my Swedish characterset.
Another possibility is making a script, I had this in/usr/local/sbin/localmount:
mount -t cifs -o credentials=/usr/local/etc/me -o uid=501 -o gid=501 //servername/sharename       /mountpoint/
And a file only readable by root(!) /usr/local/etc/me with two lines:
Then run 'localmount' when I want it mounted (with $PATH set, of course) or add a link in /etc/rc#.d/ to execute the localmount script at bootup.

All you need do then is a normal copy-operation, could easily put that in crontab.
Old 12-17-2009, 06:37 AM   #3
LQ Newbie
Registered: Sep 2009
Posts: 22

Rep: Reputation: 15
I also have the same goal.
I want to copy data from linux machine to windows.
I m using smbclient.
But how to proceed further.
I want to do this without a password.
Please reply
Old 12-18-2009, 07:59 AM   #4
Registered: Sep 2005
Posts: 850

Original Poster
Rep: Reputation: 30
Try mapping the drive to Windows. There is an option in Windows where you can map it using a specific username and password. You will need to key in the password once and it will stay alive unless you restart your machine.
Old 01-02-2010, 04:01 PM   #5
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
this is how I mapped to my windows share:

smbmount //WinSrv_Name/sharename /mnt/folder -o username=userid,workgroup=your_domain,password=xxxxx,rw,gid=550,dmask=770


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
smbclient copy problem (cant stat file...) taiwf Linux - Networking 6 08-01-2005 05:27 PM
Linux to windows file copy... Wha?Where? Linux - Newbie 1 07-12-2005 10:41 AM
Copy Files using smbclient Lilupa Linux - General 2 10-21-2004 12:14 AM
accessin windows shares from linux (smbclient) talkinggoat Linux - Networking 1 01-10-2004 11:28 PM
can i copy windows contents into linux gurpreetpall Linux - General 5 03-20-2002 03:23 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:31 AM.

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