Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
995 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  Débats

  Commande rsh et Linux

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Commande rsh et Linux

n°198376
DavidUL
Posté le 03-12-2002 à 16:59:07  profilanswer
 

Lorsque je lance par exemple :
rsh nom_de_ma_machine ls
j'ai ce message en reponse :
Permission denied.
 
kelkun peut-il m'aider ?
 
j'ai la redhat 8.0

mood
Publicité
Posté le 03-12-2002 à 16:59:07  profilanswer
 

n°198378
superX
Posté le 03-12-2002 à 17:00:33  profilanswer
 

fais voir un cat de /etc/hosts.allow et hosts.deny de la machine cible

n°198379
leirn
A.D.I.D.A.S.
Posté le 03-12-2002 à 17:01:25  profilanswer
 

superX a écrit a écrit :

fais voir un cat de /etc/hosts.allow et hosts.deny de la machine cible




 
voir aussi si ya bien un prog ki attend la connection de l'autre coté


---------------
"Je brandirai une épée d'orichalque, je m'assouvirai sur des Templiers." | "Avec dans son sillage l'Ombre du Diable, Leirn appelait les morts pour une danse macabre et déchainaît les horreurs de la nuit..."
n°198380
DavidUL
Posté le 03-12-2002 à 17:03:16  profilanswer
 

j'ai oublié de dire ke ça me le fait aussi en local et en root !
 
sinon j'ai ça dans le hosts.allow :
 
ALL: (IP de la machine où je veux executer mon rsh)
 
et rien dans le hosts.deny


Message édité par DavidUL le 03-12-2002 à 17:03:42
n°198381
DavidUL
Posté le 03-12-2002 à 17:04:16  profilanswer
 

Leirn a écrit a écrit :

 
 
voir aussi si ya bien un prog ki attend la connection de l'autre coté



c'est à dire ? :??:

n°198382
superX
Posté le 03-12-2002 à 17:04:22  profilanswer
 

Leirn a écrit a écrit :

 
 
voir aussi si ya bien un prog ki attend la connection de l'autre coté




 
vi aussi.  
 
ainsi que l'user sous lequel il tente et verifier dans le $home cible s'il y a un .rhosts  etc..

n°198384
superX
Posté le 03-12-2002 à 17:04:39  profilanswer
 

DavidUL a écrit a écrit :

c'est à dire ? :??:  




 
t'es sur qu'rshd tourne sur la machine cible ?

n°198385
DavidUL
Posté le 03-12-2002 à 17:06:10  profilanswer
 

superX a écrit a écrit :

 
 
vi aussi.  
 
ainsi que l'user sous lequel il tente et verifier dans le $home cible s'il y a un .rhosts  etc..



ba oui pour le root j'ai crée un fichier ".rhosts" dans /root/ avec ça :
root nom_de_ma_machine

n°198386
cypress
La colline de cyprès
Posté le 03-12-2002 à 17:06:49  profilanswer
 

Euh normalement c le fichier $HOME/.rhosts qui fixe les autorisations non ?


---------------
Savoir c'est vivre, et maintenir dans l'ignorance c'est presque un homicide
n°198387
superX
Posté le 03-12-2002 à 17:06:57  profilanswer
 

en root ?   mouais ....  
 
et un .rhost c'est <host> <user> et nom l'inverse

mood
Publicité
Posté le 03-12-2002 à 17:06:57  profilanswer
 

n°198388
superX
Posté le 03-12-2002 à 17:07:10  profilanswer
 

cypress a écrit a écrit :

Euh normalement c le fichier $HOME/.rhosts qui fixe les autorisations non ?




 
ya aussi /etc/hosts.equiv

n°198389
DavidUL
Posté le 03-12-2002 à 17:08:00  profilanswer
 

superX a écrit a écrit :

 
 
t'es sur qu'rshd tourne sur la machine cible ?



normalement oui je l'ai mis au demarage avec la commande "ntsysv" et j'ai redemaré, mais si tu connais un moyen de verifier je veux bien

n°198390
superX
Posté le 03-12-2002 à 17:08:46  profilanswer
 

DavidUL a écrit a écrit :

normalement oui je l'ai mis au demarage avec la commande "ntsysv" et j'ai redemaré, mais si tu connais un moyen de verifier je veux bien




 
netstat -tlu
nmap toto
 
grep rshd /etc/inetd.conf (si c'est inetd :D )

n°198391
DavidUL
Posté le 03-12-2002 à 17:10:35  profilanswer
 

superX a écrit a écrit :

en root ?   mouais ....  
 
et un .rhost c'est <host> <user> et nom l'inverse



ça me le fais tjrs... :/

n°198392
DavidUL
Posté le 03-12-2002 à 17:11:19  profilanswer
 

superX a écrit a écrit :

 
 
ya aussi /etc/hosts.equiv



j'ai pas ça :??:

n°198393
superX
Posté le 03-12-2002 à 17:11:55  profilanswer
 

DavidUL a écrit a écrit :

ça me le fais tjrs... :/




 
fais voir un netstat -tlu | grep shell
 
et evite root pour tester rsh, fais le plutot sous un user
 


Message édité par superX le 03-12-2002 à 17:12:21
n°198394
DavidUL
Posté le 03-12-2002 à 17:15:27  profilanswer
 

superX a écrit a écrit :

 
 
netstat -tlu
nmap toto
 
grep rshd /etc/inetd.conf (si c'est inetd :D )




 
pour le netstat -tlu :

Code :
  1. Connexions Internet actives (seulement serveurs)
  2. Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat     
  3. tcp        0      0 *:exec                  *:*                     LISTEN     
  4. tcp        0      0 *:32768                 *:*                     LISTEN     
  5. tcp        0      0 GBR1477:32769           *:*                     LISTEN     
  6. tcp        0      0 *:login                 *:*                     LISTEN     
  7. tcp        0      0 *:shell                 *:*                     LISTEN     
  8. tcp        0      0 *:swat                  *:*                     LISTEN     
  9. tcp        0      0 *:netbios-ssn           *:*                     LISTEN     
  10. tcp        0      0 *:sunrpc                *:*                     LISTEN     
  11. tcp        0      0 *:x11                   *:*                     LISTEN     
  12. tcp        0      0 *:http                  *:*                     LISTEN     
  13. tcp        0      0 *:ssh                   *:*                     LISTEN     
  14. tcp        0      0 *:telnet                *:*                     LISTEN     
  15. tcp        0      0 GBR1477:smtp            *:*                     LISTEN     
  16. tcp        0      0 *:https                 *:*                     LISTEN     
  17. udp        0      0 *:32768                 *:*                               
  18. udp        0      0 GBR1477:32769           *:*                               
  19. udp        0      0 gbr1477.pah:netbios-ns  *:*                               
  20. udp        0      0 *:netbios-ns            *:*                               
  21. udp        0      0 gbr1477.pah:netbios-dgm *:*                               
  22. udp        0      0 *:netbios-dgm           *:*                               
  23. udp        0      0 *:sunrpc                *:*


 
nmap GBR1477
 

Code :
  1. Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
  2. Interesting ports on GBR1477 (127.0.0.1):
  3. (The 1589 ports scanned but not shown below are in state: closed)
  4. Port       State       Service
  5. 22/tcp     open        ssh                   
  6. 23/tcp     open        telnet                 
  7. 25/tcp     open        smtp                   
  8. 80/tcp     open        http                   
  9. 111/tcp    open        sunrpc                 
  10. 139/tcp    open        netbios-ssn           
  11. 443/tcp    open        https                 
  12. 512/tcp    open        exec                   
  13. 513/tcp    open        login                 
  14. 514/tcp    open        shell                 
  15. 901/tcp    open        samba-swat             
  16. 6000/tcp   open        X11                   
  17. Nmap run completed -- 1 IP address (1 host up) scanned in 2 seconds


 
jvois pas de rsh :/

n°198395
superX
Posté le 03-12-2002 à 17:15:42  profilanswer
 

root est refusé : je viens de tester.  
 
utilise un user pour faire ça ;)

n°198397
superX
Posté le 03-12-2002 à 17:16:35  profilanswer
 

DavidUL a écrit a écrit :

 
 
pour le netstat -tlu :

Code :
  1. Connexions Internet actives (seulement serveurs)
  2. Proto Recv-Q Send-Q Adresse locale          Adresse distante        Etat     
  3. tcp        0      0 *:exec                  *:*                     LISTEN     
  4. tcp        0      0 *:32768                 *:*                     LISTEN     
  5. tcp        0      0 GBR1477:32769           *:*                     LISTEN     
  6. tcp        0      0 *:login                 *:*                     LISTEN     
  7. tcp        0      0 *:shell                 *:*                     LISTEN     
  8. tcp        0      0 *:swat                  *:*                     LISTEN     
  9. tcp        0      0 *:netbios-ssn           *:*                     LISTEN     
  10. tcp        0      0 *:sunrpc                *:*                     LISTEN     
  11. tcp        0      0 *:x11                   *:*                     LISTEN     
  12. tcp        0      0 *:http                  *:*                     LISTEN     
  13. tcp        0      0 *:ssh                   *:*                     LISTEN     
  14. tcp        0      0 *:telnet                *:*                     LISTEN     
  15. tcp        0      0 GBR1477:smtp            *:*                     LISTEN     
  16. tcp        0      0 *:https                 *:*                     LISTEN     
  17. udp        0      0 *:32768                 *:*                               
  18. udp        0      0 GBR1477:32769           *:*                               
  19. udp        0      0 gbr1477.pah:netbios-ns  *:*                               
  20. udp        0      0 *:netbios-ns            *:*                               
  21. udp        0      0 gbr1477.pah:netbios-dgm *:*                               
  22. udp        0      0 *:netbios-dgm           *:*                               
  23. udp        0      0 *:sunrpc                *:*


 
nmap GBR1477
 

Code :
  1. Starting nmap V. 3.00 ( www.insecure.org/nmap/ )
  2. Interesting ports on GBR1477 (127.0.0.1):
  3. (The 1589 ports scanned but not shown below are in state: closed)
  4. Port       State       Service
  5. 22/tcp     open        ssh                   
  6. 23/tcp     open        telnet                 
  7. 25/tcp     open        smtp                   
  8. 80/tcp     open        http                   
  9. 111/tcp    open        sunrpc                 
  10. 139/tcp    open        netbios-ssn           
  11. 443/tcp    open        https                 
  12. 512/tcp    open        exec                   
  13. 513/tcp    open        login                 
  14. 514/tcp    open        shell                 
  15. 901/tcp    open        samba-swat             
  16. 6000/tcp   open        X11                   
  17. Nmap run completed -- 1 IP address (1 host up) scanned in 2 seconds


 
jvois pas de rsh :/  




 
 
 
rsh c'est "shell" dans le 1er tableau
et c'est encore "shell" dans le second.  
 
ton service tourne mais root est refusé (cf msg precedent )

n°198399
DavidUL
Posté le 03-12-2002 à 17:20:19  profilanswer
 

superX a écrit a écrit :

root est refusé : je viens de tester.  
 
utilise un user pour faire ça ;)



meme ! :/
 
et pourtant dans son $HOME ya bien un fichier .rhosts avec :
nom_de_la_machine login

n°198401
superX
Posté le 03-12-2002 à 17:23:42  profilanswer
 

DavidUL a écrit a écrit :

meme ! :/
 
et pourtant dans son $HOME ya bien un fichier .rhosts avec :
nom_de_la_machine login




 
fais voir un tail /var/log/messages de la machine cible stp

n°198406
superX
Posté le 03-12-2002 à 17:27:17  profilanswer
 

DavidUL a écrit a écrit :

meme ! :/
 
et pourtant dans son $HOME ya bien un fichier .rhosts avec :
nom_de_la_machine login




 
loin de vouloir etre insolent mais c'est bien dans le $home de la machine cible que tu parametres un .rhosts ?

n°198411
DavidUL
Posté le 03-12-2002 à 17:31:55  profilanswer
 

superX a écrit a écrit :

 
 
fais voir un tail /var/log/messages de la machine cible stp




j'ai ça :
 

Code :
  1. Dec  3 17:32:54 GBR1477 pam_rhosts_auth[1021]: denied to haugueld@GBR1477 as haugueld: .rhosts writable by other!
  2. Dec  3 17:32:54 GBR1477 in.rshd[1021]: rsh denied to haugueld@GBR1477 as haugueld: Permission denied.


(haugueld c'est mon utilisateur et GBR1477 ma machine)
pourtant j'ai fé un ls -l .rhosts :
 

Code :
  1. -rwxrwxrwx    1 haugueld haugueld       17 déc  3 17:32 .rhosts


 
 :/

n°198414
superX
Posté le 03-12-2002 à 17:33:13  profilanswer
 

pour commencer :  
 
chmod go-rwx .rhosts

n°198415
DavidUL
Posté le 03-12-2002 à 17:33:15  profilanswer
 

superX a écrit a écrit :

 
 
loin de vouloir etre insolent mais c'est bien dans le $home de la machine cible que tu parametres un .rhosts ?



oui oui lol  ;)  
 
dans /home/haugueld

n°198416
superX
Posté le 03-12-2002 à 17:33:48  profilanswer
 

quoique ....  
 
chmod u+rw-x,go+r-wx .rhosts

n°198417
DavidUL
Posté le 03-12-2002 à 17:35:10  profilanswer
 

superX a écrit a écrit :

pour commencer :  
 
chmod go-rwx .rhosts  



ça marche grace à ça !!!
 
franchement 1000 merci ! :bounce:  
 
vraiment sympa  :)  
 
elle a fait quoi ta commande ? :??:

n°198418
superX
Posté le 03-12-2002 à 17:36:23  profilanswer
 

elle change les permissions sur le fichier (man chmod )
 
bon , ca marche ouf ! ;)

n°198420
DavidUL
Posté le 03-12-2002 à 17:38:06  profilanswer
 

superX a écrit a écrit :

elle change les permissions sur le fichier (man chmod )
 
bon , ca marche ouf ! ;)



ah oki c'est un chmod 700
 
encore merci  ;)

n°198424
superX
Posté le 03-12-2002 à 17:40:50  profilanswer
 

DavidUL a écrit a écrit :

ah oki c'est un chmod 700
 
encore merci  ;)  




 
pour moi c'est plus simple de lire <u>ser , <g>roup , <o>ther avec des - et des + sur les droits (r,w,x)  qu'un 700 ;)

mood
Publicité
Posté le   profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  Débats

  Commande rsh et Linux

 

Sujets relatifs
Commande pour connaitre la version de linux[LINUX] il existe une commande qui test si une variable est numeric?
commande des pid sous linux[Linux] commande NOHUP
[LINUX] Commande pour executer des opérations de base(+,-,*,/)?[IDEE] commande groupée d'habits linux
Linux: commande ftp[linux] "commande raccourci" ou "alias"...
Y a t il une commande pour avoir l ip d'une machine ss linux ?PB URGENT sur ligne de commande LINUX !!!
Plus de sujets relatifs à : Commande rsh et Linux


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR