473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Getting a User's network User name to implement an auto-login feature

We are using a software package that requires a username and password. We want to write a routine that would read the users network user name variable on the system and look up the user name and password for the package and login them in automatically.

Any thoughts?
Sep 5 '07 #1
4 1514
r035198x
13,262 8TB
We are using a software package that requires a username and password. We want to write a routine that would read the users network user name variable on the system and look up the user name and password for the package and login them in automatically.

Any thoughts?
In which programing language?
Sep 5 '07 #2
pbmods
5,821 Expert 4TB
Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).
Sep 5 '07 #3
bartonc
6,596 Expert 4TB
We are using a software package that requires a username and password. We want to write a routine that would read the users network user name variable on the system and look up the user name and password for the package and login them in automatically.

Any thoughts?
On Windows (you really need to specify this kind of info), that's a job for WMI.
Sep 5 '07 #4
We are using a software package that requires a username and password. We want to write a routine that would read the users network user name variable on the system and look up the user name and password for the package and login them in automatically.

Any thoughts?
Hi Dhessevick,

If you want to implement automatic authentication in a Windows environment, you might have a Windows NT Authentication option available (I say "might" because this is a Microsoft thing, so if you're working with non Microsoft products like MySQL, Java etc. it makes it more difficult).

One example of this is a SQL Server database with a Microsoft Access face application. You can give Windows user accounts database permissions in the SQL Server database, then tell the Access application to use "Windows NT Authentication" to connect to it. If the logged in user isn't authorised in the SQL Server DB, the connection will be refused.

A more universal, but more complicated option would be to use a "token" in the form of a text file only the user has permission to access. This could be automatically created and replaced at login. The token can just be a text file in a folder like "%userprofile%\Application Data\YourApplicationName\" (%userprofile% by the way is a Windows environment variable. I you type it into the run box, it'll open the logged in user's profile folder).

I would include username (which can be obtained using WMI as mentioned before) and the time/date, then encrypt it with a master key for your application. The master key would ideally be changed regularly for maximum security. I would incldue date/time so that you could have the tokens expire after say an hour, a day, a week... depends on how secure you want it. Then when the user starts your application, it opens the token, decrypts it using your master key, checks it hasn't expired and logs the user in.

There are alot of "depends" answers to your question and some security issues related to the answers to the "depends" questions, but hopefully that gives you some ideas.

Post again if you want clarification on how to do any of the things I mentioned or if anyone wants code examples.

Chris Fry
Canberra, Australia
Oct 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Scott McNair | last post by:
How would I go about extracting an end-user's machine name? I tried finding the info in server variables but it wasn't there. Or would this be a client-side solution instead? If it is, I...
8
by: Michelle | last post by:
Hello! I have an ASP.NET application (1.1 framework) that needs to be able to read/write files on a network share. The access to this file share will be fairly restricted, so I need to...
6
by: john_williams_800 | last post by:
Hi; I am writing an html page that will live on one server in an ms windows network, but access pictures from a directory on another ms windows server in the network. I know in html the...
22
by: Bradley | last post by:
Has anyone else noticed this problem? I converted the back-end to A2000 and the performance problem was fixed. We supply a 97 and 2000 version of our software so we kept the backend in A97 to make...
3
by: Dmitry | last post by:
I am trying to figure out how to pass set of credentials to System.IO Challenge is: App is running under one set of credentials, but via GUI user have a chance to enter another set. I would like...
2
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I...
9
by: webrod | last post by:
Hi all, how can I check a user/password in a LDAP ? I don't want to connect with this user, I would like to connect to LDAP with a ADMIN_LOG/ADMIN_PWD, then do a query to find the user and...
41
by: Jim | last post by:
Hi guys, I have an object which represents an "item" in a CMS "component" where an "item" in the most basic form just a field, and a "component" is effectively a table. "item" objects can be...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
4
by: =?Utf-8?B?WmFyYm9yZw==?= | last post by:
I'm writing a little program that will run when a user logs in, checks their password expiration and also installs a piece of monitoring software if necessary. The program has to run on Vista so I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.