Обсуждение: problem trying to su - postgres

Поиск
Список
Период
Сортировка

problem trying to su - postgres

От
Neil.Thompson@shepway.gov.uk
Дата:
I'm a newbie to all things linux and have the following problem
 
running red hat linux 9 i log into my pc, change to su - and type the password, all is ok and i get root@localhost
 
I'm trying now to configure postgresql, which i installed with linux and it says to su - postgres, i do this but instead of getting postgres@localhost i get -bash-2.05b$ , is this right? or do i need to reinstall something / update something?
 
Using the graphical interface i've tried to add postgres as a user as it doesnt show, but it says user postgres already exists.
 
An help would be greatfully received.
 
Thanks

Neil Thompson
Analyst/Programmer



The contents and any attachments of this e-mail message are confidential and intended only for the named addressees.
If you have received it in error, please advise the sender immediately by return email and then delete it from your system.
Any unauthorised distribution, or copying of this transmission, or mis-use or wrongful disclosure of information contained in it, is strictly prohibited.
Shepway District Council cannot accept liability for any statements made which are clearly the sender's own and not expressly made on behalf of the council."
 


---------------------------------------------------------
Scanning of this message and addition of this footer is performed by
SurfControl SuperScout Email Filter software in conjunction with
virus detection software.
---------------------------------------------------------

Re: problem trying to su - postgres

От
Radu-Adrian Popescu
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil.Thompson@shepway.gov.uk wrote:
| I'm a newbie to all things linux and have the following problem
|
| running red hat linux 9 i log into my pc, change to su - and type the
| password, all is ok and i get root@localhost <mailto:root@localhost>
|
| I'm trying now to configure postgresql, which i installed with linux and
| it says to su - postgres, i do this but instead of getting
| postgres@localhost <mailto:postgres@localhost> i get -bash-2.05b$ , is
| this right? or do i need to reinstall something / update something?
|

It is correct. You can also do a "whoami":
[postgres@rpopescu postgres]$ whoami
postgres
[root@rpopescu root]# whoami
root
The prompt setting may be different on you machine.

| Using the graphical interface i've tried to add postgres as a user as it
| doesnt show, but it says user postgres already exists.
|

You don't specify how you've installed postgresql. On redhats you can get it
from the installation disks. It's an older version that the current, obviously,
but it looks like you're trying to get started with it, and therefore it should
do. So your best bet is to try to install it from the RPMs, since it's easier
than compiling it from source (not that that would be a killer or anything, but
not something a newbie should be doing from day one imho).
So step back, take a deep breath, run as root
rpm -qa | grep postgres
and if that comes up with 3-5 packages, you're almost done. If not, mount the
cdroms and install postgresql from there (rpm -i postgresql-*.rpm).
Have you checked the docs on the main website yet ?

| An help would be greatfully received.
|
| Thanks
|
| *Neil Thompson
| Analyst/Programmer*
|

Regards and best of luck,
- --
Radu-Adrian Popescu
CSA, DBA, Developer
Aldratech Ltd.
+40213212243
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAm1cOVZmwYru5w6ERArMqAKCRSvTWz6XeGANKO8qvPZZa4inUqQCghymQ
r17GzWFa/dmtpRjtzfn80r4=
=uibD
-----END PGP SIGNATURE-----


Re: problem trying to su - postgres

От
Karel Zak
Дата:
On Fri, May 07, 2004 at 09:54:42AM +0100, Neil.Thompson@shepway.gov.uk wrote:
> I'm a newbie to all things linux and have the following problem
>
> running red hat linux 9 i log into my pc, change to su - and type the
> password, all is ok and i get root@localhost <mailto:root@localhost>
>
> I'm trying now to configure postgresql, which i installed with linux and it
> says to su - postgres, i do this but instead of getting postgres@localhost
> <mailto:postgres@localhost>  i get -bash-2.05b$ , is this right? or do i
> need to reinstall something / update something?

 The important is user identity, you can check it by 'id' command:

         # id
         uid=0(root) gid=0(root) groups=0(root)
         # su - postgres
         $ id
         uid=31(postgres) gid=32(postgres) groups=32(postgres)


 Your '-bash-2.05b$' is only prompt  and depend on PS1 environment value
 setting.   You  can  found  more  information  in  'man  bash'  in  the
 /etc/profile file or other places...

    Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

Re: problem trying to su - postgres

От
Radu-Adrian Popescu
Дата:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil.Thompson@shepway.gov.uk wrote:
| many thanks
|
| For info I've installed it all from cd.
|
| I tried the whoami, and although the command prompt thing says -bash-2.05b$
| it did return postgres as the user, THANKS!
|
| also tried the rpm -qa | grep postgres, this returned:
| postgresql-libs-7.3.4-3.rhl9
| postgresql-7.3.4-3.rhl9
| postgresql-server-7.3.4-3.rhl9
|
| so I guess I'm worrying over nothing, sorry. When you are learning you hope
| to see exactly whats written in the install docs. At least I now know how to
| check.
|

Yes, you were :-) but hey that's how it goes.
Although I think you were reading the install from source docs. Better off
checking the RPM part and the docs from the RPM distribution (postgresql-doc I
think). Also you may whish to install postgresql-devel and/or other devel
packages to be able to use it with python/php/perl/etc.

| Thank You
|

Cheers

| Neil Thompson
|
| -----Original Message-----
| From: Radu-Adrian Popescu [mailto:radu.popescu@aldratech.com]
| Sent: 07 May 2004 10:30
| To: Neil.Thompson@shepway.gov.uk
| Cc: pgsql-admin@postgresql.org
| Subject: Re: [ADMIN] problem trying to su - postgres
|
|
| Neil.Thompson@shepway.gov.uk wrote:
| | I'm a newbie to all things linux and have the following problem
| |
| | running red hat linux 9 i log into my pc, change to su - and type the
| | password, all is ok and i get root@localhost <mailto:root@localhost>
| |
| | I'm trying now to configure postgresql, which i installed with linux and
| | it says to su - postgres, i do this but instead of getting
| | postgres@localhost <mailto:postgres@localhost> i get -bash-2.05b$ , is
| | this right? or do i need to reinstall something / update something?
| |
|
| It is correct. You can also do a "whoami":
| [postgres@rpopescu postgres]$ whoami
| postgres
| [root@rpopescu root]# whoami
| root
| The prompt setting may be different on you machine.
|
| | Using the graphical interface i've tried to add postgres as a user as it
| | doesnt show, but it says user postgres already exists.
| |
|
| You don't specify how you've installed postgresql. On redhats you can get it
| from the installation disks. It's an older version that the current,
| obviously,
| but it looks like you're trying to get started with it, and therefore it
| should
| do. So your best bet is to try to install it from the RPMs, since it's
| easier
| than compiling it from source (not that that would be a killer or anything,
| but
| not something a newbie should be doing from day one imho).
| So step back, take a deep breath, run as root
| rpm -qa | grep postgres
| and if that comes up with 3-5 packages, you're almost done. If not, mount
| the
| cdroms and install postgresql from there (rpm -i postgresql-*.rpm).
| Have you checked the docs on the main website yet ?
|
| | An help would be greatfully received.
| |
| | Thanks
| |
| | *Neil Thompson
| | Analyst/Programmer*
| |
|
| Regards and best of luck,
| --
| Radu-Adrian Popescu
| CSA, DBA, Developer
| Aldratech Ltd.
| +40213212243



- --
Radu-Adrian Popescu
CSA, DBA, Developer
Aldratech Ltd.
+40213212243
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAm4FcVZmwYru5w6ERAhUoAJ94w4ZmFmJUhcSJydSUxdn/VfJwjQCdEE/4
EW9lcGQ0CpQmfr3SE0+hOXE=
=l1AO
-----END PGP SIGNATURE-----