Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Incorrect Username/Permissions #420

Closed
cliffburdick opened this issue Jul 20, 2020 · 2 comments
Closed

Incorrect Username/Permissions #420

cliffburdick opened this issue Jul 20, 2020 · 2 comments

Comments

@cliffburdick
Copy link

  • VSCode Version: 1.47.1
  • Local OS Version: Ubuntu 18.04
  • Name of Dev Container Definition with Issue:

Steps to Reproduce:

  1. Create Dockerfile using the template here:
    https://github.com/microsoft/vscode-dev-containers/blob/master/containers/cpp/.devcontainer/Dockerfile

  2. 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?

@william-will-angi
Copy link

@cliffburdick Did you find a solution? I am running into the same issue I think

@cliffburdick
Copy link
Author

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.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants