This repository has been archived by the owner on Nov 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Incorrect Username/Permissions #420
Comments
@cliffburdick Did you find a solution? I am running into the same issue I think |
There are a number of ways to solve this, but take a look at https://github.com/boxboat/fixuid for one |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Steps to Reproduce:
Create Dockerfile using the template here:
https://github.com/microsoft/vscode-dev-containers/blob/master/containers/cpp/.devcontainer/Dockerfile
Run the container with remoteUser vscode. Everything seems to work properly, except if you create a new file, it's using the user "root".
I have tried also creating another non-root user in the Dockerfile and giving them sudo access as defined here:
https://raw.githubusercontent.com/microsoft/vscode-dev-containers/master/script-library/common-debian.sh
When I use a remoteUser of my user in that file, everything appears to work fine, except sudo asks for a password, and I can't figure out what it is. I even tried setting a password, but it won't take that either. If I run this container using
docker run
by itself, sudo works properly with no password prompt, so something vscode is doing is affecting the behavior.I'm using remote mounts, and I noticed in the documentation that vscode tries to save with the GID/UID of the mounted user. However, this particular system all the logins are through LDAP, so there are no entries in /etc/passwd for the users.
Is there a way to either get vscode to accept sudo without a password, or have a default password for all users?
The text was updated successfully, but these errors were encountered: