{"id":7186,"date":"2023-05-05T21:48:37","date_gmt":"2023-05-05T16:18:37","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=7186"},"modified":"2023-05-05T21:50:39","modified_gmt":"2023-05-05T16:20:39","slug":"how-to-reset-an-odoo-user-password-in-the-database","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-reset-an-odoo-user-password-in-the-database\/","title":{"rendered":"How to reset an Odoo user password in the database"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Introduction<\/strong><br><br>Odoo ERP is an online SaaS solution for supporting and integrating business activities such as production planning, manufacturing, logistics, finance, accounting, warehouse management, and human resources. The key benefits of Odoo are: Integrate systems and services. Automate the business process<br><br><strong>Prerequisite<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A user with sudo privileges to SSH the server<\/li>\n\n\n\n<li>Live Database name<\/li>\n\n\n\n<li>A user name that we want to reset the password<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Implementation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: SSH the server&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ ssh user@IP<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 2: Switch to the Postgres user<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ sudo su &#8211; postgres<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image.png\"><img decoding=\"async\" width=\"712\" height=\"34\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image.png\" alt=\"\" class=\"wp-image-7187\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image.png 712w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-300x14.png 300w\" sizes=\"(max-width: 712px) 100vw, 712px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 3: Connect to the PostgreSQL (Odoo\u2019s database) shell to modify the database<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ psql<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-2.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"688\" height=\"144\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-2.png\" alt=\"\" class=\"wp-image-7189\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-2.png 688w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-2-300x63.png 300w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 4: Check the database name which is associated with the odoo user&nbsp;<br><br><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ \\l<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1.png\"><img decoding=\"async\" width=\"1024\" height=\"260\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1-1024x260.png\" alt=\"\" class=\"wp-image-7188\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1-1024x260.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1-300x76.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1-768x195.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1-850x216.png 850w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-1.png 1400w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 5:&nbsp; Connect to the Odoo database&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ \\c test<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note: change the test to the actual name of the Odoo database<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 6: Check the user\u2019s email value (which is used as the login), execute the following command to get a list of all user logins<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ select login from res_users;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"264\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-3.png\" alt=\"\" class=\"wp-image-7190\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-3.png 778w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-3-300x102.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2023\/05\/image-3-768x261.png 768w\" sizes=\"(max-width: 778px) 100vw, 778px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 7: Change the password for the user&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>$ update res_users set password = &#8216;new_hashed_password&#8217; where login = &#8216;your@email.com&#8217;;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Note: <em>change your@email.com to the actual email value and change new_hashed_password with the required password&nbsp;<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Step 8: Exit the database<\/em><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><em>$ \\q<\/em><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Odoo ERP is an online SaaS solution for supporting and integrating business activities such as production planning, manufacturing, logistics, [&hellip;]<\/p>\n","protected":false},"author":495,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[974],"class_list":["post-7186","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-odoo","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1RU","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7186"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7186\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}