[Odoo]Odoo=OpenErp管理员之忘记密码用户名咋整

2016年3月26日20:35:17 发表评论 4,347 views

转载来的:

     I have just finished setting up the onsite version of Odoo, it was working great, but I  logged myself out, thinking it will be simple to log back in. I still have the master password for the administrator, but now that login (http://localhost:8069) is not showing as before and instead it is now a company website asking for an email and password to login instead of the default prompt asking for username; password. How do I log back in?

下边是步骤(红色字体的就是相应的需要输入的命令):

Hi, I just found the solution, my admin password was okay; The problem was that once you add the administrator email, (settings-> users -> administrator) the administrator username also changes from the default 'admin' to the email you have put and 'admin' does not work for login anymore. I used the followin postgresql query to confirm my new username and password. Unfortunately I can't post the link as I don't have enough karma.

1. Take on postgres user privileges

you:-$ sudo -su postgres 

2. Start up the PostgreSQL command line with the list command to list all databases;

postgres:-$ psql -l     (不是一,是小写字母L)

 Name       |  Owner      | Encoding |   Collate         |    Ctype         |   Access privileges   
----------------+----------------+--------------+---------------------+--------------------+-----------------------
 odoo1       | openerp     |    UTF8   | en_US.UTF-8 | en_US.UTF-8 | 
 postgres   | postgres    | UTF8      | en_US.UTF-8  | en_US.UTF-8 | 
 template0 | postgres     | UTF8      | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
                |                   |               |                      |                      | postgres=CTc/postgres
 template1 | postgres     | UTF8      | en_US.UTF-8  | en_US.UTF-8 | =c/postgres          +
                 |                  |               |                      |                       | postgres=CTc/postgres

 

3. identify the database that is for your openerp. For me it was easy as the owner was "openerp", and the name "odoo1"找到你安装时候使用的数据库名字

4. Fire up the PostgreSQL command line and select your database as below; use database identifed from step 3.

postgres:-$ psql -d odoo1   (odoo1是你自己的数据库名)

psql (9.3.4)

Type "help" for help.

5. Query your database by asking it to display all logins, passwords from the table "res_users". This is the odoo store for logins and passwords

yourDataBaseName=#Query login, password from table, 

odoo1=# select login, password from res_users;

      login        | password

  --------------------+----------

   rick                | rick123

admin@bit.co.ke | WheyHaarD4u2Guess

(2 rows) 

odoo1=# exit   (退出)

上边的显示了有两个用户名,但是实际执行起来是看不到password的。但是最起码你知道用户名是啥了,满满回忆密码吧。ps其实登录窗体显示需要邮箱和密码,实际这是官方的诡计,迷惑人而已,用你设置的用户名顺当登录。

Although the username field is labelled "Email" you can still login with your username. I often login with my Odoo username (e.g. 'admin') with no problems. Indeed. I think they made this slightly confusing for most people. David, THIS is the answer I have been searching for! A million thanks! :) For a new install Odoo 8.0, use "admin" as the Email and the password for the database to log in. This was giving me fits as it's not explained anywhere in the docs. You're a life saver.

  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: