Icinga / Icinga/docker-icinga2

Question about icinga and root user in the container

Open
#147 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dockerfile
Stars
73
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Hello :)

As the title says its more of a question than a issue. I'm currently using your icinga2 docker image in combination with your helm chart for Kubernetes. I'm playing around a bit and already have a Icinga master setup running locally. Everything works fine (for now at least😄)

What I noticed was that I was not able to use the icinga nor the root user in my container to shell into it to change some configuration files (zones.conf, hosts.conf etc.)

Using K9s I'm able to open a terminal in the container which by default uses the Icinga user which is weird because you guys set the user to inactive and don't give it a password by default using the --disabled-login flag while adding the user in your Dockerfile. I guess K9s doesn't care and does some fancy stuff in the background to make that happen😃

I can use the Icinga user to navigate through the container and look into Icinga related files using cat but I can't edit or add new files since by default there is no text editor like nano or vi installed. That would not be a big issue since I would just install a editor of my choice myself using apt but for that I need sudo permissions or the root user. If I try to use the sudo apt install command it asks me for the password of the Icinga user (which I obviously don't have) and sadly I also don't know the password of the root user. I would just use the root user to give the Icinga user a password or create another user and add him to the sudoers file.

So I'm effectively locked out of the container and have no way of installing a editor or add a new user with the required permissions to install stuff. I could edit the Dockerfile beforehand to install a editor or to either add the Icinga user and set it to active + give it a password to be able to use sudo or create a different user for that use case but I would like to have that "from factory"

So what was the reason behind locking the icinga user to only run the service/daemon and not giving the user a way to use the root user or just create a another standard user with sudo permissions which then can be used to shell into the container and change + add files and download a editor? Was it myabe because of security concerns or something?

If there is something that I might have overlooked or misunderstood please tell me 👍

Thank you very much in advance!

Best Regards!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the Dockerfile user setup and the Helm chart configuration first, focusing on how shell access and permissions are intended to work. Document the security rationale and the supported way to edit configuration or install tools, then confirm it against the container behavior described.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, kubernetes
Domain
devops
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.