I am running a bourne shell script from a service script.

When I check $env from my #!/bin/sh script started by script the user is ROOT and path is [/]

Is there a way to pass the env of the logged in user to the shell script from the service?

Is there some decent way to handle it so that I can get the currently logged in user and not an empty env with root user?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.