• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Please help me make a Linux script

Shaka

Senior member
Hi,

To access a service in Unix, I have to type:

rlogin 128.97.xxx.xxx ?l app

(the -l is lower case L and not the number "1&quot😉

Is there someway I can make a batch file of sorts and just execute it so I don't have to remember that ip? Thanks.
 
1) you should never publish anywere the ip of a box running rlogin that is accessable from the internet.

2) yes you can do it, but you don't need a 'batch' command. you should alias that command line to something simpler such as rlwork. you don't mention your shell. If you're using bash alias is a built in and you can simply

alias rlwork='rlogin ipaddress -l app'
 
Whoops, sorry about posting that IP. I was being too naive.

Well, I tried typing in the alias command, and it didn't give me an error, but it said command not found afterwords.

How do I find out what shell I am using. Sorry for being such a Unix newbie.
 
you could do this:
- create a file called rlog.sh containing:

#!/bin/sh
rlogin 128.97.xxx.xxx ?l app

- Then make the file executable using
chmod u+x rlog.sh
 
you can find your shell by typing echo $SHELL, and it should return one of the following:

/bin/bash --> Bash Shell (also called Bourne Again Shell)
/bin/sh --> Bourne Shell
/bin/ksh --> Korn Shell
/bin/csh --> C-shell
/bin/tcsh --> Enhanced C-shell

Sometimes it might show as something like /usr/local/bin/bash but that would be the same shell that /bin/bash is (even though it's not in the same directory).

There are other shells such as the POSIX shell and whatnot but the ones I've listed are the most common types of shells out there.

If you are new to Linux/Unix and want to find out more I strongly recommend O'Reilly books, which you can find at most bookstores like Borders or Barnes & Nobles, or can find at their site www.oreilly.com.
 
Hmm... it says permission denied. That sucks.

Ahh, it's C-shell. I guess that will be good to know in the future. I will check out those O'Reilly books. Thanks everyone!
 
If you're running a C-shell, you can just put something like the following in your .cshrc file (in your home directory):

alias rlw 'rlogin 128.97.xxx.xxx -l app'
 
Home directory? The thing is, I telnet into a unix system (not that rlogin one). Then I use rlogin 128.XXX.XXX.XXX to get to the other system. The second system is the one I want to write an alias for. When I first telnet into the 1st system, I end up in a personal directory. I can only manipulate/create/delete files in my personal directory. I don't think I have priveleges to modify anything anywhere else. This is probably why I get permission denied. But I really have no clue... I think I'll ask some of the people who run the system. Thanks for all your help guys!
 
DO NOT run rlogin, that stupid program has SO many vulnerabilities it isn't even funny. You have a box with rlogin open to the net and you will have it rooted within a month, especially considering you posted the IP here.
 
ssh2 should replace both rlogin and telnet (ssh has a bunch of security problems). Of course, not everyone can ssh for some reason or another, and in those times telnet is much better than rlogin.
 
Supergax

ssh2 has problems also. you should keep up to date no matter what version you're using. I personally prefer OpenSSH since the license is MUCH more to my liking.
 
Back
Top