Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Return Code...

3 posts in Windows NT Last posting was on 2000-05-31 14:24:45.0Z
Jaime Barillas Posted on 2000-05-30 22:56:58.0Z
Message-ID: <3934473A.75B44794@scotiabank.com.sv>
Date: Tue, 30 May 2000 16:56:58 -0600
From: Jaime Barillas <office.automation@scotiabank.com.sv>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Return Code...
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 5
NNTP-Posting-Host: 209.198.203.200
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2077
Article PK: 1089551

We would like to modify a VB app in order to get a return code.
It is possible to send a login and password and validate them to
syslogins table and get a return code?


"Mark A. Parsons" <pegasys Posted on 2000-05-31 08:37:55.0Z
Message-ID: <3934CF63.42A71D82@_internet.co.nz>
Date: Wed, 31 May 2000 20:37:55 +1200
From: "Mark A. Parsons" <pegasys@_internet.co.nz>
Organization: Pegasys (2000) Limited
X-Mailer: Mozilla 4.72 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Return Code...
References: <3934473A.75B44794@scotiabank.com.sv>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 36
NNTP-Posting-Host: p320.ipa1-n8-16.iconz.net.nz 210.48.25.64
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2073
Article PK: 1089546


Jaime Barillas wrote:

> We would like to modify a VB app in order to get a return code.
> It is possible to send a login and password and validate them to
> syslogins table and get a return code?

Unless you're running a real old version of Sybase (e.g., 4.8, 4.9), you
won't be able to compare passwords ... they're encrypted in the
syslogins table.

The only way I can think of validating a login *and* password is to
attempt to log in ... and if it fails you'll definitely get something
returned ... an error.

OK, OK, OK ... how about this one ...

Write a stored proc that accepts the login and pasword (I'm assuming you
have another id under which you've already successfully logged into the
server). Now, within this stored proc attempt to issue a sp_password
with the given password ... changing it to something easy (e.g.,
'password'). If the sp_password fails then your stored proc would
return a failure 'code'. If sp_password succeeds at changing the
password then change it back again (from 'password' to the original
password) and return a 'success' code. This should work as far as
validating whether a supplied password is the correct password or not.

If, however, you're trying to determine the password of a given login
... you're out of luck.


--
Mark A. Parsons

Iron Horse, Inc. iron_horse@compuserve.com
Pegasys (200), Ltd pegasys@internet.co.nz


Jaime Barillas Posted on 2000-05-31 14:24:45.0Z
Message-ID: <393520AC.3B38E7A9@scotiabank.com.sv>
Date: Wed, 31 May 2000 08:24:45 -0600
From: Jaime Barillas <office.automation@scotiabank.com.sv>
X-Mailer: Mozilla 4.7 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Return Code...
References: <3934473A.75B44794@scotiabank.com.sv> <3934CF63.42A71D82@_internet.co.nz>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Newsgroups: sybase.public.sqlserver.nt
Lines: 53
NNTP-Posting-Host: 209.198.203.200
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2069
Article PK: 1089544

Thank you Mark, we will do some tests.
This is our scenario: We have an application which is used by certain users,
they log on to the app and begin to work, once in a while they need an
authorization from their boss, so they ask that person to authorize the
transaction, we have been thinking on ask for their login and password to
authorize the transaction and validate their login and password without
interrupt their session. It could be better to build a table with a password
authorization?, what we need is something that can´t reveal a password.
Thank you again.

"Mark A. Parsons" wrote:

> Jaime Barillas wrote:
>
> > We would like to modify a VB app in order to get a return code.
> > It is possible to send a login and password and validate them to
> > syslogins table and get a return code?
>
> Unless you're running a real old version of Sybase (e.g., 4.8, 4.9), you
> won't be able to compare passwords ... they're encrypted in the
> syslogins table.
>
> The only way I can think of validating a login *and* password is to
> attempt to log in ... and if it fails you'll definitely get something
> returned ... an error.
>
> OK, OK, OK ... how about this one ...
>
> Write a stored proc that accepts the login and pasword (I'm assuming you
> have another id under which you've already successfully logged into the
> server). Now, within this stored proc attempt to issue a sp_password
> with the given password ... changing it to something easy (e.g.,
> 'password'). If the sp_password fails then your stored proc would
> return a failure 'code'. If sp_password succeeds at changing the
> password then change it back again (from 'password' to the original
> password) and return a 'success' code. This should work as far as
> validating whether a supplied password is the correct password or not.
>
> If, however, you're trying to determine the password of a given login
> ... you're out of luck.
>
> --
> Mark A. Parsons
>
> Iron Horse, Inc. iron_horse@compuserve.com
> Pegasys (200), Ltd pegasys@internet.co.nz