473,796 Members | 2,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 1536
r035198x
13,262 MVP
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 Recognized Expert Expert
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 Recognized Expert Expert
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
chrisfry
6 New Member
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\YourApplic ationName\" (%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
4568
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 apologize for posting to the wrong group. Regards, Scott
8
9775
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 impersonate a specific user account on our domain in order to gain access. The impersonation is only needed for the sections that reads/writes files. I have tried using the code from http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158#4 and...
6
14086
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 values for img src use unix style path separators with root ( "/" being your parent web directory. However in windows land the path to my images would be something like
22
2360
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 upgrading simple for users. We've done it like that for years but a new client has been having severe performance issues... solved by converting the backend to 2000. -- regards, Bradley
3
10926
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 to be able to use supplied credentials with System.IO versus using default credentials that app is running under. So far I am forced to use WMI which is less convenient and slower then System.IO, but it's providing me with "Connection Options"
2
5547
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 found a zillion messages about auto increment and read some of them but it's confusing. Can someone point me to a simple custom auto increment example that I can download? Thank you, john
9
15534
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 check the password. The thing is I can't access the password attribute to compare with the user's password provided.
41
2889
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 created and then added to "component" objects to build up the component definition. My dilemma comes in deciding how to read/write data to the "item"
33
11867
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 (NT_AUTHORITY\SYSTEM). I understand that when the service starts, no user may be logged in, but that's ok, as the app I am monitoring can only be run by a logged in user. Do I need to use WMI to get the user context of Explorer.exe or is there a...
4
7094
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 got my first experience writing for UAC. I've worked though the signed manifest and all the other little quirky stuff I have to do to get my app to run as Administrator (System.DirectoryServices said it required admin rights) and everything is...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9524
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10168
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.