Subject | Re: [firebird-support] Re: gsec and stdout on Windows 7 |
---|---|
Author | Helen Borrie |
Post date | 2010-02-02T22:25:56Z |
At 01:49 AM 3/02/2010, you wrote:
1. In aliases.conf on the server, define an alias for the security database. On my (WinXP) system, on a server called "dev1" I have:
sec = c:\Programs\Firebird\Firebird_2_0\security2.fdb
2. On WinXP, stdout behaves "normally" for a local shell. From the directory on the remote client where you have the **correct version** of gsec.exe, do:
c:\Firebird\tools\bin>>gsec -database dev1:sec -display -user sysdba -password masterkey
user name uid gid full name
--------------------------------------------------------------------------------
----------
SYSDBA 0 0 Sql Server Administrator
BLIMEY 0 0
REPL 0 0
3. Next, on the host machine, set up a share for the remote (from server) location where you want piped output to go. My server (dev1) uses a directory called "scratch" on a share that it sees as "drive T".
4. From the remote client's tools directory, do:
c:\Firebird\tools\bin>gsec -database dev1:sec -display -user sysdba -password xxxxxxx > t:\scratch\output.txt
And here is what output.txt looks like:
user name uid gid full name
------------------------------------------------------------------------------------------
SYSDBA 0 0 Sql Server Administrator
BLIMEY 0 0
REPL 0 0
Note that Vista didn't give local shell access to any users that were not Administrators. I never had Vista but, from my recollection, even a user with network Administrator privileges had to set the "Run as Administrator" flag to run a local command shell. I suppose Win 7 would not have regressed from that.
./heLen
>In the meantime I found out the following 2 things:As a reality check, to determine whether this is an access problem particular to Windows 7, or just some mistaken assumptions about access to the security database on Fb 2 and higher, try the following:
>
>1. If I call gsec with a local security database everything works as expected. The problem only occurs when it's a remote database. In both cases I used local gsec program.
>
>2. If I don't redirect stdout to a file but say "gsec -display | more" I have the same problem: nothing is shown on the console (while it works with more and the local security database).
>
>I hope this helps to solve this problem!
1. In aliases.conf on the server, define an alias for the security database. On my (WinXP) system, on a server called "dev1" I have:
sec = c:\Programs\Firebird\Firebird_2_0\security2.fdb
2. On WinXP, stdout behaves "normally" for a local shell. From the directory on the remote client where you have the **correct version** of gsec.exe, do:
c:\Firebird\tools\bin>>gsec -database dev1:sec -display -user sysdba -password masterkey
user name uid gid full name
--------------------------------------------------------------------------------
----------
SYSDBA 0 0 Sql Server Administrator
BLIMEY 0 0
REPL 0 0
3. Next, on the host machine, set up a share for the remote (from server) location where you want piped output to go. My server (dev1) uses a directory called "scratch" on a share that it sees as "drive T".
4. From the remote client's tools directory, do:
c:\Firebird\tools\bin>gsec -database dev1:sec -display -user sysdba -password xxxxxxx > t:\scratch\output.txt
And here is what output.txt looks like:
user name uid gid full name
------------------------------------------------------------------------------------------
SYSDBA 0 0 Sql Server Administrator
BLIMEY 0 0
REPL 0 0
Note that Vista didn't give local shell access to any users that were not Administrators. I never had Vista but, from my recollection, even a user with network Administrator privileges had to set the "Run as Administrator" flag to run a local command shell. I suppose Win 7 would not have regressed from that.
./heLen