-
Notifications
You must be signed in to change notification settings - Fork 360
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
Fix: common-utils configureZshAsDefaultShell option not working on alpine linux image #557
Conversation
@microsoft-github-policy-service agree |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, left some thoughts!
The license/cla status has been queued for over a day. How can I make it green? 🤔
Mmm, I expect that it should pass now as the CLA is signed. I don't see an option to retry the check, should have been automatic.
Looking at microsoft/ContributorLicenseAgreement#123 , probably closing & reopening the PR or pushing a new commit helps.
@samruddhikhandale hmmm. strange. I've also tried the command with 720p.mov |
@krikchaip In your case, you are running the conditions from the terminal, however, I tested it with a Feature test scenario (which resembles an actual Feature installation). Also, the install script is run with |
@samruddhikhandale Did you mean the |
@krikchaip Add echo statements to help debug the file changes to 👇 features/src/common-utils/main.sh Lines 439 to 446 in 0ae570c
BUILDKIT_PROGRESS=plain devcontainer features test -f common-utils --filter configure_zsh_as_default_shell --skip-autogenerated
|
@samruddhikhandale Opsie.. my bad XD. Accidentally forgot that Please check again. It should be working rn. |
Following up on #557 (comment) @krikchaip Can we update the logic to NOT make any changes to the file if |
@samruddhikhandale I believe the logic here seems to prevent it from touching the if [ -f "/etc/pam.d/chsh" ] &&
grep -vEq "^auth[[:blank:]]+sufficient[[:blank:]]+pam_rootok\.so$" /etc/pam.d/chsh; |
@samruddhikhandale please recheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you so much for taking the time to contribute this PR and reiterating on feedbacks. We appreciate it! ❇️
Hi, I was trying to set up a devcontainer for my side-project using the base alpine image with
common-utils
feature. I knew that the image already included the feature, but I also wanted to set the default shell tozsh
. According to the documentation, I had to pass"configureZshAsDefaultShell": "true"
, but it didn't seem to be working for me.While reading error logs, I found that the problem came from
chsh
command, which was always asking for a password.https://github.com/devcontainers/features/blob/main/src/common-utils/main.sh#LL439C9-L441C7
After doing some research, I found the solution. Basically, You need to modify the content in some file as shown on my PR.
/etc/pam.d/chsh