rcp and its caveats


Recently while generating new test suites for pNFS I had to make sure ‘rcp‘ was working on both the client and servers.Here is where i hit some problems.
I found a lot of resources online about rcp not working “Even as root user” and set about figuring out the issue.

So here are some changes that are a “MUST” if you need to use rcp.

1.)create/edit ~/.rhosts and add the following
<IP-ADDR> <username>
eg:: 10.0.0.10 root

2.) edit /etc/default/login and comment out the line that reads “CONSOLE=….”

3.) edit /etc/user_attr and change the “type=” section under “root” to “normal” , By default it assumes “role”

4.) svcadm enable svc:/network/login:rlogin
svcadm enable svc:/network/shell:default

Do this on both client and server and your good to go.

PS:: rcp is a dangerous protocol to use as it sends password in “plain text” . Unless  under a NAT or have a local network I would highly discourage anyone to use this protocol as you have better substitutes in the from of “ssh” or better yet –> “rsync”

Cheers 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s