Closed zaiddabaeen closed 7 years ago
I'm not sure that there is a problem. Did you check /etc/passwd and verify that no shell was being set up?
I replicated your environment by doing:
chef generate cookbook test_user mkdir -p test/integration/data_bags/users vi test/integration/data_bags/users/data_bags/users/myuser (added the content as above)
Added the line
data_bags_path: 'test/integration/data_bags'
to .kitchen.yml
Updated the default recipe with your users_manage
resource. I then did a kitchen converge and verified that the user was created with the bash shell.
vagrant@default-ubuntu-1604:~$ grep user /etc/passwd myuser:x:1001:1001::/home/myuser:/bin/bash
The prompt:
root@default-ubuntu-1604:~# sudo su - myuser myuser@default-ubuntu-1604:~$
Can you re-check your environment and confirm the user configuration in /etc/passwd?
Please reopen if this is still an issue and provide an update based on my previous comment? Thanks.
Cookbook version
4.0.3
Chef-solo version
12.18.31
Platform Details
Ubuntu 16.04
Scenario:
Shell command is not assigning a shell to the user.
Steps to Reproduce:
Recipe:
In the databag:
Expected Result:
I can SSH to the user, and a bash shell to show.
Actual Result:
I can SSH to the user, but Instead I just get a "$" shell.