Обсуждение: support for using runas for pg

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

support for using runas for pg

От
Mohamed Fazil
Дата:
Hi,
 
Thanks for the support provided by you guys. I am able to run the application using runas.exe but it does not allows me to provide the domain password with the same command. Could you please provide me a solution to provide password with it. Also Is there any utility to run postgres as a different user in NT. Please help me out.
 
Regards
Mohamed Fazil


Yahoo! DSL Something to write home about. Just $16.99/mo. or less

Re: support for using runas for pg

От
"Magnus Hagander"
Дата:
> Thanks for the support provided by you guys. I am able to run
> the application using runas.exe but it does not allows me to
> provide the domain password with the same command. Could you
> please provide me a solution to provide password with it.

use runas with /savecred the first time, and then it'll run without
prompting you for the password.

> Also Is there any utility to run postgres as a different user
> in NT. Please help me out.

I've heard of thirdparty tools that did this, but I can't name one.
You'll be hard-pressed to find one that's supported on NT4 these days,
though, but there might be some around.

//Magnus

Re: support for using runas for pg

От
Mohamed Fazil
Дата:
Hi,
 
I got a third party utility to run pgsql in non administrative users account and without prompting password. The utility providers ensure that the utility will work in NT. I used this utility for running pg8.1.1 and it shows me the following error with a prompt titled "ININTDB.EXE - DLL Initialization Failed" and the message "Initialization of Dynamic Link Library D:\WINNT\system32\KERNEL32.dll failed. The process is terminating abnormally". Before running this i had created new user named postgres without administrator rights. I tried by providing read & execute rights for the user postgres to Kernl32.dll, user32.dll & for the folder of pg that contains libraries and exe's. Then also it is showing the same error.
 
please provide me a solution for this. I had tested their utility by running other app same as i tested pg, then it works in NT.
 
As u mentioned in the previous mail /savecred is not working in Windows 2000. This utility will provides solution for this also.
 
Regards
Mohamed Fazil

Magnus Hagander <mha@sollentuna.net> wrote:
> Thanks for the support provided by you guys. I am able to run
> the application using runas.exe but it does not allows me to
> provide the domain password with the same command. Could you
> please provide me a solution to provide password with it.

use runas with /savecred the first time, and then it'll run without
prompting you for the password.

> Also Is there any utility to run postgres as a different user
> in NT. Please help me out.

I've heard of thirdparty tools that did this, but I can't name one.You'll be hard-pressed to find one that's supported on NT4 these days,
though, but there might be some around.

//Magnus


Yahoo! Photos
Got holiday prints? See all the ways to get quality prints in your hands ASAP.

Re: support for using runas for pg

От
"Magnus Hagander"
Дата:
> Hi,
>
> I got a third party utility to run pgsql in non
> administrative users account and without prompting password.
> The utility providers ensure that the utility will work in
> NT. I used this utility for running pg8.1.1 and it shows me
> the following error with a prompt titled "ININTDB.EXE - DLL
> Initialization Failed" and the message "Initialization of
> Dynamic Link Library D:\WINNT\system32\KERNEL32.dll failed.
> The process is terminating abnormally". Before running this i
> had created new user named postgres without administrator
> rights. I tried by providing read & execute rights for the
> user postgres to Kernl32.dll, user32.dll & for the folder of
> pg that contains libraries and exe's. Then also it is showing
> the same error.

Does it work when you use runas (I know this is not a permanent solution
for you, but as a part of the debugging). IIRC, you said it did and the
problem was just that runas prompted for password - but was this on the
samme machine?

If it does work with runas, then you have a bug in the third party
program you're using, and you need to take it up with them.


//Magnus

Re: support for using runas for pg

От
Mohamed Fazil
Дата:
Hi,
 
The password prompting was happpened while using runas in win 2k & XP.As you mentioned in the previous mail i used a thirdy party utility to solve this issue and its working in XP &Win 2k. The third part utiity is a seperate pack which is called runasv, its not using the runas in windows. The utility providers ensures that the utility will work in NT also. This will behave similar to runas and without prompting password. In NT this utility is invoking  innitdb, pg-ctl  but creating an errorr as i mentioned in the previous mail. command  execute will be similar as follows in command prompt
D:\runasv\Release>runasv "D:\Test\pg8.1.1ni\bin\initdb.exe -A "trust"  -D "D:\Testing\pgsql8.1ni\data"" -h \DEVTEST\postgres password
after invoking this i am getting the dll error. syntax mentioned in the above command is as instructed by third party providers. If i am provid ing administrator rights to the user postgres and tried the above , then it is not showinng the dll error but pg will not work. I had provided read & execute rights for the  user postgres to Kernl32.dll, user32.dll & for the folder of  pg that contains libraries and exe's. Then also its not working. Hope ur doubt has cleared.
 
Mohamed Fazil
Magnus Hagander <mha@sollentuna.net> wrote:
> Hi,
>
> I got a third party utility to run pgsql in non
> administrative users account and without prompting password.
> The utility providers ensure that the utility will work in
> NT. I used this utility for running pg8.1.1 and it shows me
> the following error with a prompt titled "ININTDB.EXE - DLL
> Initialization Failed" and the message "Initialization of
> D ynamic Link Library D:\WINNT\system32\KERNEL32.dll failed.
> The process is terminating abnormally". Before running this i
> had created new user named postgres without administrator
> rights. I tried by providing read & execute rights for the
> user postgres to Kernl32.dll, user32.dll & for the folder of
> pg that contains libraries and exe's. Then also it is showing
> the same error.

Does it work when you use runas (I know this is not a permanent solution
for you, but as a part of the debugging). IIRC, you said it did and the
problem was just that runas prompted for password - but was this on the
samme machine?

If it does work with runas, then you have a bug in the third party
program you're using, and you need to take it up with them.


//Magnus

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org


Yahoo! Photos – Showcase holiday pictures in hardcover
Photo Books. You design it and we’ll bind it!

Re: support for using runas for pg

От
"Donald Fraser"
Дата:
First you didn't answer the previous question:
>Does it work when you use runas
This question was asked to pin point the problem: is the problem with the
postgres windows user set-up or is it with the third party tool?

I personally have used "runas" to run windows batch files with PostgreSQL
and it works fine for me, therefore I would suggest that you have either a
problem with the postgres user account or with the third party tool "runasv"

I use a third party tool named "cpau"
(http://www.joeware.net/win/free/tools/cpau.htm) to automate batch processes
without password prompting and again I have no problems with PostgreSQL -
therefore please try one of these options before blaming PostgreSQL. If any
one of these options work then the problem will be with your third party
tool "runasv"

Regards
Donald Fraser


Re: support for using runas for pg

От
"Donald Fraser"
Дата:
>I am able to start and stop database after logging as user postgres in NT.
It is clear that you can start and stop postgreSQL using the postgres user.
Therefore access to pg_ctl.exe is working as expected!
The fact that the problem only exists when you introduce a thrid party tool
to perform the same tasks you are able to do when logged on as the postgres
user strongly suggests that the problem is with your thrid party tool. That
is your third party tool is emulating the command shell environment but not
100%.

What happens when you try and run some other application using the postgres
user when logged on as the postgres user? For example:
1) log on as postgres and run the program ipconfig.exe (this system program
uses the kernel32.dll).
2) When you have established that the previous step works ok, run the same
command from a batch/script file using the "runasv" program.

Regards
Donald Fraser

Ps. Please do not include email addresses in your reply - they become public
domian and allow spam engines to find them!


Re: support for using runas for pg

От
"Magnus Hagander"
Дата:
> Hi,
>
> Thanks for your response,
>
> Ur Q: Does it work when you use runas?
> YES, it works when i use runas to run postgres in Win 2000 & XP.

Ok.


> Below i am mentioning my requirements and the bug received
> more clearly
>
> 1.    I am trying to use postgres in three versions of
> Windows operating system (Windows 2000,XP & NT)
> 2.    I am able to run postgres in Win 2000 & XP using runas.
> The problem which i faced while using runas is the prompting
> for password. That problem also solved after using the utility runasv.

Okay, that's good.

> 3.    Now my problem is in Windows NT.

Beware that NT4 is not supported anymore, and that PostgreSQL on NT4 is
in some kind of not-really-supported-but-works-most-of-the-time state.


> 4.    In NT we cannot use runas. So i serach for utility that
> supports NT also and i got runasv
> http://www.codeguru.com/Cpp/W-P/system/article.php/c5755.

<snip>


> 8.    I am able to start and stop database after logging as
> user postgres in NT.

Then your problem is that the tool above that you are using is breaking
something, and that is where your error-tracking should be directed. Not
much we can help you with from here.


> I was using postgres 7.3 version in my intranet web
> application for the past two years using cygwin. It is
> working fine in NT,2000 & XP. Now i want to upgrade my
> database the new feature of pg8.1.1 that removes the use of cygwin.

I beleive you can build 8.1.1 on cygwin as well. I haven't done it
myself, and I wouldn't put a production db on cygwin, but I know others
have done so with 8.0 at least. If you absolutely need to run it on NT4
(which in general is a bad idea, regardless of what version of pg you
chose), you might want to investigate that.

//Magnus