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 |
How about mounting that Windows-share in your Linux?
Put this in /etc/fstab: Code:
//servername/sharename /mountpoint cifs noauto,user,username=pingu,passwd=xxxx,gid=501,uid=501,iocharset=iso8859-15 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: Code:
mount -t cifs -o credentials=/usr/local/etc/me -o uid=501 -o gid=501 //servername/sharename /mountpoint/ Code:
username=pingu All you need do then is a normal copy-operation, could easily put that in crontab. |
Yes
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 |
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.
|
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 |
All times are GMT -5. The time now is 06:18 PM. |