Solved rsh and root

I am posting this here, because I want to use rsh along with rdump and rrestore to migrate from my old FreeBSD 8.0 system to my new FreeBSD 10.1 system across my network. If there's a better way, I'm open to suggestions!

Meanwhile, I've searched quite a bit for this, and haven't found it. On Linux, the magic is apparently to add rsh to /etc/securetty but there's no such thing on FreeBSD. Hopefully, it is not compiled into the code!

I have gotten it to work with non-root users, but that would only work if I landed the entire rdump file somewhere and changed owner - I want to pipe this directly from rdump on the old server to rrestore on the new server using rsh - I've done this in the past, and it has worked great. Unfortunately, the server where I got that to work, a FreeBSD 4.3 system, is long gone, so I can't even go looking to see what magic I used. Hopefully, it will still work going from 32-bit to 64-bit. I won't know until I can get something simple like
# rsh elwood date
to work. I've got it to the point where
# rsh -l john elwood date
works, but I really need this to work for root or toor without doing unnatural acts like putting SUID on rdump or something. The documentation on hosts.equiv and .rhosts, and rsh/rlogin/rcp doesn't seem to cover this under either 8.0 nor 10.1.
 
Oh, of course, on my next search, I found it! Never mind. The solution is to add allow_root in /etc/pam.d/rsh on the auth line, in case anyone else needs this!
 
Does it still work on FreeBSD versions through 13 and also for rlogin & rexec (and also w/no password?) I don't agree they're deprecated. Similarly how some use NFS (rather than SSHFS) sometimes only something simple is needed.
 
Back
Top