On 6 August 2010 12:56, Dinesh Kumar Rajagopal <[email protected]> wrote: > Dear ilug-c, > I am writing shell script which control services (i.e > start/stop/restart ) in production environment, for remote command execution > i am using ssh with RSH Key for non root user. because root account should > have password. so need to run the service in non root user. is this right > way to do ?
I'm not sure how being a non-root user will affect anything. But to the question of how, I believe the answer can be found in our very own chmod. If your script is located in /foo/bar/script.sh, you have to just do a "chmod u+s /foo/bar/script.sh" as root. More details can be found in chmod's manual page. HTH =) -- Bhargav Prasanna "Linux - Because x64 is a terrible thing to waste" _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
