Results 1 to 3 of 3
Hello all! Not sure if this qualifies as a "newbie" post, but I can't yet call myself a pro so I'll set it here. I have a Linux machine here ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-28-2012 #1
Mount, rsync, dismount. Backing up a windows share
I have a Linux machine here at home that I use as a file server. My main computer is a Windows machine. Naturally, I installed samba on the Linux machine so that I can share the files with the Windows machine.
What I want to do is write a script (my first script) that will backup all my music on my Windows machine every night. I do not, however, want the Windows share to always be mounted to the Linux machine. I want the script to mount the share, run the rsync to the directory of my choosing, and dismount the share.
So the first thing I thought was just to write the three commands and throw it in the daily crontab. BUT... every time I mount the Windows share to my Linux machine it asks for a password. EVERY time. The Windows share does not have a password for it so I don't know why it is asking for one.
Is there anything y'all suggest I do to overcome this? I'm really stuck at this point. Is there some other way I could do it? I would really like to stick to command line stuff only. I am trying my hardest to stay away from the gui and I know there has to be a way to do this from the command line.
Thanks in advance!
- 10-28-2012 #2
You don't say what distro you are running but you could try sudo crontab -e and give it your password when asked. This should run the cron job with elevated privileges.What do we want?
When do we want 'em?
Doesn't really matter does it!?
The Fifth Continent
- 10-28-2012 #3
sorry, I forgot to mention that the password prompt is not for privileged access to mount, but rather to access the share on the windows machine (which is not protected by a password).
Also, if it matters, I am running Debian