0

All,

I have a user that I am creating using recipe in Chef. How can I create a ssh key for the user using data bags in chef.

the recipe in default.rb is,

user "abc" do
  home "/home/abc"
  action[:create]
  mode 775
StephenKing
  • 36,187
  • 11
  • 83
  • 112
cloudbud
  • 2,948
  • 5
  • 28
  • 54

1 Answers1

0

The user resource only manages creating a user, as in the /etc/passwd entry. For managing ancillary stuff like SSH keys or sudo configurations you would need additional code. There are some community cookbooks that help with this, but you would have to evaluate if they meet your needs. User management tends to be very different for each organization so I encourage people to consider writing something themselves.

coderanger
  • 52,400
  • 4
  • 52
  • 75