pdox 4.5 Terminal Server Username=Computername

pdox 4.5 Terminal Server Username=Computername

Post by David Klei » Fri, 06 Jun 2003 00:08:25



Hi
I am having the following problem. All users using a pdox 4.5 dos
application with terminal Server are all being assigned the computer
name as the username. Since they are all coming in thru the same
computer they all have the same username even though they have different
usernames as far as the operating system knows. Any help would be
greatly appreciated
David Klein

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Rodney Wis » Fri, 06 Jun 2003 01:47:58


I always think its best to have two levels of user identity.

1. The Username that the computer understands (and logs the client onto the
server)

2. A completely separate Username/Password scheme built into the Paradox
application that is managed 100% by the Paradox application and has no
correlation with the system username and password.

In actuality, the System username and password has no real meaning for
Paradox applications because ALL USERS require FULL ACCESS RIGHTS.

So if you want to track and control the Paradox application for:
   1. Who is on the system.
   2. What rights will they have.
   3. What options are available to them.
   4. Audit trail info.
   5. etc.....

Your faced with developing your own Paradox User/Password system....

...
    `.??.`.??.`->  rodney

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Rodney Wis » Fri, 06 Jun 2003 02:47:58


David,

After posting my response to your question... I realized that I might not
have not read the question close enough and may have actually completely
miss-understood it.    :O

I was going to write back and suggest "Sessions" to you.... but after
re-reading the question (for the first time),  I realized that your clients
are all PDOX DOS.... coming in through a single "Terminal"....  I'm not sure
here....

Hopefully someone else, who pays closer attention to your question then
myself... and has a more intimate understanding regarding your problem...
will give you a more meaningful response.

...
    `.??.`.??.`->  rodney

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Lorrin Moor » Fri, 06 Jun 2003 04:04:59


Well I thought it was just fine. <g>  I only use UserName() (and
ErrorUser() ) in my apps for resource contention problems (for displaying
the machine name of the offender, so you can walk to the correct machine)  
Never do I use it to actually log a user.  For that, I use a userID and
machineID system.  

But in answer to David's question, you can use SetUserName() to change
the machine name and it will only persist for the current session.

Quote:Rodney Wise wrote...
> David,

> After posting my response to your question... I realized that I might not
> have not read the question close enough and may have actually completely
> miss-understood it.    :O

--
Lorrin Moore (filter the spam to reply)
______________________________________

http://www.thedbcommunity.com/support/
         for Paradox? support

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by David Klei » Fri, 06 Jun 2003 05:26:13



Quote:> Well I thought it was just fine. <g>  I only use UserName() (and
> ErrorUser() ) in my apps for resource contention problems (for displaying
> the machine name of the offender, so you can walk to the correct machine)  

Lorrin
This is exactly what i need the username for! However in this setup
everybody is using the same machine (via TS), and username for some
reason is set to machincename so i can't tell which user is causing
a problem.
David

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by David Klei » Fri, 06 Jun 2003 05:27:56



Quote:> David,

> After posting my response to your question... I realized that I might not

Rodney
See my reply to lorrin. Thanks so much for your reply
David

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Dave Porte » Fri, 06 Jun 2003 08:09:19


on your command line you can specify the user ie

pdoxrun -extk 8000 -emk 0 -share -user Dave     ......

I would think you have seperate pdoxrun or pdox45 folders for each user.....
or at least a different batch file for each user...

HTH

Dave

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Steven Gree » Fri, 06 Jun 2003 08:09:46



> However in this setup everybody is using the same machine (via TS), and
> username for some reason is set to machincename so i can't tell which user is
> causing a problem.

in my apps, pdox's username() is set to the machine name.. then I know *where*
the user is.. but each user has to log into the app, so I know *who* the user
is, too..

--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Michael Kenned » Mon, 09 Jun 2003 07:17:26


David,

Been off-line, hence the delay. Apologies.

Quote:> I am having the following problem. All users using a pdox 4.5 dos
> application with terminal Server are all being assigned the computer
> name as the username. Since they are all coming in thru the same
> computer they all have the same username even though they have different
> usernames as far as the operating system knows.

I looked at this issue some months back, traced what PDoxDOS was doing
internally, and concluded that - please read slowly !!! - PDoxDOS is working
CORRECTLY when it shows the COMPUTER-NAME !!.

Yeah, I thought you'd react like that!

I don't have the exact details to hand, but, internally, PDoxDOS issues OS
"calls" which ask for the COMPUTER-NAME. I've no idea why this was done way
back when the code was written. Maybe someone observed then that the call
returned the UserName (which, I think, was an indication of a problem with
the OS - probably MS-DOS), and, presumably, it was assumed that "all was
well", and the "call" remained in there.

The trick now is to change the internal "call" to ask for the REAL USERNAME.
I tried to do this recently, but did not finish the project - mainly from
laziness, I guess.

I'll take another look. I doubt if you have any other option to "fix" the
behaviour of the UserName() function - apart from tracing the machine-code
and changing it....

  - Mike

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by David Klei » Tue, 10 Jun 2003 05:23:56


Quote:

> I'll take another look. I doubt if you have any other option to "fix" the
> behaviour of the UserName() function - apart from tracing the machine-code
> and changing it....

>   - Mike

Mike thanks for your reply. I have an idea which i will try On Monday
or Tues when i'm able to try it at the client. In the batch file that
calls the paradox proram i can set a variable = to username. Then in
my program i can set the username to that (using sysinfo environment)
It should work - No?
David

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by David Klei » Tue, 10 Jun 2003 05:28:25



Quote:> on your command line you can specify the user ie

> pdoxrun -extk 8000 -emk 0 -share -user Dave     ......

> I would think you have seperate pdoxrun or pdox45 folders for each user.....
> or at least a different batch file for each user...

> HTH

> Dave

No such luck - I have one batch file for all users.I have an idea that
i will try tommorow - it involves capturing the username before i get
into paradox to a variable  using the set command,  and then use
sysinfo enviorment to set the username to that (once i'm in paradox)
thanks
David  

--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Steven Gree » Tue, 10 Jun 2003 05:29:51



> In the batch file that calls the paradox proram i can set a variable = to
> username. Then in my program i can set the username to that (using sysinfo
> environment)

that should work fine, from pdox's end, as long as the batch file end works..

--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Michael Kenned » Tue, 10 Jun 2003 22:31:51


David,

Quote:> Mike thanks for your reply. I have an idea which i will try On Monday
> or Tues when i'm able to try it at the client. In the batch file that
> calls the paradox proram i can set a variable = to username. Then in
> my program i can set the username to that (using sysinfo environment)
> It should work - No?

Sounds good - I expect it'll work.

First, to ensure you've enough space in your "Environment", maybe set a
dummy var first, "Set PDoxUName=XXXXXXXXXXXXXXXX". This should guarantee you
adequate space later, when you insert the proper name.

I think you may not be able to capture the correct UserName from the SET
statement, but maybe by parsing the output from some option in the NET
command.

Then issue the new "Set PDoxUName=YYYYYYYYYYYYYYYY".

Then pick this up in PDox...

I would be grateful if you would you share your findings with us !

  - Mike

 
 
 

pdox 4.5 Terminal Server Username=Computername

Post by Mike Irwin [CTec » Wed, 11 Jun 2003 00:27:46


Hi David,

Dave mentions the ability to add the user name to a PdoxDOS command
line. You can discover a variety of settings from Windows Terminal
Server (open a command prompt and type in the SET command on its own).
For example, as I write, I have a Win 2K TS system open on my other
monitor and, with SET, can see values for CLIENTNAME (shows the name
of the Win 2K machine I've got on my desk), COMPUTERNAME (shows the
name of the Win TS machine, so always the same for every user),
HOMEPATH (which ends in my user name), NWUSERNAME (my id too, as I'm
getting there via a Novell network), TEMP and TMP, both of which have
my login name in them, USERNAME and USR, which are both my name, and
USERPROFILE, which contains my name !

How do you use these in Paradox ? Don't !!

Copy the following code into a .VBS file on your Win TS machine and
read on:
==============================================
option explicit

dim shell
dim env
dim strName
dim fso, fdr
dim strDrive
dim strStartString, strSystPrivate, strMessage
dim strProgram, strSwitch, strPrivate, strLocalPrivate, strWork,
strObject
dim SW_SHOWNORMAL
dim btnCode
dim folderPrivate, filesPrivate, fileObj, strFileName
dim iLoop, strUsrEnv
'..........................
SW_SHOWNORMAL = 1
'..........................The base set of Paradox Private objects
strPrivate = "C:\SDE\Private"
strSystPrivate = "C:\SDE\SystPrivate"
'..........................'create objects we'll need
set shell = createObject("WScript.Shell")
set fso = createObject("scripting.fileSystemObject")
'..........................obtain the Volatiles
'======================================
set env = shell.Environment("Volatile")
'..........................get the Volatile "NWUSERNAME"
strUsrEnv = env.item("NWUSERNAME")
if strUsrEnv = "" then
   btnCode = shell.popup("You don't have a Netware User Identity.
Please contact MIS.", 10, "SDE")
   WScript.quit
end if
'btnCode = shell.popup(strUsrEnv, 30, "SDE")
strLocalPrivate = strPrivate & "\" & strUsrEnv
'..........................There shouldn't be a folder yet ...
for iLoop = 1 to 50
   if not fso.folderExists(strLocalPrivate) then     '.........so we
make one and copy the needed tables into it
      exit for
   else                                              '.........extend
the name and try, try, try again...
      strLocalPrivate = strLocalPrivate & "a"
   end if
next 'iLoop
btnCode = shell.popup("Please wait while your environment is loaded",
5, "SDE")
fso.CopyFolder strSystPrivate, strLocalPrivate
if not fso.folderExists(strLocalPrivate) then
   btnCode = shell.popup("Unable to create Private Directory; please
contact Tech. Support.", 10, "Open Enrollment", vbOk)
   WScript.quit
end if
'..........................
strProgram = "C:\Program Files\Corel\WordPerfect Office
2002\Programs\pdxwin32.exe "
strSwitch = " -c -m -q -p"
strPrivate = strLocalPrivate & " "
strWork = "  -wC:\SDE  "
strObject = " starter.ssl"
'..........................
strStartString = chr(34) & strProgram & chr(34) & strSwitch &
strPrivate & strWork & strObject
'..........................
shell.Run strStartString, SW_SHOWNORMAL, True
'..........................
fso.deleteFolder strLocalPrivate, True
btnCode = shell.popup("Closing down ...", 5, "SDE")
==============================================
The code above launches a Paradox for Windows instance, with
application. All you have to do is change the value settings for
strProgram to "C:\Paradox\pdoxrun.exe", strSwitch to " -extk 8000 -emk
0 -share -user " & strUsrEnv " (adds your user name to the end of the
switches, so you have a personalised copy !), and just remove strWork
and strPrivate from the list of things that go into strStartString
altogether !

Remember to change NWUSERNAME to one of the others that I listed above
if you're not on a Novell net - CLIENTNAME or USERNAME would both be
very good choices.

Then, hopefully, this script will launch your Paradox app.

As I haven't done this with PdoxDOS I'd be very grateful for any
feedback you'd care to give me - see my site at
http://mirwin.homestead.com for a page to email me or send me a
message.

hth

Mike Irwin
----------------------------------------------




> > on your command line you can specify the user ie

> > pdoxrun -extk 8000 -emk 0 -share -user Dave     ......

> > I would think you have seperate pdoxrun or pdox45 folders for each user.....
> > or at least a different batch file for each user...

> > HTH

> > Dave
> No such luck - I have one batch file for all users.I have an idea that
> i will try tommorow - it involves capturing the username before i get
> into paradox to a variable  using the set command,  and then use
> sysinfo enviorment to set the username to that (once i'm in paradox)
> thanks
> David

 
 
 

1. Get Username or Computername after lock (or deadlock) errors from MS SQL server (7 or 6.5)

Hi to ALL!

How can I get the additional Username or at least Computername info after a
lock or deadlock violation occours?.

I'm using VB with ADO with OLE-DB provider for SQL Server

PS: How can I get the same info in a SQL script? (for example in a SQL
stored procedure.

thx for help

Gabor Horovitz

2. Can't Install MDAC 2.5 SP1

3. Oracle or Informix? (Insights and experiences wanted - NO RELIGIOUS WARS OR FLAMES PLEASE!!!)

4. Does anyone know how to do a CROSSTAB in T-SQL?

5. Pdox 3.5 vs.Pdox 4.02 vs. Pdox 4.5

6. sync between 2 sybase database

7. HELP: Username/Computername

8. Peachtree 4.5/Btrieve6.15/Terminal Server/Pervasive 2000

9. HOW DO I CONVERT A PDOX 4.5 SCRIPT TO PDOX 5 OR 8 FOR WIN

10. PDox 4.5 to PDox 8

11. PDOX 4.5 DOS to PDOX 8 WIN95....?