-
-
Notifications
You must be signed in to change notification settings - Fork 318
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
login failed when pass PASSWORD using FILE__PASSWORD #63
Comments
Looks like your password files have trailing newlines. Create them with printf as described in the docker secrets docs so they don't have the trailing newline |
Thanks a lot. I try |
You can report that upstream But as you can see, the SUDO_PASSWORD, which is set by our image in bash, is failing because the trailing newline breaks our bash code and results in the error:
|
Indeed, you are right. |
Expected Behavior
login success with password set in file
Current Behavior
login failed
Steps to Reproduce
[cont-init.d] 10-adduser: exited 0. [cont-init.d] 30-config: executing... setting up sudo access adding abc to sudoers setting sudo password using SUDO_PASSWORD env var Enter new UNIX password: Retype new UNIX password: Sorry, passwords do not match passwd: Authentication token manipulation error passwd: password unchanged [cont-init.d] 30-config: exited 0.
Environment
OS: CentOS 7.9
CPU architecture: x86_64
How docker service was installed:
from official docker repo
Command used to create docker container (run/create/compose/screenshot)
docker-compose up -d
Docker logs
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing...
[env-init] PASSWORD set from FILE__PASSWORD
[env-init] SUDO_PASSWORD set from FILE__SUDO_PASSWORD
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing...
User uid: 1000
User gid: 1000
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
setting up sudo access
adding abc to sudoers
setting sudo password using SUDO_PASSWORD env var
Enter new UNIX password: Retype new UNIX password: Sorry, passwords do not match
passwd: Authentication token manipulation error
passwd: password unchanged
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom files found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2021-04-06T11:41:54.008Z] info Wrote default config file to ~/.config/code-server/config.yaml
[2021-04-06T11:41:55.217Z] info code-server 3.9.2 109d2ce3247869eaeab67aa7e5423503ec9eb859
[2021-04-06T11:41:55.220Z] info Using user-data-dir ~/data
[2021-04-06T11:41:55.261Z] info Using config file ~/.config/code-server/config.yaml
[2021-04-06T11:41:55.261Z] info HTTP server listening on http://0.0.0.0:8443
[2021-04-06T11:41:55.261Z] info - Authentication is enabled
[2021-04-06T11:41:55.262Z] info - Using password from $PASSWORD
[2021-04-06T11:41:55.262Z] info - Not serving HTTPS
The text was updated successfully, but these errors were encountered: