Skip to Content
Odoo मेन्यू
  • Sign in
  • मुफ़्त में आज़माएं
  • ऐप्लिकेशन
    फ़ाइनेंस
    • अकाउंटिंग
    • इनवॉइसिंग
    • एक्सपेंस
    • स्प्रेडशीट (बीआई)
    • डॉक्यूमेंट्स
    • साइन
    सेल्स
    • सीआरएम
    • सेल्स
    • पीओएस शॉप
    • पीओएस रेस्टोरेंट
    • सब्सक्रिप्शन
    • रेंटल
    वेबसाइट
    • वेबसाइट बिल्डर
    • ई-कॉमर्स
    • ब्लॉग
    • फ़ोरम
    • लाइव चैट
    • ई-लर्निंग
    सप्लाई चेन
    • इन्वेंट्री
    • मैन्युफ़ैक्चरिंग
    • पीएलएम
    • परचेज़
    • मेंटेनेंस
    • क्वालिटी
    मानव संसाधन
    • कर्मचारी
    • रिक्रूटमेंट
    • टाइम ऑफ़
    • अप्रेज़ल
    • रेफ़रल
    • फ़्लीट
    मार्केटिंग
    • सोशल मार्केटिंग
    • ईमेल मार्केटिंग
    • एसएमएस मार्केटिंग
    • इवेंट
    • मार्केटिंग ऑटोमेशन
    • सर्वे
    सेवाएं
    • प्रोजेक्ट
    • टाइमशीट
    • फ़ील्ड सर्विस
    • हेल्पडेस्क
    • प्लानिंग
    • अपॉइंटमेंट
    प्रॉडक्टिविटी
    • डिस्कस
    • अप्रूवल
    • आईओटी
    • वीओआईपी
    • नॉलेज
    • WhatsApp
    तीसरे पक्ष के ऐप्लिकेशन Odoo स्टूडियो Odoo क्लाउड प्लेटफ़ॉर्म
  • इंडस्ट्री
    रीटेल
    • बुक स्टोर
    • क्लोदिंग स्टोर
    • फ़र्नीचर स्टोर
    • ग्रॉसरी स्टोर
    • हार्डवेयर स्टोर
    • टॉय स्टोर
    Food & Hospitality
    • बार और पब
    • रेस्टोरेंट
    • फ़ास्ट फ़ूड
    • Guest House
    • बेवरिज डिस्ट्रीब्यूटर
    • होटल
    रियल एस्टेट
    • Real Estate Agency
    • आर्किटेक्चर फ़र्म
    • कंसट्रक्शन
    • एस्टेट मैनेजमेंट
    • गार्ड्निंग
    • प्रॉपर्टी ओनर असोसिएशन
    कंसल्टिंग
    • अकाउंटिंग फ़र्म
    • Odoo पार्टनर
    • मार्केटिंग एजेंसी
    • लॉ फ़र्म
    • टैलेंट ऐक्विज़िशन
    • ऑडिट & सर्टिफ़िकेशन
    मैन्युफ़ैक्चरिंग
    • टेक्सटाइल
    • Metal
    • फ़र्नीचर
    • फ़ूड
    • Brewery
    • कॉर्पोरेट गिफ़्ट
    हेल्थ & फिटनेस
    • स्पोर्ट्स क्लब
    • आईवियर स्टोर
    • फिटनेस सेंटर
    • वेलनेस प्रैक्टिशनर
    • फॉर्मेसी
    • हेयर सैलून
    Trades
    • Handyman
    • आईटी हॉर्डवेयर और सपोर्ट
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    अन्य
    • Nonprofit Organization
    • एन्वायरमेंटल एजेंसी
    • बिलबोर्ड रेंटल
    • फ़ोटोग्राफी
    • बाइक लीजिंग
    • सॉफ़्टवेयर रीसेलर
    Browse all Industries
  • कम्यूनिटी
    सीखें
    • ट्यूटोरियल्स
    • दस्तावेज़
    • सर्टिफ़िकेशन
    • ट्रेनिंग
    • ब्लॉग
    • पॉडकास्ट
    शिक्षा को बढ़ावा दें
    • एजुकेशन प्रोग्राम
    • स्केल अप! बिजनेस गेम
    • Odoo के ऑफ़िस में आएं
    सॉफ़्टवेयर पाएं
    • डाउनलोड
    • वर्शन की तुलना करें
    • रिलीज़
    साथ मिलकर काम करें
    • Github
    • फ़ोरम
    • इवेंट
    • अनुवाद
    • पार्टनर बनें
    • Services for Partners
    • अपना अकाउंटिंग फ़र्म रजिस्टर करें
    सेवाएं पाएं
    • पार्टनर ढूंढें
    • अकाउंटेंट खोजें
    • सलाहकार की मदद लें
    • इम्प्लिमेंटेशन सेवाएं
    • कस्टमर रेफ़रेंस
    • सहायता
    • अपग्रेड
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    डेमो देखें
  • कीमत
  • सहायता

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • सीआरएम
  • e-Commerce
  • लेखांकन
  • इन्वेंटरी
  • PoS
  • प्रोजेक्ट
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
टैग (View all)
odoo accounting v14 pos v15
About this forum
Help

Admin password reset not working, tried database, odoo.conf

Subscribe

Get notified when there's activity on this post

This question has been flagged
passworddatabaseadmin
2 Replies
3416 Views
Avatar
mk

Hello,

I am trying to gain control of an Odoo 18 instance where the admin password is unknown (we made a clone of our production server for experimentation purposes because the company that is supposed to deploy Odoo for us is taking weeks for simple requests, and we must keep moving). I have physical access (it's a new VM), and I can write to the database. I would like to obtain admin access now.

I have tried writing the pbkdf2_sha512 hash to the database as suggested at www.odoo.com/de_DE/forum/hilfe-1/how-to-reset-the-odoo-admin-user-password-a-summary-for-different-odoo-versions-131992 (I don't have enough karma to post links…). I also tried to write just the plain text password to the database. I tried to set the password for a non-admin user, but even that doesn't work, I keep getting "Wrong login/password". I have verified that the database has active='t' for the users in question. I have tried writing the plain-text password to odoo.conf​ as suggested here www.odoo.com/de_DE/forum/hilfe-1/lost-admin-password-can-i-simply-change-it-in-odoo-conf-278299 (again, cannot post link, wtf?)

What security measure could be in place keeping me from getting the job done? There are no entries in odoo.log​ that could help me further.

Do you have any tips for us?

Thank you,

m

0
Avatar
Discard
Avatar
Piyush H
Best Answer

Based on your persistent issues, let's implement a thorough solution to regain full admin access:

Step 1: Verify Complete Group Assignments

Run this SQL to ensure all admin privileges:

sql

-- For existing admin user
UPDATE res_users SET 
    password = 'pbkdf2_sha512$600000$ExampleSalt$ExampleHash',
    active = true,
    share = false
WHERE login = 'admin';

-- Add to ALL security groups (critical for full access)
INSERT INTO res_groups_users_rel (gid, uid)
SELECT g.id, u.id 
FROM res_groups g, res_users u 
WHERE u.login = 'admin' 
AND g.id NOT IN (
    SELECT gid FROM res_groups_users_rel WHERE uid = u.id
);

Step 2: Force Password Reset Through Configuration

  1. Edit your odoo.conf:

ini

admin_passwd = your_new_password
list_db = True
  1. Restart Odoo completely:

bash

sudo systemctl restart odoo

Step 3: Direct Session Table Cleanup (If Authentication Still Fails)

sql

-- Clear all active sessions for the admin user
DELETE FROM ir_attachment WHERE res_model = 'ir.sessions';
DELETE FROM ir_sessions WHERE uid = (SELECT id FROM res_users WHERE login = 'admin');

Step 4: Verify User Configuration

Run this diagnostic query:

sql

SELECT 
    u.login, 
    u.active, 
    u.share,
    array_agg(g.name) as groups
FROM res_users u
LEFT JOIN res_groups_users_rel gu ON gu.uid = u.id
LEFT JOIN res_groups g ON g.id = gu.gid
WHERE u.login = 'admin'
GROUP BY u.login, u.active, u.share;

Step 5: Last Resort - Create New Superuser With Full Rights

sql

DO $$
DECLARE
    new_uid integer;
    new_partner_id integer;
BEGIN
    -- Create partner first
    INSERT INTO res_partner (
        name, email, company_id, active, 
        create_uid, create_date, write_uid, write_date
    ) VALUES (
        'Super Admin', 'admin@example.com', 1, true,
        1, now(), 1, now()
    ) RETURNING id INTO new_partner_id;

    -- Create user
    INSERT INTO res_users (
        active, login, password, company_id, partner_id,
        create_uid, create_date, write_uid, write_date
    ) VALUES (
        true, 'superadmin', 'pbkdf2_sha512$600000$ExampleSalt$ExampleHash',
        1, new_partner_id, 1, now(), 1, now()
    ) RETURNING id INTO new_uid;

    -- Grant all groups
    INSERT INTO res_groups_users_rel (gid, uid)
    SELECT id, new_uid FROM res_groups;
END $$;

Critical Checks If Still Not Working:

  1. Database Filter: Verify no --db-filter is blocking access
  2. Custom Auth Modules: Check installed modules for auth in name
  3. Password Policy: Look for password_security module
  4. Odoo Version: Confirm exact version with odoo --version

Final Verification:

After making changes:

  1. Clear browser cache completely
  2. Use incognito mode
  3. Try different browser
  4. Check Odoo logs for authentication errors:

bash

sudo tail -f /var/log/odoo/odoo-server.log


🚀 Did This Solve Your Problem?

If this answer helped you save time, money, or frustration, consider:

✅ Upvoting (👍) to help others find it faster

✅ Marking as "Best Answer" if it resolved your issue

Your feedback keeps the Odoo community strong! 💪

(Need further customization? Drop a comment—I’m happy to refine the solution!)

0
Avatar
Discard
mk
Author

Hey, thanks for your response!

I tried Method 1, and I cannot seem to set a new password for admin or any other user that way. Method 3 also does not yield any success like that. Method 4 is essentially the same as Method 1, and it doesn't work.

​gid=1​ doesn't seem to do any magic here, but I just used some elaborate SQL to add myself to all the gids​ that Admin has and which I don't. I still don't seemany Settings, though.

Do you know what I need to modify in the database directly to get access to settings andd user management, if all the groups admin​ belongs to isn't enough?

mk
Author

For the record, `gid=4` is the group with name "Settings", but Settings are not accessible when logged in as a member of this group.

Piyush H

Edited my response

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
DB Admin password reset each time we update Odoo 8. Isn't it stored in the database? Solved
password database admin odoo8
Avatar
Avatar
1
सित॰ 16
5785
How do I copy my database(s) to a different computer? Solved
database admin
Avatar
Avatar
Avatar
Avatar
5
अक्तू॰ 19
23752
Admin User Missing Solved
password user admin
Avatar
Avatar
2
सित॰ 21
7875
Enable password recovery from database
password database recovery
Avatar
Avatar
Avatar
6
जुल॰ 17
12325
login fails. Wrong password
password admin resetpassword
Avatar
Avatar
3
जुल॰ 16
9537
कम्यूनिटी
  • ट्यूटोरियल्स
  • दस्तावेज़
  • फ़ोरम
ओपन सोर्स
  • डाउनलोड
  • Github
  • रनबॉट
  • अनुवाद
सेवाएं
  • Odoo.sh Hosting
  • सहायता
  • अपग्रेड
  • कस्टम डेवलपमेंट्स
  • शिक्षा
  • अकाउंटेंट खोजें
  • पार्टनर ढूंढें
  • पार्टनर बनें
हमारे बारे में
  • हमारी कंपनी
  • ब्रांड ऐसेट
  • संपर्क करें
  • नौकरियां
  • इवेंट
  • पॉडकास्ट
  • ब्लॉग
  • ग्राहक
  • लीगल • गोपनीयता
  • सुरक्षा
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, बिज़नेस से जुड़े ऐप्लिकेशन का एक कलेक्शन है जो ओपन सोर्स पर आधारित है. इसमें आपकी कंपनी की हर ज़रूरत के लिए ऐप्लिकेशन हैं. जैसे, सीआरएम, ई-कॉमर्स, अकाउंटिंग, इन्वेंट्री, पॉइंट ऑफ़ सेल, प्रोजेक्ट मैनेजमेंट वगैरह.

Odoo की सबसे बड़ी खासियत है कि यह इस्तेमाल करने में बहुत आसान है और यह पूरी तरह से इंटिग्रेट किया हुआ है.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now