How to Use two different users in bash scripting -
hi everyone, writing bash script on redhat v5.1. in script have run 1 command using dbadmin , right after have switch again root user run other commands. can tell me how can in bash scripting.
thanks in advance....
you need run script root.then in part of code this:
su - dbadmin -c "command" replace command whatever want run under dbadmin user.
this exact way how redhat init scripts run services under specific users, eg. oracle db
Comments
Post a Comment