Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    input a password at each prompt

    I am about to mass copy files from one server to another with rsync. It will be about 100 user accounts (below is just an example). I suck at shell code. But I am going to put this in a shell script to run. But the problem is after each line it will prompt for the server password. How can I automate this process? I know it would be insecure but it's just a one time thing to run.

    rsync -trl --progress -e ssh /home/scott/Maildir/ scottm&
    rsync -trl --progress -e ssh /home/aaronp/Maildir/ scottm&
    rsync -trl --progress -e ssh /home/allen/Maildir/ scottm&

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2011
    Turtle Island West
    I would probably rsync them all to a local directory and then rsync that directory over the net so I only have to enter the password once.

    Another option would be to temporarily blank the password and restore it after the transfers. Not a good idea.

    Couldn't you rsync /home/*/Maildir or something so you just call rsync once instead of multiple times?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts