Switch user Shell Script
RAVIKIRAN_GUNISETTI
gunisetti
Mon Jun 18 04:13:57 PDT 2007
Hi,
Iam new to the shell scripting & need help ..
My Scenario: [Zimbra Mail Server]
``````````````````````````````````````````````````````
I have to write a shell script which changes the user from " root " to
"zimbra" using 'su - zimbra'
Then perform certain tasks & then logout from the 'zimbra user'
Now i can successfully log into 'zimbra' but the commands that i have
written after the 'su - zimbra' doesnot get recognized by the BASH SHELL &
thus my shell-script fails.
I tried using '|' but no luck.
My Sample Script is
``````````````````````````````
su - zimbra
zmcontrol status > zm_status.txt
exit
Note: zmcontrol is Zimbra specific & can only be executed through zimbra
user login.
Please help me with this script.
Thanks
Ravi.
--
View this message in context: http://www.nabble.com/Switch-user-Shell-Script-tf3939625.html#a11173729
Sent from the Linux Users (linux-sxs.org) mailing list archive at Nabble.com.
More information about the Linux-users
mailing list