1823415 Members
2447 Online
109655 Solutions
New Discussion юеВ

How to enable rcp...

 
Hoang Chi Cong_1
Honored Contributor

How to enable rcp...

Hi gurus,
I have a question, can anyone give me solutions?
I want to disable rlogin service to prevent unauthorize user between some systems (HP-UX 11.i) but allow user using rcp command to remote copy files and directories.
In normal case, I have to add "server user" in .rhosts file to enable rlogin. Then user can use rcp service.
But if I remove it from .rhosts to prevent rlogin service, users can not use rcp service :-(

How to solve this thing?
Any answer will much appreciated!
Looking for a special chance.......
5 REPLIES 5
Luk Vandenbussche
Honored Contributor

Re: How to enable rcp...

rcp works only between trusted hosts.
So you need .rhosts or /etc/hosts.equiv

If you remove it, it wont work
Orhan Biyiklioglu
Respected Contributor

Re: How to enable rcp...

One way should be disabling the rlogind service from inetd.conf while leaving the remshd enabled.

#login stream tcp6 nowait root /usr/lbin/rlogind rlogind
shell stream tcp6 nowait root /usr/lbin/remshd remshd


inetd -c


This will disable rlogin,but the users will still be able to use remsh to invoke commands on the server.

hth
Muthukumar_5
Honored Contributor

Re: How to enable rcp...

.rhosts and /etc/hosts.equiv is unique for r* commands like rlogin, rexec, remsh and rcp. You can do one exception on rlogin to control login then,

In remote machine's /etc/profile check for rlogind as,
ps| grep -q 'rlogin'
if [ ${?} -eq 0 ]
then
# Local passwd authentication check
telnet
fi

rcp will work normally.

-Muthu
Easy to suggest when don't know about the problem!
Hoang Chi Cong_1
Honored Contributor

Re: How to enable rcp...

Hi
I have found my own solution:
Just add one more line in /var/adm/inetd.sec file:
login allow (or deny)

It works now :)
My system is not in trusted mode.

Thanks you all,
Hoang Chi Cong
Looking for a special chance.......
VIKAS AGRAWAL
Frequent Advisor

Re: How to enable rcp...

just try to hash the login etries of rlogind services from /etc/inetd.conf

vikas