LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-03-2004, 03:43 AM   #1
ayman.s
LQ Newbie
 
Registered: Apr 2004
Location: Cairo
Posts: 3

Rep: Reputation: 0
Question Plz Help.......


Hello there:

my problem is that i want to rsh to remote server "NETTAPP" without making any one know my root password....
so i wrote a small c code and compile it to get a binary file to run it to do the rsh command.......
that's good but when i do vi this binary file from shell the rsh command appeared with the username and password!!!!!!!!!!!
here is the c code:

int main(void)
{
if(!fork())
system("rsh ip -l usernameassword command> /some/where/file.txt");
return 0;
}


could any body help me that i do not want my root password be appeared any more........

thanks alot
 
Old 04-03-2004, 06:20 AM   #2
fluppi
Member
 
Registered: Oct 2003
Location: Switzerland (Europe)
Distribution: OpenSuSE, RedHat, Knoppix, IRIX + MacOSX
Posts: 198

Rep: Reputation: 31
Yes, use ssh, the secure replacement for rsh !
Your data on the net is encrypted and with your key on the other computer you can login password free !
 
Old 04-03-2004, 07:11 AM   #3
ayman.s
LQ Newbie
 
Registered: Apr 2004
Location: Cairo
Posts: 3

Original Poster
Rep: Reputation: 0
oh no....

hi fluppi:

my goal is to create executable file to rub some rsh commands remotly at certain times using crontab ot "at" command..........
i created that eceutable file by the c code above but the problem is when i open that executable file with vim or kwrite my username and passwd is appeared!!!!!!! i dont know how u can try this code if u unbelieve me...
my q is how can i rewrite this code to do my needed job without this bug.

thanks 4 u.....
 
Old 04-03-2004, 08:43 AM   #4
kev82
Senior Member
 
Registered: Apr 2003
Location: Lancaster, England
Distribution: Debian Etch, OS X 10.4
Posts: 1,263

Rep: Reputation: 51
i just typed out loads of nifty techniques for hiding your password then realised it was pointless because your running another program you need to call exec somewhere so if someone runs strace -f your_program | grep rsh they'll see the entire command line, password and all.

Last edited by kev82; 04-03-2004 at 08:45 AM.
 
  


Reply



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
PLZ, PLZ help - need some info kevmif Linux - General 9 12-17-2007 06:12 AM
plz plz help me regarding route mapping nedian123 Programming 1 07-13-2004 08:17 AM
plz plz solve my route mapping problem nedian123 Linux - Networking 1 07-12-2004 09:41 PM
plz, help me (plz realy ) h4ng4m3 Linux - General 10 08-18-2003 06:07 AM
redhat problems plz plz help sap666 Linux - Newbie 5 07-30-2003 10:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:59 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
Open Source Consulting | Domain Registration