Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No option to have JavaServer run as a user with a login shell #235

Closed
timperrett opened this issue Apr 23, 2014 · 3 comments · Fixed by #237
Closed

No option to have JavaServer run as a user with a login shell #235

timperrett opened this issue Apr 23, 2014 · 3 comments · Fixed by #237

Comments

@timperrett
Copy link

Hey guys,

Turns out the user that runs the service (daemonUser in Linux) does not have a login shell. This is often very important if you wish to read environmental variables etc, otherwise its not possible. I have the following fix in a fork, but its clearly not very general and suggest a better solution in the mainline as im sure this is a feature wanted by many:

useradd --shell /bin/bash --gid ${{daemon_group}} --no-create-home --system -c '${{descr}}' ${{daemon_user}}

Thanks, Tim

@muuki88
Copy link
Contributor

muuki88 commented Apr 24, 2014

I think a simple setting daemonUserShell := "/bin/false" should be sufficient enough. You can then override on your own risk. @kardapoltsev , what do you say as our security expert :)

@kardapoltsev
Copy link
Member

The same:

You can then override on your own risk

@timperrett
Copy link
Author

Interestingly, my previously posted solution doesnt appear to be an entire solution. Using runuser -l also doesnt seem to help - i need the daemonUser to be able to read the env, but nothing i do seems to help. Suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants