Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUSE 9 Running a script 1

Status
Not open for further replies.

rphips

IS-IT--Management
Sep 12, 2003
590
US
Hello Everyone,

I am only a novice in Linux (no very little) but it seems that this is a simple problem.

I have SSH and Apache loaded and my company wants to uses this as a DMZ server - the problem is -

I have set up a user (only one needed) that needs to execute a 1 line script that Telnets to a interal IP address - I tried several directories to but the script in but they do not work - does anybody know where this script goes ad how to execute it?

thanks


bob

"ZOINKS !!!!!"

Shaggy

 
It can go anywhere the user has permission. In this case, perhaps in the user's home directory would be best.

When it "doesn't work", what happens?
 
Sorry I haven't gotten back to you sooner - But I was pulled off this project for a emergency - Originally it wasn't doing anything - when I found out that the root was creating the file and no one had permissions to execute the script - so I moved it to the root directory under shared\applications - and I got it to execute (exept it cannot find Telnet) when I click on it. Now I just need to find Telnet and figure out how to get the script to launch when a user logs in.[banghead] - This is diffently different than what I been trained on - But it is exciting.[2thumbsup]

bob

"ZOINKS !!!!!"

Shaggy

 
You can try "which telnet" to find it; it should be in your path. It's a good idea to always specify the full path to executables in scripts, since you can't always be sure of the user's environment.

To get it to run at login, you can call the script at the end of ~/.profile, or /etc/profile for everyone. You could also probably set it as the use's shell in /etc/passwd:

testuser:x:1005:100::/home/testuser:/usr/local/bin/myscript

This method works, but I'm not sure if it's the best idea.
 
Thanks
I will give it a shot

Let you know what happened soon


bob

"ZOINKS !!!!!"

Shaggy

 
Back again and wanted to thank you for your help

works great



bob

"ZOINKS !!!!!"

Shaggy

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top