paynerobert
Programmer
I have a startup script on Solaris 8 which is to start a daemon as a particular user. In my rc script I have:
su - gooduser -c "abinary args"
Now, gooduser has bash set in /etc/passwd as its shell. The problem I'm seeing is that Solaris won't pick up gooduser's environment. After reading the man page I'm pretty sure it's because gooduser doesn't have /bin/sh as its shell. Changing the shell for gooduser is not an option.
One solution I see is to write a bash wrapper and source gooduser's profile to pick up the environment.
Any more elegent ideas?
su - gooduser -c "abinary args"
Now, gooduser has bash set in /etc/passwd as its shell. The problem I'm seeing is that Solaris won't pick up gooduser's environment. After reading the man page I'm pretty sure it's because gooduser doesn't have /bin/sh as its shell. Changing the shell for gooduser is not an option.
One solution I see is to write a bash wrapper and source gooduser's profile to pick up the environment.
Any more elegent ideas?