{"id":133,"date":"2017-11-22T07:35:07","date_gmt":"2017-11-22T07:35:07","guid":{"rendered":"https:\/\/blinksql.com\/?p=133"},"modified":"2017-11-22T07:35:07","modified_gmt":"2017-11-22T07:35:07","slug":"create-postgresql-user-account","status":"publish","type":"post","link":"https:\/\/blinksql.com\/?p=133","title":{"rendered":"Create postgreSQL user account"},"content":{"rendered":"<p>-&gt; After the installation of postgresql we need to create the user account for the postgresql.<br \/>\n-&gt; For this login as root and then execute the cmd below.<br \/>\n<strong>cmd:adduser postgres<\/strong><br \/>\n<img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/create-user-account.png\" alt=\"create user account\" width=\"675\" height=\"312\" class=\"alignnone size-full wp-image-140\" \/><br \/>\n-&gt; Now the user is added and now the prompt is at created user.<\/p>\n<p><strong>To add the created user to sudo userslist:<\/strong><br \/>\n-&gt; We can not directly execute the sudo by simply creating the user an error will be come like this.<br \/>\n<img decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/error-for-sudo-user.png\" alt=\"error for sudo user\" width=\"656\" height=\"59\" class=\"alignnone size-full wp-image-141\" \/><br \/>\n-&gt; Then execute the cmd below in the root login.<br \/>\n<strong>cmd: sudo usermod -aG sudo,adm postgres_user<\/strong><br \/>\n-&gt; Now the user is added to the sudo users list.<img decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/to-add-as-sudo-user.png\" alt=\"to add as sudo user\" width=\"597\" height=\"96\" class=\"alignnone size-full wp-image-142\" \/><\/p>\n<p><strong>To give privilliges to the particular folder:<\/strong><br \/>\n<strong>cmd:mkdir \/DB\/test\/<br \/>\n<\/strong><br \/>\n-&gt; While creating the directory if the error comes as below<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/permission_denied.png\" alt=\"permission_denied\" width=\"512\" height=\"48\" class=\"alignnone size-full wp-image-143\" \/><br \/>\n-&gt; Then give the privilliges to the particular folder using the cmd<br \/>\n<strong>cmd:sudo chown postgres_user:postgres_user \/DB\/<br \/>\n<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/mkdir.png\" alt=\"mkdir\" width=\"762\" height=\"118\" class=\"alignnone size-full wp-image-144\" \/><br \/>\n-&gt; Now we can able to create the folder.<br \/>\n<strong>cmd:mkdir \/DB\/test\/<br \/>\n<\/strong><\/p>\n<p><strong>To change the password of the user:<\/strong><br \/>\n-&gt; Login as the user for which the password needs to be changed.<br \/>\n-&gt; Then use the cmd and give the old password and then new password.<br \/>\n<strong>cmd: passwd postgres_user<br \/>\n<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/to-change-the-user-password.png\" alt=\"to change the user password\" width=\"430\" height=\"140\" class=\"alignnone size-full wp-image-145\" \/><br \/>\n-&gt; Now we can see the password is changes successfully.<\/p>\n<p><strong>To remove the user<br \/>\n<\/strong><strong>cmd:deluser postgres2<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/remove_user.png\" alt=\"remove_user\" width=\"413\" height=\"68\" class=\"alignnone size-full wp-image-149\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>-&gt; After the installation of postgresql we need to create the user account for the postgresql. -&gt; For this login as root and then execute the cmd below. cmd:adduser postgres&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create postgreSQL user account - Blink SQL<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blinksql.com\/?p=133\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create postgreSQL user account - Blink SQL\" \/>\n<meta property=\"og:description\" content=\"-&gt; After the installation of postgresql we need to create the user account for the postgresql. -&gt; For this login as root and then execute the cmd below. cmd:adduser postgres&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blinksql.com\/?p=133\" \/>\n<meta property=\"og:site_name\" content=\"Blink SQL\" \/>\n<meta property=\"article:published_time\" content=\"2017-11-22T07:35:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/create-user-account.png\" \/>\n<meta name=\"author\" content=\"Hannie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@harika_sanaka\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hannie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blinksql.com\/?p=133#article\",\"isPartOf\":{\"@id\":\"https:\/\/blinksql.com\/?p=133\"},\"author\":{\"name\":\"Hannie\",\"@id\":\"https:\/\/blinksql.com\/#\/schema\/person\/f04b99304f59e14956e768e764d2afd4\"},\"headline\":\"Create postgreSQL user account\",\"datePublished\":\"2017-11-22T07:35:07+00:00\",\"dateModified\":\"2017-11-22T07:35:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blinksql.com\/?p=133\"},\"wordCount\":228,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blinksql.com\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blinksql.com\/?p=133#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blinksql.com\/?p=133\",\"url\":\"https:\/\/blinksql.com\/?p=133\",\"name\":\"Create postgreSQL user account - Blink SQL\",\"isPartOf\":{\"@id\":\"https:\/\/blinksql.com\/#website\"},\"datePublished\":\"2017-11-22T07:35:07+00:00\",\"dateModified\":\"2017-11-22T07:35:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blinksql.com\/?p=133#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blinksql.com\/?p=133\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blinksql.com\/?p=133#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blinksql.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create postgreSQL user account\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blinksql.com\/#website\",\"url\":\"https:\/\/blinksql.com\/\",\"name\":\"Blink SQL\",\"description\":\" Thinking SQL\",\"publisher\":{\"@id\":\"https:\/\/blinksql.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blinksql.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/blinksql.com\/#organization\",\"name\":\"Blink SQL\",\"url\":\"https:\/\/blinksql.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blinksql.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/blinksql.com\/wp-content\/uploads\/2022\/11\/cropped-BlinkSQL-removebg.png\",\"contentUrl\":\"https:\/\/blinksql.com\/wp-content\/uploads\/2022\/11\/cropped-BlinkSQL-removebg.png\",\"width\":280,\"height\":172,\"caption\":\"Blink SQL\"},\"image\":{\"@id\":\"https:\/\/blinksql.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/blinksql.com\/#\/schema\/person\/f04b99304f59e14956e768e764d2afd4\",\"name\":\"Hannie\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blinksql.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c5876b3497d2c2eb98256b7c183220c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c5876b3497d2c2eb98256b7c183220c1?s=96&d=mm&r=g\",\"caption\":\"Hannie\"},\"sameAs\":[\"http:\/\/blinksql.com\",\"https:\/\/twitter.com\/harika_sanaka\"],\"url\":\"https:\/\/blinksql.com\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create postgreSQL user account - Blink SQL","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blinksql.com\/?p=133","og_locale":"en_US","og_type":"article","og_title":"Create postgreSQL user account - Blink SQL","og_description":"-&gt; After the installation of postgresql we need to create the user account for the postgresql. -&gt; For this login as root and then execute the cmd below. cmd:adduser postgres&hellip;","og_url":"https:\/\/blinksql.com\/?p=133","og_site_name":"Blink SQL","article_published_time":"2017-11-22T07:35:07+00:00","og_image":[{"url":"https:\/\/blinksql.com\/wp-content\/uploads\/2017\/11\/create-user-account.png"}],"author":"Hannie","twitter_card":"summary_large_image","twitter_creator":"@harika_sanaka","twitter_misc":{"Written by":"Hannie","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blinksql.com\/?p=133#article","isPartOf":{"@id":"https:\/\/blinksql.com\/?p=133"},"author":{"name":"Hannie","@id":"https:\/\/blinksql.com\/#\/schema\/person\/f04b99304f59e14956e768e764d2afd4"},"headline":"Create postgreSQL user account","datePublished":"2017-11-22T07:35:07+00:00","dateModified":"2017-11-22T07:35:07+00:00","mainEntityOfPage":{"@id":"https:\/\/blinksql.com\/?p=133"},"wordCount":228,"commentCount":0,"publisher":{"@id":"https:\/\/blinksql.com\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blinksql.com\/?p=133#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blinksql.com\/?p=133","url":"https:\/\/blinksql.com\/?p=133","name":"Create postgreSQL user account - Blink SQL","isPartOf":{"@id":"https:\/\/blinksql.com\/#website"},"datePublished":"2017-11-22T07:35:07+00:00","dateModified":"2017-11-22T07:35:07+00:00","breadcrumb":{"@id":"https:\/\/blinksql.com\/?p=133#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blinksql.com\/?p=133"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blinksql.com\/?p=133#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blinksql.com\/"},{"@type":"ListItem","position":2,"name":"Create postgreSQL user account"}]},{"@type":"WebSite","@id":"https:\/\/blinksql.com\/#website","url":"https:\/\/blinksql.com\/","name":"Blink SQL","description":" Thinking SQL","publisher":{"@id":"https:\/\/blinksql.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blinksql.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/blinksql.com\/#organization","name":"Blink SQL","url":"https:\/\/blinksql.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blinksql.com\/#\/schema\/logo\/image\/","url":"https:\/\/blinksql.com\/wp-content\/uploads\/2022\/11\/cropped-BlinkSQL-removebg.png","contentUrl":"https:\/\/blinksql.com\/wp-content\/uploads\/2022\/11\/cropped-BlinkSQL-removebg.png","width":280,"height":172,"caption":"Blink SQL"},"image":{"@id":"https:\/\/blinksql.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/blinksql.com\/#\/schema\/person\/f04b99304f59e14956e768e764d2afd4","name":"Hannie","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blinksql.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c5876b3497d2c2eb98256b7c183220c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c5876b3497d2c2eb98256b7c183220c1?s=96&d=mm&r=g","caption":"Hannie"},"sameAs":["http:\/\/blinksql.com","https:\/\/twitter.com\/harika_sanaka"],"url":"https:\/\/blinksql.com\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/blinksql.com\/index.php?rest_route=\/wp\/v2\/posts\/133"}],"collection":[{"href":"https:\/\/blinksql.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blinksql.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blinksql.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blinksql.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133"}],"version-history":[{"count":0,"href":"https:\/\/blinksql.com\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions"}],"wp:attachment":[{"href":"https:\/\/blinksql.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blinksql.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blinksql.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}