I am writing a script that will shutdown my database, backup the system and then restart my database. This script needs to be run out of root's cron. I need to start my database as a certain user. On most of my systems I do this by doing a su - {userid} and then run the startup script. On one system the vendor written script to start the database does a 'who -m | read {userid}'. Unfortunately, the database will not start when the results come back as root. Does anyone know how I can fool the userid results to show a particular user?
My line of code is:
su - joe '-c /home/joe/startdb'
My line of code is:
su - joe '-c /home/joe/startdb'