linuxserver / docker-baseimage-kasmvnc

Base Images for remote web based Linux desktops using KasmVNC for many popular distros.
GNU General Public License v3.0
297 stars 52 forks source link

/etc/nsswitch.conf is missing entries #6

Closed deepio-oc closed 1 year ago

deepio-oc commented 1 year ago

Is there an existing issue for this?

Current Behavior

the nsswitch file in previous version had following:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files
group:          files
shadow:         files
gshadow:        files

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

But in recent docker images, it now has:

➜  ~ docker run -it --entrypoint bash ghcr.io/linuxserver/baseimage-kasmvnc:ubuntujammy                
root@adb5ec1d8759:/# cat /etc/nsswitch.conf 
hosts: files dns

➜  ~ docker run -it --entrypoint bash ubuntu:jammy                                     
root@1481c83e48f2:/# cat /etc/nsswitch.conf 
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files
group:          files
shadow:         files
gshadow:        files

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Expected Behavior

The nsswitch file should not be modified from the base ubuntu image.

Steps To Reproduce

  1. run ubuntu base image and check nsswitch.conf.
  2. run ghcr.io/linuxserver/baseimage-kasmvnc:ubuntujammy

Environment

- OS:
- How docker service was installed:

Docker creation

docker run -it --entrypoint bash ghcr.io/linuxserver/baseimage-kasmvnc:ubuntujammy

Container logs

root@adb5ec1d8759:/# cat /etc/nsswitch.conf 
hosts: files dns
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

deepio-oc commented 1 year ago

this looks like is intentional because of following line in dockerfile:

 echo 'hosts: files dns' > /etc/nsswitch.conf 

Without password/shadow entries in /etc/nsswitch.conf, we are not able to fetch entries from sssd. If this is required for some scenario, then maybe backup can be kept in /etc.

thelamer commented 1 year ago

We specifically make this modification for DinD compatibility: https://github.com/linuxserver/docker-baseimage-kasmvnc#kasmvnc-base-images-from-linuxserver It is needed for the DinD hack and is applied across the board to all the GUI images. (when you run these images in priv mode they fire up Docker in Docker) To be frank I am not 100% certain of the external consequences, can you explain what this breaks ?

deepio-oc commented 1 year ago

We use this webtop image as base for our VNC server. We added multi-user support using SSSD (SSSD talks to AD to fetch users). For SSSD to work, we need following in /etc/nsswitch.conf

passwd: files sss

This is automatically done when we install libnss-sss package but this is broken with recent changes since there is no passed entry anymore.

thelamer commented 1 year ago

You could pretty easily have an init mod add that to the file: https://github.com/linuxserver/docker-mods/

This container was never designed with multi user support in mind, it's main goal is to automate the delivery of a Linux desktop to a web browser for a single user.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue is locked due to inactivity