How to log in to odoo after creating a database? - macos

The requirements for odoo 9 are successfully installed. I'm vaulting the software from the source directory without installing it using the command
./openerp-server -r <USER> -w <PASSWORD> --db_port 5432 -d <DATABASE>
When I first ran the command as postgres user, the browser at the address localhost:8069 asked me to create a new database with a database name (although I already gave DATABASE as mydb in the command line above) using an admin user password. I gave odootest as database name along with the admin password (postgres user password) and checked the load demonstration data checkbox. The new instance was created and the list of apps were displayed. Everything was fine till that point
After logging out, I'm unable to log back in as the screen now shows this
I don't remember giving any email id with a password for this. How am I supposed to log in now? Is there any default entry for this?
OS: Mac OS-X 10.9

You can use in every OS
user: admin
psw: admin
it's default for all odoo/openerp version

Related

Windows: how can I set my PostgreSQL user to the superuser?

I am trying to create a database using PostgreSQL 9.4. I type "psql" in the command prompt, and then it asks for a password. I provide the password I set during the installation, but it says the authentication failed. After checking online, I concluded that I need to be using the superuser, named "postgres", which is the system user whose password is the one I set during the installation.
I am now trying to set PostgreSQL to this superuser. I spent a lot of time surfing the internet for a solution but wasn't able to solve the problem. I tried postgres ALTER USER myuser WITH SUPERUSER (I wrote that in the Windows command prompt), but it said that "alter" isn't recognized. Now, when I try to use PostgreSQL, my main problem is that I get the error: "role MYUSERNAME does not exist". (this is after I edited pg_hba.conf to make it not ask for a password)
By default, psql uses the name of the operating system to log in, to a database of the same name. If you want to log in as user postgres you should do:
psql -u postgres <any other options>
If a password is asked for, you give the password of the postgres user. You are now connected to the postgres database, where you really shouldn't be doing anything, except create new users (which are global to the installation) and other databases.
Once in the console, you can create new users like:
CREATE ROLE myusername LOGIN PASSWORD secret;
And new databases like:
CREATE DATABASE myowndb;
ALTER DATABASE myowndb OWNER TO myusername;
Then you log out from the console with \q.
In order to be able to access PostgreSQL using the new database, you have to edit the pg_hba.conf file (sample, modify to match your network settings):
host myowndb myusername 192.168.0.0/16 md5
Now you restart the PostgreSQL server from the Services tab in Administrative tools on the Control Panel.
Then you can log in to your new database:
psql -u myusername -d myowndb
Or use other clients like pgAdminIII.
Under Windows. The Postgres bin directory ships with the user commands createuser.exe and dropuser.exe.
Say, if running initdb (effective fresh install) or for some other reason there is no superuser (like the question).
Can also manage the users and superusers (-s option) with the above two commands. ie.
Create the superuser called postgres:
C:"Program Files"\PostgreSQL\15\bin\createuser.exe -s postgres
Drop a user:
C:"Program Files"\PostgreSQL\15\bin\dropuser.exe postgres

What is the default password for Postgres

I have just install Postgres 9.3 on Windows 7. The installation completed successfully. It has never asked me to provide the password for postgres user.
The service postgresql-x64-9.3 is up and running. However, I cannot connect: I do not not know the password. I've found the following answer, but it did not help:
similar question on Ubuntu
[LINUX]
might work for windows too
After installing postgres follow following steps in order to setup password for default system account of Linux execute following in terminal:
user:~$ sudo -i -u postgres
postgres#user:~$ psql
after executing above two commands you will get into postgres shell
Execute this query in postgres shell:
postgres=# ALTER USER postgres PASSWORD 'mynewpassword';
your new password is 'mynewpassword' without quotes and now you can connect with external GUI tools like DBeaver
WARNING: trust means exactly that. Anyone who can connect to the PostgreSQL server can control it. If you set trust mode that allows superusers like user postgres (or all users) to connect, they get total control of your PostgreSQL and can probably run shell commands too. You should usually only use it to change the password then restore the configuration back to the auth mode you were using before.
If you used an unattended installer script, the password will be in the script or associated config file.
Otherwise, treat it the same as if you lost/forgot the password rather than never knowing it:
Edit pg_hba.conf, setting the auth mode to trust instead of the default md5
In the Services control panel restart the PostgreSQL service
Connect with psql or PgAdmin or whatever
ALTER USER postgres PASSWORD 'mynewpassword';
Edit pg_hba.conf again and set the auth mode back to md5
Restart PostgreSQL again
pg_hba.conf is in your data directory. By default it'll be %PROGRAMFILES%\PostgreSQL\9.3\data.
To edit it you'll have to use the security tab to give yourself read/write permissions (via a UAC prompt). This might require you to set yourself as the owner of the file.
On unix systems it's more secure to prepend a
local all all peer
line to pg_hba.conf and then sudo -u postgres psql (assuming your PostgreSQL server runs as user postgres) to get an interactive psql session without using a password. That way you don't have to use trust.
On initialisation you can access the DB as:
Username: postgres
Password: postgres
By default user postgres does not have a password
Start psql and create a password:
sudo -u postgres psql
\password postgres - It will ask you enter a password for user postgres
Through trial and error I found that the password for Postgre SQL 10 for the username postgres is "admin". I kept typing in different password until I reached that password. I am using pgAdmin 4 to test out my SQL Statements, POSTGRE SQL 10 is the first server connection set up using localhost.
It seems there was no default password, but psql wouldn't accept a lack of a password (fe_sendauth: no password supplied). To get around this, I opened pgAdmin, then in the left sidebar:
Servers
Login/Group Roles
Right click postgres and click Properties,
Go to Definition tab
Set the password in the Password field
After saving, psql accepted that password. There may have been a switch I could have supplied to have it accept a lack of a password (--no-password?), but the user should probably have a password anyways, so this seemed reasonable.
go to control >> computer management >> Locaol users and group >> users >>
right click on openpgsvc >> set password.
after that now you can access with this password on openpgsvc
The simplest solution I've found is just to install PgAdmin and connect to the local server with the current Windows credentials (username + password). Then you can change the password to the postgres user.
step1: Go to control panel
Step2: Click on Administrative Tools
Step3: Click on Computer Management
Step4: There under "Local Users and Groups" Double click on user
Step:5: then right click on postgres and you can set password
refer this below image

PostgreSQL under Lion: What's the password?

I got my new lion machine. Ran the PostgreSQL installer from the PostgreSQL site for Mac and i have no multiple apps installed. One of them is "pgAdmin III.app". When I open it there is already one server connection available. localhost:5432
Whenever I try to connect to the server with a doubleclick the programm asks me for a password. I have no idea what to enter. It's not my admin password, it's not "postgres", it's not "localhost", it's not empty.
I just can't seem to connect to the server. Even when I check the properties of the localhost server the password field seems empty. However I'm not allowed to leave the password field empty.
Any idea what to do? I really need to setup postgres?
On my Mac OSX Lion, PostgreSQL configuration files are stored under /Library/PostgreSQL/9.0/data/
Haven't tried it on OSX, but on Ubuntu you can login as the system user 'postgres' to the default database 'postgres' without a password with
su postgres -c psql
You can then (re)set the password of the database superuser 'postgres'.
You can also edit the configuration file pg_hba.conf (don't know where it is located on a default OSX installation, on Ubuntu it is /etc/postgresql/8.4/main/pg_hba.conf) and grant access to the default database without authentication
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host postgres postgres 127.0.0.1/32 trust
After editing pg_hba.conf you must reload the configuration with
pg_ctlcluster 8.4 main reload
You can then connect with pgAdmin and (re)set the password, but don't forget to change the authentication method back to md5 again...
here's a better answer (works in OSX HighSierra): the account used is the one you're logged onto OSX with, therefore, the password is your password!
A similar question has been asked a short time ago. The steps described there should be appropriate for Lion also.
Postgresql: password authentication failed for user "postgres"

Forgotten password for Postgresql - Resetting password - Mac OS X Leopard

I used blog entry by Robby on Rails site:
http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition
Got to the end, but when I tried accessing the pg database I was denied.
I've tried to change pg_hba.config file to trust so that I can gain access anyway (without a password), but proved fruitless.
Please help. Thanks in advance.
Restart postgresql after you alter the pg_hba.config file to make sure your changes are read. Next, type
psql -U myUser template1
in a terminal, where myUseris the name of the user running the postgres proces. That should make you log in as administrator. Next, in the psql session, write
ALTER USER realUser PASSWORD 'myNewPassword';
in order to reset the password. Here realUseris the user of the database you are trying to connect to.

How to reset/change expired password for DB2 Content Manager 8.4.1

I had installed IBM DB2 Content Manager 8.4.1 months ago and now I wanted to access it to continue some more work.
But when I try to log in using System Administration Client, it tells me the password is expired. The error is:
DGL0394A: Error in ::DriverManager.getConnection;[jcc][t4][2012][11248][3.50.152]
Connection authorization failure occurred. Reason: Password expired.
ERRORCODE=-4214,SQLSTATE=28000 (STATE) : ;
[SERVER = icmnsldb, USERID = icmadmin, SQL RC = -4214, SQL STATE = 28000]
I've tried looking thru the config files, using the java update command line.. and I can't find a way to change or reset the password. I can't use System Administration Client to change the passwords, since it won't log me in to begin with. Any other method I can use to reset/change the password for a DB2 CM user?
DB2 uses the operating system to authenticate users, so you need to use the OS tools to reset the icmadmin user's password. Your post is tagged as Windows, so look for the icmadmin user in either the local machine or in the domain if your server belongs to a domain.
Just use the Client for Windows on a desktop machine and not the eClient to login. It will directly notify about a expired password and you can set the new password immediately.
I faced the same issue. I logged in as root and chaged the password for db2 user by passwd . and changed in the WAS console. It worked.
In Windows, click on start > Control Panel > User Accounts > User Accounts > Manage User Accounts.
Here, select the DB2 username and click on Reset Password.
If you are on Docker, you need to perform a docker exec into the DB2 container (Linux) and then change the password for the local user that you are trying to log in to DB2 with. In my case, the name of the user was "myuser". I changed the password by executing
passwd myuser
Note that you are root by default when you exec into the container. Else use
docker exec -u root <containerName> /bin/sh

Resources