The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to add new paths to $PATH wrapster SUN Solaris 2 06-01-2008 04:46 AM
Spoofing a From Address in SMTP jimthompson UNIX for Dummies Questions & Answers 1 02-28-2008 06:48 AM
create paths alias47 UNIX for Dummies Questions & Answers 4 08-07-2007 09:14 AM
Paths update phpote UNIX for Dummies Questions & Answers 5 07-25-2001 07:57 AM
paths caiohn UNIX for Dummies Questions & Answers 1 01-17-2001 07:35 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-24-2007
fahadsadah fahadsadah is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 3
Spoofing paths.

There is a program that I am trying to run on a shell account. It depends on another program, which I have also copied to the shell account. Both are in my home directory, yet the first program has a different path hardcoded into it, which I cannot use because of permissions problems.

How can I trick the first program into running the second one from a different path?

Last edited by fahadsadah; 12-25-2007 at 04:47 AM.. Reason: typo
  #2 (permalink)  
Old 12-24-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
chroot, but it sounds like alot of overkill.
  #3 (permalink)  
Old 12-25-2007
fahadsadah fahadsadah is offline
Registered User
  
 

Join Date: Dec 2007
Posts: 3
The whole reason I was trying to spoof the path was because I didn't have root - are there any alterenatives that can be run as a standard user please?

Thank you for your help.
  #4 (permalink)  
Old 12-26-2007
ranj@chn ranj@chn is offline Forum Advisor  
Playing with Ubuntu Now!
  
 

Join Date: Oct 2005
Location: Chennai
Posts: 365
modify PATH

Try modifying the PATH variable. if you are calling script2 from script1 like this
Code:
$> cat script1.sh
#!/bin/ksh
export PATH=/some/user/dir
script2.sh args
then, changing PATH wont be a solution. If the PATH is not set in the script1.sh before calling script2.sh like
Code:
$> cat script1.sh
#!/bin/ksh
script2.sh args
then try this
Code:
$> export PATH=.:$PATH
$> which script2.sh -->check if this is pointing to the correct script
$> script1.sh --> this should call the required script2.sh
I hope I understood the requirement clearly!!!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:15 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0