pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedAutologin problem
6+ messages / 5 participants
[nested] [flat]
* Autologin problem
@ 2001-01-05 02:55 Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
2001-01-05 14:07 ` Re: Autologin problem Adam Lang <aalang@rutgersinsurance.com>
2001-01-05 15:45 ` Re: Autologin problem Steve Bern <sabern@eshell.net>
0 siblings, 2 replies; 6+ messages in thread
From: Julio Cuz, Jr. @ 2001-01-05 02:55 UTC (permalink / raw)
To: pgsql-php; php-db@lists.php.net
Hi--
I'm trying to run the following command on the "/etc/rc.local" so it will
run everytime (RedHat 7/PHP4/PostgreSQL):
nohup su -c 'postmaster -i -D /usr/local/pgsql/data \
</dev/null >>server.log 2>>1 &' <username>
The problem is that <username> has a password set, and since Linux doesn't
ask for it when it's on the rc.local file, my command fails.
Is there a way to include the password with the "su" command?
Is there a way to CLEAR a user's password and set it to NULL?
Julio Cuz, Jr.
Riverside Community College
jcuz@rccd.cc.ca.us
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Autologin problem
2001-01-05 02:55 Autologin problem Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
@ 2001-01-05 14:07 ` Adam Lang <aalang@rutgersinsurance.com>
1 sibling, 0 replies; 6+ messages in thread
From: Adam Lang @ 2001-01-05 14:07 UTC (permalink / raw)
To: pgsql-php
You shouldn't post to multiple lists at one time. It is rude for very many
reasons.
This is the line I use to start postgres from rc.local (watch the word
wrap). Password is irrelevant. If I understand correctly, root is what
runs the rc.local and root never needs a password to su to another user.
Log in as root and su to a user. You'll see. Very possible your comand is
failing for other reasons.
# Start Postgresql
su -l <username for which postgres runs under> -c "<location of
postmaster> -i -D <postgres data directory> >> <path to postgres log file>
2>>1 &"
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Julio Cuz, Jr." <jcuz@rccd.cc.ca.us>
To: <pgsql-php@postgresql.org>; <php-db@lists.php.net>
Sent: Thursday, January 04, 2001 9:55 PM
Subject: [PHP] Autologin problem
> Hi--
>
> I'm trying to run the following command on the "/etc/rc.local" so it will
> run everytime (RedHat 7/PHP4/PostgreSQL):
>
> nohup su -c 'postmaster -i -D /usr/local/pgsql/data \
> </dev/null >>server.log 2>>1 &' <username>
>
> The problem is that <username> has a password set, and since Linux doesn't
> ask for it when it's on the rc.local file, my command fails.
>
> Is there a way to include the password with the "su" command?
>
> Is there a way to CLEAR a user's password and set it to NULL?
>
> Julio Cuz, Jr.
> Riverside Community College
> jcuz@rccd.cc.ca.us
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Autologin problem
2001-01-05 02:55 Autologin problem Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
@ 2001-01-05 15:45 ` Steve Bern <sabern@eshell.net>
2001-01-05 16:01 ` Re: Autologin problem Adam Lang <aalang@rutgersinsurance.com>
2001-01-05 16:07 ` Re: Autologin problem Chuck Milam <chuck@milams.net>
2001-01-05 19:16 ` Re: Autologin problem Partyka Robert <bobson@saturn.alpha.pl>
1 sibling, 3 replies; 6+ messages in thread
From: Steve Bern @ 2001-01-05 15:45 UTC (permalink / raw)
To: Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>; +Cc: pgsql-php; php-db@lists.php.net
I assume you're trying to get PostGresql to load automatically. In RH,
get rid of the stuff you wrote below and put in the following line (in
rc.local):
/etc/rc.d/init.d/postgresql start
This is the proper way to start the DB.-- Read the file to see what it
does. You can also stop and restart it in similar fasion.
On Thu, 4 Jan 2001, Julio Cuz, Jr. wrote:
> Hi--
>
> I'm trying to run the following command on the "/etc/rc.local" so it will
> run everytime (RedHat 7/PHP4/PostgreSQL):
>
> nohup su -c 'postmaster -i -D /usr/local/pgsql/data \
> </dev/null >>server.log 2>>1 &' <username>
>
> The problem is that <username> has a password set, and since Linux doesn't
> ask for it when it's on the rc.local file, my command fails.
>
> Is there a way to include the password with the "su" command?
>
> Is there a way to CLEAR a user's password and set it to NULL?
>
> Julio Cuz, Jr.
> Riverside Community College
> jcuz@rccd.cc.ca.us
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Autologin problem
2001-01-05 02:55 Autologin problem Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
2001-01-05 15:45 ` Re: Autologin problem Steve Bern <sabern@eshell.net>
@ 2001-01-05 16:01 ` Adam Lang <aalang@rutgersinsurance.com>
2 siblings, 0 replies; 6+ messages in thread
From: Adam Lang @ 2001-01-05 16:01 UTC (permalink / raw)
To: ; +Cc: pgsql-php
Actually, that is a valid point. Do you compile postgres or install it with
the OS?
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Steve Bern" <sabern@eshell.net>
To: "Julio Cuz, Jr." <jcuz@rccd.cc.ca.us>
Cc: <pgsql-php@postgresql.org>; <php-db@lists.php.net>
Sent: Friday, January 05, 2001 10:45 AM
Subject: Re: [PHP] Autologin problem
> I assume you're trying to get PostGresql to load automatically. In RH,
> get rid of the stuff you wrote below and put in the following line (in
> rc.local):
>
> /etc/rc.d/init.d/postgresql start
>
> This is the proper way to start the DB.-- Read the file to see what it
> does. You can also stop and restart it in similar fasion.
>
>
> On Thu, 4 Jan 2001, Julio Cuz, Jr. wrote:
>
> > Hi--
> >
> > I'm trying to run the following command on the "/etc/rc.local" so it
will
> > run everytime (RedHat 7/PHP4/PostgreSQL):
> >
> > nohup su -c 'postmaster -i -D /usr/local/pgsql/data \
> > </dev/null >>server.log 2>>1 &' <username>
> >
> > The problem is that <username> has a password set, and since Linux
doesn't
> > ask for it when it's on the rc.local file, my command fails.
> >
> > Is there a way to include the password with the "su" command?
> >
> > Is there a way to CLEAR a user's password and set it to NULL?
> >
> > Julio Cuz, Jr.
> > Riverside Community College
> > jcuz@rccd.cc.ca.us
> >
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Autologin problem
2001-01-05 02:55 Autologin problem Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
2001-01-05 15:45 ` Re: Autologin problem Steve Bern <sabern@eshell.net>
@ 2001-01-05 16:07 ` Chuck Milam <chuck@milams.net>
2 siblings, 0 replies; 6+ messages in thread
From: Chuck Milam @ 2001-01-05 16:07 UTC (permalink / raw)
To: Steve Bern <sabern@eshell.net>; +Cc: Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>; pgsql-php; php-db@lists.php.net
On Fri, 5 Jan 2001, Steve Bern wrote:
> I assume you're trying to get PostGresql to load automatically. In RH,
> get rid of the stuff you wrote below and put in the following line (in
> rc.local):
>
> /etc/rc.d/init.d/postgresql start
Actually, do a "man chkconfig" and follow the directions there. Much
neater.
In a nutshell:
chkconfig --level 2345 postgresql on
chkconfig --list
--
Chuck Milam
chuck@milams.net
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Autologin problem
2001-01-05 02:55 Autologin problem Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
2001-01-05 15:45 ` Re: Autologin problem Steve Bern <sabern@eshell.net>
@ 2001-01-05 19:16 ` Partyka Robert <bobson@saturn.alpha.pl>
2 siblings, 0 replies; 6+ messages in thread
From: Partyka Robert @ 2001-01-05 19:16 UTC (permalink / raw)
To: Steve Bern <sabern@eshell.net>; +Cc: Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>; pgsql-php; php-db@lists.php.net
In fact the RH style (rc.d) way is to add symlink "S95postgresql" (or
"S<what_ever_you_need_number>postgresql" the number after "S" is for
set the position after what postgres must start (eg. after or before
apache) - for more detail see rc file in rc.d (and other rc.* files
too)) on rc3.d (or directory for other runlevel) directory to the
/etc/init.d/postgresql
In fact in this rc.local start string was some syntax bugs (misuses?)
first of all You don't need to use nohup. It is nohup'ed by default (If I
good remember)
Second: Always use "su" with "-" option!
It meens that proper syntax is
su - -c "command to run" <username>
the "-" swith is for map env variables to variables proper for user
<username>
hope it helpful.
regards
Robert
> I assume you're trying to get PostGresql to load automatically. In RH,
> get rid of the stuff you wrote below and put in the following line (in
> rc.local):
>
> /etc/rc.d/init.d/postgresql start
>
> This is the proper way to start the DB.-- Read the file to see what it
> does. You can also stop and restart it in similar fasion.
>
>
> On Thu, 4 Jan 2001, Julio Cuz, Jr. wrote:
>
> > Hi--
> >
> > I'm trying to run the following command on the "/etc/rc.local" so it will
> > run everytime (RedHat 7/PHP4/PostgreSQL):
> >
> > nohup su -c 'postmaster -i -D /usr/local/pgsql/data \
> > </dev/null >>server.log 2>>1 &' <username>
> >
> > The problem is that <username> has a password set, and since Linux doesn't
> > ask for it when it's on the rc.local file, my command fails.
> >
> > Is there a way to include the password with the "su" command?
> >
> > Is there a way to CLEAR a user's password and set it to NULL?
> >
> > Julio Cuz, Jr.
> > Riverside Community College
> > jcuz@rccd.cc.ca.us
> >
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2001-01-05 19:16 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-05 02:55 Autologin problem Julio Cuz, Jr. <jcuz@rccd.cc.ca.us>
2001-01-05 14:07 ` Adam Lang <aalang@rutgersinsurance.com>
2001-01-05 15:45 ` Steve Bern <sabern@eshell.net>
2001-01-05 16:01 ` Adam Lang <aalang@rutgersinsurance.com>
2001-01-05 16:07 ` Chuck Milam <chuck@milams.net>
2001-01-05 19:16 ` Partyka Robert <bobson@saturn.alpha.pl>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox