| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26 Feb 2010 12:54:11
|
Marco_Sousa
New member
Joined: 26 Feb 2010 12:45:18
Messages: 1
Offline
|
My computer is runnig windows vista home premium and i want to instal postgresql-8.4.2-1-windows. The problem is that i had a previous version and there is an account already in the computer but i forgot the password. When i am trying to instal new version, in the password part, as i do not remenber the pass i can not procede. How can i delete the previous account?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26 Feb 2010 14:18:17
|
Ashesh_V
Senior member
Joined: 21 Dec 2008 00:54:03
Messages: 205
Offline
|
Hi,
To change the password of the user. please use the following command:
Hope - this helps.
|
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA - The Enterprise Postgres Company |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 28 Mar 2010 19:11:45
|
m_a_59
New member
Joined: 28 Mar 2010 19:04:31
Messages: 3
Offline
|
CAn you clarify how to do this please? I'm new to databases,
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 29 Mar 2010 02:20:04
|
Ashesh_V
Senior member
Joined: 21 Dec 2008 00:54:03
Messages: 205
Offline
|
You don't need to delete the account.
Just open a command prompt and run the command as shown above, it should work. (On Vista, you may need to start the command-prompt with Administrator rights.)
|
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA - The Enterprise Postgres Company |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 29 Mar 2010 18:29:16
|
m_a_59
New member
Joined: 28 Mar 2010 19:04:31
Messages: 3
Offline
|
Alright so I go to Start menu, open up "cmd" under administrator and type in "net user <username> <password>" ?
When I do this I get:
c:\Windows\system32>net user <username> <password>
< was unexpected at this time.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2010 01:48:27
|
Ashesh_V
Senior member
Joined: 21 Dec 2008 00:54:03
Messages: 205
Offline
|
You need to replace <username> and <password> with actual values...
i.e. username = postgres
password = new_password
Hence, the command will be something like this:
|
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA - The Enterprise Postgres Company |
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 30 Mar 2010 18:49:20
|
m_a_59
New member
Joined: 28 Mar 2010 19:04:31
Messages: 3
Offline
|
ahhhh tyty!!!
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 8 Apr 2010 15:46:19
|
mark_Smith
Member
Joined: 3 Dec 2009 20:18:26
Messages: 11
Offline
|
Ashesh_V wrote:Hi,
To change the password of the user. please use the following command:
Hope - this helps.
Dear all,
I need to do the same thing for user=postgres (yes, I forgot the pw and did not right it down). Before I do, will this break anything? Currently I run Pgadmin III which I know is using a pw. Will this program stop working? Will it ask me for a new password (lets hope) or forever banish me from the db world? Thanks
-- Mark
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 11 Apr 2010 02:00:58
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
Currently I run Pgadmin III which I know is using a pw. Will this program stop working? Will it ask me for a new password (lets hope) or forever banish me from the db world? Thanks
If you have saved the password in pgAdmin3 then, it will fail to connect to DB. However, you can change the password of pgAdmin3 for that particular database. Please follow the link given below for more information:
http://www.pgadmin.org/docs/1.8/using.html
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 16 Apr 2010 18:34:51
|
mark_Smith
Member
Joined: 3 Dec 2009 20:18:26
Messages: 11
Offline
|
Ashesh_V wrote:You need to replace <username> and <password> with actual values...
i.e. username = postgres
password = new_password
Hence, the command will be something like this:
When I type in "net user postgres abcd" I get back the following:
No command: postgres
net [<method>] user [misc. options] [targets]
List users
net [<method>] user DELETE <name> [misc. options] [targets]
Delete specified user
net [<method>] user INFO <name> [misc. options] [targets]
List the domain groups of the specified user
net [<method>] user ADD <name> [password] [-c container] [-F user flags] [misc. options] [targets]
Add specified user
net [<method>] user RENAME <oldusername> <newusername> [targets]
Rename specified user
Valid methods: (auto-detected if not specified)
ads Active Directory (LDAP/Kerberos)
rpc DCE-RPC
rap RAP (older systems)
Valid targets: choose one (none defaults to localhost)
-S or --server=<server> server name
-I or --ipaddress=<ipaddr> address of target server
-w or --workgroup=<wg> target workgroup or domain
Valid miscellaneous options are:
-p or --port=<port> connection port on target
-W or --myworkgroup=<wg> client workgroup
-d or --debuglevel=<level> debug level (0-10)
-n or --myname=<name> client name
-U or --user=<name> user name
-s or --configfile=<path> pathname of smb.conf file
-l or --long Display full information
-V or --version Print samba version information
-P or --machine-pass Authenticate as machine account
-C or --comment=<comment> descriptive comment (for add only)
-c or --container=<container> LDAP container, defaults to cn=Users (for add in ADS only)
Mark-Smiths-MacBook-Pro:~ Mark$ net user postgres abcd
No command: postgres
net [<method>] user [misc. options] [targets]
List users
net [<method>] user DELETE <name> [misc. options] [targets]
Delete specified user
net [<method>] user INFO <name> [misc. options] [targets]
List the domain groups of the specified user
net [<method>] user ADD <name> [password] [-c container] [-F user flags] [misc. options] [targets]
Add specified user
net [<method>] user RENAME <oldusername> <newusername> [targets]
Rename specified user
Valid methods: (auto-detected if not specified)
ads Active Directory (LDAP/Kerberos)
rpc DCE-RPC
rap RAP (older systems)
Valid targets: choose one (none defaults to localhost)
-S or --server=<server> server name
-I or --ipaddress=<ipaddr> address of target server
-w or --workgroup=<wg> target workgroup or domain
Valid miscellaneous options are:
-p or --port=<port> connection port on target
-W or --myworkgroup=<wg> client workgroup
-d or --debuglevel=<level> debug level (0-10)
-n or --myname=<name> client name
-U or --user=<name> user name
-s or --configfile=<path> pathname of smb.conf file
-l or --long Display full information
-V or --version Print samba version information
-P or --machine-pass Authenticate as machine account
-C or --comment=<comment> descriptive comment (for add only)
-c or --container=<container> LDAP container, defaults to cn=Users (for add in ADS only)
Mark-Smiths-MacBook-Pro:~ Mark$
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Apr 2010 02:33:06
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
Mark-Smiths-MacBook-Pro:~ Mark$
You are trying windows way of adding user command on Mac..
If you want to add user in OS X, then use dscl command. For more information, please follow the link given below:
http://osxdaily.com/2007/10/29/how-to-add-a-user-from-the-os-x-command-line-works-with-leopard/
and if you want to change the password of existing user, then use following command:
sudo passwd <username>
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Apr 2010 14:35:23
|
mark_Smith
Member
Joined: 3 Dec 2009 20:18:26
Messages: 11
Offline
|
Thanks Vibhor, good information. I wonder if you can tell me what is going on here....
Last login: Sat Apr 17 13:08:45 on ttys000
/Library/PostgreSQL/8.4/scripts/runpsql.sh; exit
Mark-Smiths-MacBook-Pro:~ Mark$ /Library/PostgreSQL/8.4/scripts/runpsql.sh; exit
Server [localhost]: psql -p <5432> -U <postgres> <test>
Database [postgres]: createdb mydb
Port [5432]:
Username [postgres]:
psql: warning: extra command-line argument "createdb" ignored
psql: warning: extra command-line argument "mydb" ignored
psql: could not connect to server: Operation timed out
Is the server running on host "psql" and accepting
TCP/IP connections on port 5432?
Press <return> to continue...logout
[Process completed]
I can tell you where I am headed (for context). Its been awhile since I've tried to use Postgres. I was just trying to rerun
some old code that I believe once worked but is currently not. I thought I would just break the problem down into steps. The Postgres manuel says
that to test your connection try createdb mydb to see if it works.
Here is the old code I am trying to run (well, a small part of it anyway)
Mark-Smiths-MacBook-Pro:~ Mark$ /Library/PostgreSQL/8.4/scripts/runpsql.sh;
Server [localhost]: psql -p <5432> -U <postgres> <test>
Database [postgres]: postgres=# create table test_copy(id1 numeric,id2 numeric,id3 numeric);
Port [5432]:
Username [postgres]:
psql: warning: extra command-line argument "postgres=#" ignored
psql: warning: extra command-line argument "create" ignored
psql: warning: extra command-line argument "table" ignored
psql: warning: extra command-line argument "test_copy(id1" ignored
psql: warning: extra command-line argument "numeric,id2" ignored
psql: warning: extra command-line argument "numeric,id3" ignored
psql: warning: extra command-line argument "numeric);" ignored
psql: could not connect to server: Operation timed out
Is the server running on host "psql" and accepting
TCP/IP connections on port 5432?
Press <return> to continue...
Mark-Smiths-MacBook-Pro:~ Mark$
Obviously no luck here either.
PS Since I changed the topic I tried to change the thread by changing the subject line?? Not sure if that will work . -- Mark
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 17 Apr 2010 16:12:15
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline
|
Hmmm..
Mark-Smiths-MacBook-Pro:~ Mark$ /Library/PostgreSQL/8.4/scripts/runpsql.sh; exit
Server [localhost]: psql -p <5432> -U <postgres> <test>
Prompt:
"Server [localhost]" shows default host i.e localhost and at the place of passing hostname you are passing "psql -p <5432> -U <postgres> <test>" which is not right. I would suggest you to press enter.
Database [postgres]: createdb mydb
"Database [postgres]:" This message is showing default database would be postgres and if you want to change the default database then, please type the database name. However, you have mention "createdb mydb", which is again not right. Please press enter, without typing any thing.
similarly for others.
psql: could not connect to server: Operation timed out
Is the server running on host "psql" and accepting
TCP/IP connections on port 5432?
Above message is showing PostgreSQL is not running.
So, please follow the steps given below:
1. Execute following command to connect as Postgres User:
Above command will prompt for password, so enter your password and you would be able to connect to server as postgres user.
2. Go to /Library/PostgreSQL/8.4/ directory and execute following command:
Above Command will set the all environment variables like PATH Setting, PGDATA etc.
3. Execute following command to verify if the PostgreSQL Server is running or not:
If above command shows following message, then PostgreSQL is running:
If above command shows following message, then PostgreSQL is not running:
If PostgreSQL is not running, then execute following command to start the cluster:
4. After performing above activity, please execute the runpsql.sh as given below:
With this I would suggest you to go through the PostgreSQL Documentation or register for PostgreSQL Training from EnterpriseDB.
|
Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
|
|
|
 |
|
|