SUMMARY: su - $user and use user .profile variables.

From: sreenath sarikonda (sreeredhat@yahoo.com)
Date: Wed Aug 04 2004 - 17:15:37 EDT


Thank you everyone.This is the solution which solved
all my problems

su - user -c '(cd $VARIABLE ; ... )'
the single quotes delay the substitution from the
outer shell, so it
works
in the subshell. Since $VARIABLE isn't set in the
environment from
which
su - is run, what gets passed to cd is the empty
string. Using single
quotes, the '$VARIABLE' remains intact and gets the
substitution when
su

                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:12 EDT