Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

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

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
passworddatabaseadmin
2 Antworten
3307 Ansichten
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
Verwerfen
Avatar
Piyush H
Beste Antwort

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
Verwerfen
mk
Autor

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
Autor

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

Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
DB Admin password reset each time we update Odoo 8. Isn't it stored in the database? Gelöst
password database admin odoo8
Avatar
Avatar
1
Sept. 16
5737
How do I copy my database(s) to a different computer? Gelöst
database admin
Avatar
Avatar
Avatar
Avatar
5
Okt. 19
23681
Admin User Missing Gelöst
password user admin
Avatar
Avatar
2
Sept. 21
7845
Enable password recovery from database
password database recovery
Avatar
Avatar
Avatar
6
Juli 17
12262
login fails. Wrong password
password admin resetpassword
Avatar
Avatar
3
Juli 16
9506
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Ausbildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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