0

Getting knife bootstrap error on ubuntu chef node

$ knife bootstrap 52.8.178.221 -x ubuntu -i ~/Keys/chef1.pem

mkdir: cannot create directory ‘/etc/chef’: Permission denied
52.8.178.221 bash: line 35: /etc/chef/validation.pem: No such file or directory
52.8.178.221 chmod: cannot access ‘/etc/chef/validation.pem’: No such file or directory
52.8.178.221 mkdir: cannot create directory ‘/etc/chef’: Permission denied
52.8.178.221 bash: line 68: /etc/chef/trusted_certs/ashishk.crt: No such file or directory
52.8.178.221 bash: line 95: /etc/chef/client.rb: No such file or directory
52.8.178.221 bash: line 104: /etc/chef/first-boot.json: No such file or directory
52.8.178.221 Starting first Chef Client run...
52.8.178.221 bash: line 110: chef-client: command not found

user on chef-node should have sudo permissions so i added

# User privilege specification
root    ALL=(ALL:ALL) ALL
ubuntu  ALL=(ALL:ALL) ALL

still getting error :

mkdir: cannot create directory ‘/etc/chef’: Permission denied

2

Got the solution "--sudo --use-sudo-password" helped doing it !

$knife bootstrap  52.8.178.221 -x ubuntu -i ~/Keys/chef1.pem --sudo --use-sudo-password

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.