Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!seismo!umcp-cs!chris From: chris@umcp-cs.UUCP (Chris Torek) Newsgroups: net.unix-wizards Subject: Re: rdump question Message-ID: <2805@umcp-cs.UUCP> Date: Fri, 8-Aug-86 07:22:26 EDT Article-I.D.: umcp-cs.2805 Posted: Fri Aug 8 07:22:26 1986 Date-Received: Sat, 9-Aug-86 07:06:53 EDT References: <2819@brl-smoke.ARPA> Reply-To: chris@maryland.UUCP (Chris Torek) Organization: University of Maryland, Dept. of Computer Sci. Lines: 53 In article <2819@brl-smoke.ARPA> rgoguen@VAX.BBN.COM (Robert J Goguen) writes: >How can I use rdump from A --> B with-out having to create a /.rhosts >on B with A's host name inside it. I want to rdump to A with-out giving >B root access. Those two sentences say very different things; but I gather that you mean you would like to allow another machine to use your tape drive for remote dumps, without allowing that same machine root access to your file system (`... to rdump *from* A'.). To do this, you may need to modify rdump. Find the code that says something like rmtape = rcmd(&rmtpeer, sp->s_port, name, rmtpeeruser, "/etc/rmt", 0); ----------- The fourth argument (`underlined' above) is likely a variable that is always pointing at the string "root", or else the literal string "root". This is, of course, the user name by which the dumping machine must be allowed access to the tape-drive machine. To match rcp, change the code that converts the host name to an `rmtpeer' to read something like this: char *rmtpeeruser; ... char *p, *rindex(); if ((p = rindex(host, '.')) != NULL) { *p++ = 0; rmtpeeruser = p; } else rmtpeeruser = "root"; /* followed by old code */ To match the new 4.3 rcp, use instead char *p, *index(); if ((p = index(host, '@')) != NULL) { *p++ = 0; rmtpeeruser = host; host = p; } else rmtpeeruser = "root"; This seems a better syntax; `rdump f host.some.domain.user' is rather ugly, compared with `rdump f user@host.some.domain'. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1516) UUCP: seismo!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@mimsy.umd.edu