Execute a command as root from normal user

view full story

http://www.unix.com – Hi , I am trying to stop and start a process using the below code. I have sudo access on my machine Code: ## PID = process id echo "$PASSWD" | sudo -S kill -9 <PID> echo "$PASSWD" | sudo -S /opt/abc/startserver /opt/abc/startserver: error while loading shared libraries: librts.so: cannot open shared object file: No such file or directory But its working if i follow the below procedure Code: $ sudo -i # opt/abc/startserver Server Started How do i execute a process with sudo access in my case , i have tried -p <promt option > but no use any help is (HowTos)