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

Scripting Switch User 1

Status
Not open for further replies.

olli2003

Technical User
Jan 31, 2003
93
0
0
DE
Hi Gys!
It would be nice to get some suggestions for my problem here. I'd like to execute a command by another user than Root. This should be done by a script. The process within the script must be like this:

ROOT#su - <USER>
USER#ls -ltr /opt/freeware/glitter/*.log > /tmp/glitter.txt

Please notice that I have a different user environment. Perhaps I should directly do in the crontab? I've tried to do with this user, but it doesn't work :(

Thanks for all help!
Kind Regards, Oliver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top