From owner-freebsd-questions Fri Aug 31 7:29:25 2001 Delivered-To: freebsd-questions@freebsd.org Received: from web.cs.ndsu.nodak.edu (web.cs.ndsu.NoDak.edu [134.129.125.7]) by hub.freebsd.org (Postfix) with ESMTP id 7B96637B406 for ; Fri, 31 Aug 2001 07:29:22 -0700 (PDT) Received: (from tinguely@localhost) by web.cs.ndsu.nodak.edu (8.11.4/8.11.4) id f7VETJT57532; Fri, 31 Aug 2001 09:29:19 -0500 (CDT) (envelope-from tinguely) Date: Fri, 31 Aug 2001 09:29:19 -0500 (CDT) From: mark tinguely Message-Id: <200108311429.f7VETJT57532@web.cs.ndsu.nodak.edu> To: mariodoria@yahoo.com, questions@FreeBSD.ORG Subject: RE: Remote dumps Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG rdump only requires root access to open the restricted network port. setuid the rdump application and using a non-privileged user will close some of the root to root access sharing. If the setuid opens too large of a concern, a modification of the rdump code to lower the privilege after the socket has been opened should close any holes. for example a machine to be backed up named "backme" and a machine with a tape drive named "gotdrive". on backme: this can be done in cron or sudo command before backup and reset after dump # chmod 4750 /sbin/rdump # chmod 664 /etc/dumpdates # chown root.backup /sbin/rdump # chown backup.backup /etc/dumpdates # chgrp backup /dev/da0s1[afe] # SCSI example # cp ~backup/rhosts ~backup/.rhosts # or .ssh/known_hosts on gotdrive: this can be done in cron or sudo command before backup and reset after dump # chown backup.backup /dev/nrsa0 # cp ~backup/rhosts ~backup/.rhosts # or .ssh/known_hosts from cron/command line of the backup account on gotdrive: #!/usr/local/bin/bash case `date| awk '{print $3}'` in 1 | 2 | 3 | 4 | 5 | 6 | 7) level=0;; 8 | 9 | 10 | 11 | 12 | 13 | 14) level=1;; 15 | 16 | 17 | 18 | 19 | 20 | 21) level=2;; 22 | 23 | 24 | 25 | 26 | 27 | 28) level=1;; 29 | 30 | 31) level=2;; esac # uncomment below to force a full backup #level=0 echo "dumping host: backme" echo "backme.DOMAIN remtape" > .rhosts /usr/bin/rsh -n backme /sbin/rdump ${level}usdf 39400 61000 gotdrive:/dev/rsa0 /dev/rda0s1a sleep 5 /usr/bin/rsh -n backme /sbin/rdump ${level}usdf 39400 61000 gotdrive:/dev/nrsa0 /dev/rda0s1e sleep 5 /usr/bin/rsh -n backme /sbin/rdump ${level}usdf 39400 61000 gotdrive:/dev/nrsa0 /dev/rda0s1f rm -f .rhosts To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message