{"id":18824,"date":"2015-04-07T16:26:02","date_gmt":"2015-04-07T10:56:02","guid":{"rendered":"https:\/\/2thenew.today\/blog\/?p=18824"},"modified":"2015-09-17T16:46:10","modified_gmt":"2015-09-17T11:16:10","slug":"chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges","status":"publish","type":"post","link":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/","title":{"rendered":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges"},"content":{"rendered":"<p>This blog is to enable <a title=\"AWS DevOps Engineers\" href=\"https:\/\/2thenew.today\/devops-automation-consulting\">AWS chef professionals<\/a> to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using <a title=\"Chef DevOps\" href=\"https:\/\/2thenew.today\/devops-chef-puppet-docker\">chef<\/a>. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which needed to be replaced instantly to a single pem file for all the servers without any downtime. This can be done to overcome security issue, for example, the pem file is being rotated to different peoples or the person who was managing these servers and there keys left the organization.<\/p>\n<p>Quick and easy resolution for above concern is listed below,<\/p>\n<p>1) This blogpost assumes pre existing CHEF test environment of 3 ubuntu servers, a chef server, a chef client and a chef workstation. For more information on setting up above mentioned test environment, please refer link below,<br \/>\n<a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-a-chef-server-workstation-and-client-on-ubuntu-vps-instances\">https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-a-chef-server-workstation-and-client-on-ubuntu-vps-instances<\/a><\/p>\n<p>2) Create a new keypair using AWS console and download the new pem file,<\/p>\n<p>3) Obtain a public key against recently downloaded pem key using below command,<a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/publickeygenerate.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18830\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/publickeygenerate.png\" alt=\"publickeygenerate\" width=\"774\" height=\"227\" \/><\/a>The command will ask for the location of private key and will give the public key against that private key on stdout. Copy and save that into a file, with filename &#8220;authorized_keys&#8221; and put this file inside, &#8216;$HOME\/chef-repo\/cookbooks\/changekeypair\/files\/default\/&#8217; directory.<\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/cheffilesloc.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18831\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/cheffilesloc.png\" alt=\"cheffilesloc\" width=\"778\" height=\"240\" \/><\/a><\/p>\n<p>3) Now, we push this public key file inside .ssh folder of all the instances using chef recipe below,<a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/changekeypairrecipe.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18832\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/changekeypairrecipe.png\" alt=\"changekeypairrecipe\" width=\"777\" height=\"224\" \/><\/a>Above recipe will push the &#8220;authorized_keys&#8221; file to all the chef clients and change its permissions to 600, so that public key held by the clients earlier will be replaced with a new public key. Now users having old private key cannot log into the system.<\/p>\n<p><strong>To add a new user to a server farm with sudo privileges, following steps are to be followed,<\/strong><\/p>\n<p>1) Create a password shadow hash because original password should not be written in plain text in our recipe.<a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/openssl.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18836\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/openssl.png\" alt=\"openssl\" width=\"777\" height=\"165\" \/><\/a><\/p>\n<p>2) create a new cookbook and copy the recipe listed below,<a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/adduserrecipe.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-18837\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/adduserrecipe.png\" alt=\"adduserrecipe\" width=\"775\" height=\"351\" \/><\/a>Above recipe will create a new user with username &#8220;intelligrape&#8221; and password as &#8220;theplaintextpassword&#8221; and add this user to sudoers.<\/p>\n<p>Thanks and regards<br \/>\nSharad Aggarwal<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which [&hellip;]<\/p>\n","protected":false},"author":176,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":5,"footnotes":""},"categories":[1174],"tags":[],"class_list":["post-18824","post","type-post","status-publish","format-standard","hentry","category-aws-2"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Sharad Aggarwal\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#article\",\"name\":\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog\",\"headline\":\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sharadaintelligrape-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2015\\\/04\\\/publickeygenerate.png\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#articleImage\"},\"datePublished\":\"2015-04-07T16:26:02+05:30\",\"dateModified\":\"2015-09-17T16:46:10+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#webpage\"},\"articleSection\":\"AWS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/aws-2\\\/#listItem\",\"name\":\"AWS\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/aws-2\\\/#listItem\",\"position\":2,\"name\":\"AWS\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/aws-2\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#listItem\",\"name\":\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#listItem\",\"position\":3,\"name\":\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/aws-2\\\/#listItem\",\"name\":\"AWS\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sharadaintelligrape-com\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sharadaintelligrape-com\\\/\",\"name\":\"Sharad Aggarwal\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/26dfa662d5c2e5fb85587a4a8d9404253ddfa759bd479bb04336d9e1f7d25427?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Sharad Aggarwal\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/\",\"name\":\"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog\",\"description\":\"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sharadaintelligrape-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/sharadaintelligrape-com\\\/#author\"},\"datePublished\":\"2015-04-07T16:26:02+05:30\",\"dateModified\":\"2015-09-17T16:46:10+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog","description":"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which","canonical_url":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#article","name":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog","headline":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges","author":{"@id":"https:\/\/2thenew.today\/blog\/author\/sharadaintelligrape-com\/#author"},"publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2015\/04\/publickeygenerate.png","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#articleImage"},"datePublished":"2015-04-07T16:26:02+05:30","dateModified":"2015-09-17T16:46:10+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#webpage"},"articleSection":"AWS"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.today\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/aws-2\/#listItem","name":"AWS"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/aws-2\/#listItem","position":2,"name":"AWS","item":"https:\/\/2thenew.today\/blog\/category\/aws-2\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#listItem","name":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#listItem","position":3,"name":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.today\/blog\/category\/aws-2\/#listItem","name":"AWS"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.today\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.today\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.today\/blog\/author\/sharadaintelligrape-com\/#author","url":"https:\/\/2thenew.today\/blog\/author\/sharadaintelligrape-com\/","name":"Sharad Aggarwal","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/26dfa662d5c2e5fb85587a4a8d9404253ddfa759bd479bb04336d9e1f7d25427?s=96&d=mm&r=g","width":96,"height":96,"caption":"Sharad Aggarwal"}},{"@type":"WebPage","@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#webpage","url":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/","name":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog","description":"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.today\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.today\/blog\/author\/sharadaintelligrape-com\/#author"},"creator":{"@id":"https:\/\/2thenew.today\/blog\/author\/sharadaintelligrape-com\/#author"},"datePublished":"2015-04-07T16:26:02+05:30","dateModified":"2015-09-17T16:46:10+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.today\/blog\/#website","url":"https:\/\/2thenew.today\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.today\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog","og:description":"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which","og:url":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/","og:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges | TO THE NEW Blog","twitter:description":"This blog is to enable AWS chef professionals to change pem of running servers or to add a new user with sudo privileges to an EC2 server farm using chef. The post actually refers to a production usecase in which there is a huge number of instances running on single or multiple pem files which","twitter:image":"https:\/\/2thenew.today\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"18824","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 07:35:14","updated":"2024-02-29 09:55:49","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.today\/blog\/category\/aws-2\/\" title=\"AWS\">AWS<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.today\/blog"},{"label":"AWS","link":"https:\/\/2thenew.today\/blog\/category\/aws-2\/"},{"label":"CHEF recipe to change pem file of running ec2 instances and adding a new user to all the instances and give sudo privileges","link":"https:\/\/2thenew.today\/blog\/chef-recipe-to-change-pem-file-of-running-ec2-instances-and-adding-a-new-user-to-all-the-instances-and-give-sudo-privileges\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/18824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/users\/176"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/comments?post=18824"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/posts\/18824\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/media?parent=18824"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/categories?post=18824"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.today\/blog\/wp-json\/wp\/v2\/tags?post=18824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}