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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a script under a different user using 'become'

Status
Not open for further replies.

bigbalbossa

Programmer
Mar 21, 2002
87
US
I have a txt file containing a list of filenames (with full path) that need to be deleted from a server. Currently, i have to manually run a delete script as user 'xyz' using the become command on linux:

roc01[phase1]:/u02/Code> become xyz
dug's Password:

***manually enter my password, then run the script.

Is it possible to automate this? I can't seem to find anything on the web about 'become', and i don't have 'su' or 'sudo' access.

Thanks
 
are you connecting via telnet? Net::Telnet has an excellent "expect" type of interface to it, or ... just use expect.


Travis

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top