Forum Stats

  • 3,815,103 Users
  • 2,258,961 Discussions
  • 7,892,952 Comments

Discussions

switch user rc.local

Robeen
Robeen Member Posts: 2,175 Silver Badge

Redhat Hat Linux 7

Hello Team,


I would like to aotoexecute a script after server reboot. I have scheduled it in /etc/rc.d/rc.local.


But I see it is executing as root user.


rc.local entry:

sh /home/ora12c/scripts/autostart.sh

How do I execute as ora12c user?

content of autostart.sh:

nohup ./server.sh &

Thanks,


Roshan

Answers