On 8/25/06, Andreas Kahari <[EMAIL PROTECTED]> wrote:
What user is actually executing the script in the two instances?
I have two laptops backing up to host rice 4.0. I have an ethant account on both laptops, corn 3.8, and grits, 3.9. I'm running the same script from both laptops with just the target directory different and both with ethant using sudo. So I'm very confused on why I get two different outcomes. Greg > If it's you (ethant?) in the first but root in the second, I'm not
surprised it fails if the server is denying root ssh logins (which it should do). Andreas On 25/08/06, Greg Thomas <[EMAIL PROTECTED]> wrote: > I've got a little backup script piping dump to ssh to my backup server > rice, and I've got my keys setup: > > ============================================= > [EMAIL PROTECTED]:/home/ethant# uname -a > OpenBSD grits 3.9 GENERIC#107 i386 > [EMAIL PROTECTED]:/home/ethant# ssh rice > Last login: Fri Aug 25 00:14:42 2006 from grits > OpenBSD 4.0-beta (GENERIC) #1083: Mon Aug 21 21:24:02 MDT 2006 > > Welcome to OpenBSD: The proactively secure Unix-like operating system. > > Please use the sendbug(1) utility to report bugs in the system. > Before reporting a bug, please try to reproduce it with the latest > version of the code. With bug reports, please try to ensure that > enough information to reproduce the problem is enclosed, and if a > known fix for it exists, include that as well. > > [EMAIL PROTECTED]:/home/ethant# > ============================================== > > Likewise, if I run the script from the command line I'm not prompted > for a password: > > [EMAIL PROTECTED]:/home/ethant# sudo /sbin/dump -0auf - /dev/rwd0a | gzip | \ > > ssh [EMAIL PROTECTED] "cat > /grits/$(date "+%Y%m%d")_root.dump.gz" > DUMP: Date of this level 0 dump: Fri Aug 25 00:21:08 2006 > DUMP: Date of last level 0 dump: the epoch > DUMP: Dumping /dev/rwd0a (/) to standard output > DUMP: mapping (Pass I) [regular files] > DUMP: mapping (Pass II) [directories] > DUMP: estimated 39523 tape blocks. > DUMP: Volume 1 started at: Fri Aug 25 00:21:08 2006 > DUMP: dumping (Pass III) [directories] > DUMP: dumping (Pass IV) [regular files] > ================================================ > > But when I run this simple script (an almost identical copy of which > is working fine on another laptop with 3.8 installed, the only > difference is the path to the dump) I get prompted for my password: > > [EMAIL PROTECTED]:/home/ethant# cat test.sh > #!/bin/sh > /sbin/dump -0auf - /dev/rwd0a | gzip | \ > ssh [EMAIL PROTECTED] "cat > /grits/$(date "+%Y%m%d")_root.dump.gz" > > [EMAIL PROTECTED]:/home/ethant# sudo test.sh > DUMP: Date of this level 0 dump: Fri Aug 25 00:23:42 2006 > DUMP: Date of last level 0 dump: the epoch > DUMP: Dumping /dev/rwd0a (/) to standard output > DUMP: mapping (Pass I) [regular files] > DUMP: mapping (Pass II) [directories] > DUMP: estimated 39523 tape blocks. > DUMP: Volume 1 started at: Fri Aug 25 00:23:42 2006 > DUMP: dumping (Pass III) [directories] > DUMP: dumping (Pass IV) [regular files] > [EMAIL PROTECTED]'s password: > > What am I doing wrong? > > Thanks, > Greg > > -- Andreas Kahari Somewhere in the general Cambridge area, UK