A way to script file transfer from Linux to windows?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
A way to script file transfer from Linux to windows?
I have scripts setup to save critical data files in tarballs and transfer them to one or more computers on my LAN. I've been doing this for years - ever since I lost a hard disk once suddenly. Between Linux system this is easy to do using scp or rsync. My question is this: Is there a way to do this to a Windows machine?
I already have samba set up and can access the Windows machine via smbclient. But nothing I have read indicates any way to automate that process in a script. It seems to require user interaction. Is there a way to run smbclient in a script mode? Or perhaps ftp?
I have ncftp installed. I'll have to look into what it takes to run an ftp server on the Win2k box. Thanks. I take it there's no way to get around the suid root requirement for smbmount? That would be a really slick way to do it. :-)
I think there are also programs that will let you run an scp like server inside windows. Then you could use the scripts that you already have. I looked into this about a year ago and forgot most of what I wanted and concluded that I should just dump windows all together, I do remember that it was rather hard to find though. Good luck!
Thanks, I'll look into that. The situation is rather amusing. Over the years I've discovered that one of the best ways to protect critical data is to copy it to several locations regularly. The machine on my LAN which is best suited for this physically is a dual-boot machine (Win2K/Linux) and I have no control over which the user will be operating at any given time. So, I'm trying to write a script which will detect which is booted and copy to an appropriate directory accordingly. Of course, when its booted in Linux, its trivial. I can tell when its booted in Win2k by a smbstatus call. If there were a way to script the smbmount from a normal user, I would have a solution. I'm not sure I want to use sudo, given all the security warnings (but I am going to look into it further).
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857
Rep:
"sudo" is designed for one thing... to allow normal users to do things that root is usually the only one allowed to do. That's EXACTLY what you are trying to do.
If implemented properly, it should not be a security hole.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.