Login data information request. 
Author Message
 Login data information request.
How do you check user name and password from SQL?

I want to be able to check if some that logged onto my website is from
our company.  Everyone has a login name and password defined in our
system.  I would like to send the login name and password to SQL and
have it just tell me if it is valid or not.  Is this possible?  Stored
Procedure maybe?  I can't seem to find any in my SQL books.

Thanks,

Tom.



Thu, 13 Feb 2003 03:00:00 GMT
 Login data information request.

If you select from master..sysprocesses or use exec sp_who, you will get a
list of users logged into SQL Server.

I am not sure what you mean about sending a login name and pwd to SQL
Server. This is how you log into the server. Without this, you cannot issue
a query against the server. If you want to know if a name/pwd combo is
valid, try to log in. The front end can detect if this is sucessful or not.


Quote:
> How do you check user name and password from SQL?

> I want to be able to check if some that logged onto my website is from
> our company.  Everyone has a login name and password defined in our
> system.  I would like to send the login name and password to SQL and
> have it just tell me if it is valid or not.  Is this possible?  Stored
> Procedure maybe?  I can't seem to find any in my SQL books.

> Thanks,

> Tom.



Thu, 13 Feb 2003 03:00:00 GMT
 Login data information request.
I don't actually want to logon, I just want to use the logon/passwords just to
validate whether a person is part of our company and I don't want to set up a
new table with another set of logon/passwords.  I would rather use the ones we
already have in our system.  If someone from the outside logs on they can
either get the administration page or the client page.  If they are not in our
system, they would go directly to the client page.

I can't use sp_who, as the person my not be logged on the system.

Thanks,

Tom

Quote:

> If you select from master..sysprocesses or use exec sp_who, you will get a
> list of users logged into SQL Server.

> I am not sure what you mean about sending a login name and pwd to SQL
> Server. This is how you log into the server. Without this, you cannot issue
> a query against the server. If you want to know if a name/pwd combo is
> valid, try to log in. The front end can detect if this is sucessful or not.



> > How do you check user name and password from SQL?

> > I want to be able to check if some that logged onto my website is from
> > our company.  Everyone has a login name and password defined in our
> > system.  I would like to send the login name and password to SQL and
> > have it just tell me if it is valid or not.  Is this possible?  Stored
> > Procedure maybe?  I can't seem to find any in my SQL books.

> > Thanks,

> > Tom.



Thu, 13 Feb 2003 03:00:00 GMT
 Login data information request.
Found it!!

There is a stored procedure sp_password that allows you to change the password,
but if first needs to check the old password (which is exactly what I need to
do).  So I just modified it to check the user and password passed in and respond
with 0 or 1 and a message.  Works great.

To do this  you first need to get the old password from the table based on the
user name and compare it to the one you now have.  The undocumented call is:



master database.

It will pass back 1 if valid and 0 if invalid.

Tom.

Quote:

> I don't actually want to logon, I just want to use the logon/passwords just to
> validate whether a person is part of our company and I don't want to set up a
> new table with another set of logon/passwords.  I would rather use the ones we
> already have in our system.  If someone from the outside logs on they can
> either get the administration page or the client page.  If they are not in our
> system, they would go directly to the client page.

> I can't use sp_who, as the person my not be logged on the system.

> Thanks,

> Tom


> > If you select from master..sysprocesses or use exec sp_who, you will get a
> > list of users logged into SQL Server.

> > I am not sure what you mean about sending a login name and pwd to SQL
> > Server. This is how you log into the server. Without this, you cannot issue
> > a query against the server. If you want to know if a name/pwd combo is
> > valid, try to log in. The front end can detect if this is sucessful or not.



> > > How do you check user name and password from SQL?

> > > I want to be able to check if some that logged onto my website is from
> > > our company.  Everyone has a login name and password defined in our
> > > system.  I would like to send the login name and password to SQL and
> > > have it just tell me if it is valid or not.  Is this possible?  Stored
> > > Procedure maybe?  I can't seem to find any in my SQL books.

> > > Thanks,

> > > Tom.



Thu, 13 Feb 2003 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Query help requested for Login information

2. tracking data changes (a request for advice/information)

3. Request for information; environmental data file structures

4. Request for information concerning spatial data warehouse

5. Login Request Denied

6. Cannot open database requested in login

7. Cannot open database requested in login

8. ADODC Problem : Can not open database requested in Login

9. NON-Stop Login requests for MS SQL in the IDE

10. Login error: Can't find requested character set Cp850

11. Login error: Can't find requested character set Cp850

12. MSDE 2000 Information request


 
Powered by phpBB® Forum Software