LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-11-2006, 04:23 PM   #1
tiuz
Member
 
Registered: Mar 2006
Distribution: Slackware 14
Posts: 59

Rep: Reputation: 15
rsh connections : rcmd: socket: Permission denied


Hello,
I have two computers running Slackware 10.2 (Kernel 2.6.15.5, SMP Kernel on both computers), these are only connected to each other, so no connection to the internet or any other network. No "firewall" is up on both.
For several reasons i need rsh instead of ssh.
I have configured /etc/inetd.conf to allow rsh:
shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L
login stream tcp nowait root /usr/sbin/tcpd in.rlogind
exec stream tcp nowait root /usr/sbin/tcpd in.rexecd

Then on both computers the same user is set with ~/.rhosts on both computers
Then /etc/hosts.equiv is set on both computers, as well as /etc/hosts.allow which looks like this:
ALL: ALL
(to allow all connections from all hosts)
Again this two computers are only connected to each other via a small 2 port switch.

But when i try rsh rcp etc.. i get
rcmd: socket: Permission denied.

Can anybody tell me what else i could do try etc.. to get it working?
Is there another config file etc...

Thanks,
tiuz
 
Old 03-12-2006, 09:47 AM   #2
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Verify the perms on ~/.rhosts are 600 and owned by the user. man rcmd for details. See if that helps.
 
Old 03-13-2006, 10:52 AM   #3
tiuz
Member
 
Registered: Mar 2006
Distribution: Slackware 14
Posts: 59

Original Poster
Rep: Reputation: 15
~/.rhosts has permissions 600 and is owned by the correct user.
I have been testing around with the iBook later then and i found out that i can do a rsh from the iBook to both of the computers. Then i set up rsh on some old "Noname" Notebook where Slackware 10.2 is running and i can rsh from both "mainboxes" to the noname notebook. But when i try to rsh from one of the mainboxes to the other i still get
rcmd: socket: Permission denied.
 
Old 03-13-2006, 11:08 AM   #4
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
Have you tried removing each of the two mainboxes from each other's /etc/host.equiv? I'm grasping at straws, but maybe stripping the problem down to the minimum number of variables might help. Remove hosts.equiv, remove .rhosts and see if you can login with a password.
 
Old 03-14-2006, 05:58 AM   #5
tiuz
Member
 
Registered: Mar 2006
Distribution: Slackware 14
Posts: 59

Original Poster
Rep: Reputation: 15
I have removed ~/.rhosts and /etc/hosts.equiv on both boxes and i canīt login with a password either.
rcmd: socket: Permission denied is all i get...
Could it be that the package which contains rsh has a bug?
Also i donīt find a "newer" package than the one i have installed for Slackware 10.2
 
Old 03-14-2006, 09:21 AM   #6
jcliburn
Member
 
Registered: Dec 2003
Location: Mississippi, USA
Distribution: Fedora
Posts: 435

Rep: Reputation: 33
I use Fedora 4, and the rshd version I run on my test server is

rsh-server-0.17-29.1.i386.rpm
$NetKit: netkit-rsh-0.17 $
$Id: rshd.c,v 1.25 2000/07/23 04:16:24 dholland Exp $

which is from the fedora-updates repository.

Is each of the mainboxes in the other's /etc/hosts file? The manpage for rcmd seems to imply that gethostbyname() needs to succeed.
 
Old 03-17-2006, 12:41 PM   #7
tiuz
Member
 
Registered: Mar 2006
Distribution: Slackware 14
Posts: 59

Original Poster
Rep: Reputation: 15
After some testing and playing around with it i guess there must be something wrong with the package i have installed, as other hosts expect the second Slackware-box can connect but the outgoing connections to other hosts just donīt work.
I try to get / install a newer version and see if that helps.
 
Old 03-18-2006, 06:05 PM   #8
tiuz
Member
 
Registered: Mar 2006
Distribution: Slackware 14
Posts: 59

Original Poster
Rep: Reputation: 15
Hmm, i reinstalled the package and found out that i can do rsh -l username host as user root but if i try to do this as normal user i get Permission denied, then i checked the permissions for rsh and rlogin which are correct.
 
Old 08-21-2009, 09:21 AM   #9
josuecc
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
rsh in slackware whith root user

Gotten you do rsh with root ?

I have the same need !

Can tell me how to do ?

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Couldn't create socket: Permission denied piforever Fedora 9 12-22-2005 05:52 PM
rsh permission denied eozcan Linux - Security 2 12-07-2004 10:26 AM
rsh:permission denied linux Advanced server 2.1 rajamp Linux - Security 4 02-11-2004 01:33 PM
Permission Denied on a RSH Connection Eluminator Linux - Software 4 11-08-2002 04:06 AM
rsh. Permission denied pedroem Linux - Networking 2 10-09-2002 03:17 AM


All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration