Solved

LOGON - 95 & NT

Posted on 1998-09-15
5
239 Views
Last Modified: 2013-12-03
I want be able to logon to an NT domain after I've already logged onto my W95 standalone PC(no network card - just the dialup adapter). It would be nice if the logon window would appear again.  This need arises due to the tunneling package we use.  What is the API call for both 95 and NT if any? I've found WNetLogon(W95) and LogonUser(NT) as API calls but can't seem to figure out how to get them to work(actually get a linking error unresolved external...(I have included mpr.lib).
0
Comment
Question by:trickled
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:theh95
ID: 1414479
PSS ID Number: Q139710
Article last modified on 06-23-1998
 
95
 
WINDOWS
 

======================================================================
95
WINDOWS
kbnetwork kbhowto
 
---------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Windows 95
 - Microsoft Plus! for Windows 95
---------------------------------------------------------------------
 
SUMMARY
=======
 
The Dial-Up Networking Server component in Microsoft Plus! lets you share
network resources with others who connect to your computer from remote
locations. This article describes how to configure your computer to be a
Dial-Up Networking server or client.
 
MORE INFORMATION
================
 
There are five steps in configuring your computer to use Dial-Up
Networking. These steps are:
 
- Configure your computer's modem
- Install the Dial-Up Networking and Dial-Up Networking Server components
- Configure your computers' network properties
- Enable the server
- Dial a server (for client connection)
 
Configuring Your Computer's Modem
---------------------------------
 
To install and configure a modem, follow these steps:
 
1. Click the Start button, and then click Help.
 
2. On the Contents tab, double-click How To.
 
3. Double-click the following topics:
 
    - Set Up Hardware
 
    - Setting up a modem
 
4. Follow the instructions on the screen.
 
Install the Dial-Up Networking and Dial-Up Networking Server Components
-----------------------------------------------------------------------
 
To install the Dial-Up Networking component, follow these steps:
 
1. Double-click My Computer.
 
2. If there is a Dial-Up Networking folder in My Computer, Dial-Up
   Networking is already installed. Skip to the "To install the Dial-Up
   Networking Server component" section. If there is no Dial-Up
   Networking folder, continue with these steps.
 
3. In Control Panel, double-click the Add/Remove Programs icon.
 
4. On the Windows Setup tab, click Communications in the Components box,
   and then click Details.
 
5. Click the Dial-Up Networking check box to select it, and then click OK.
 
6. Click OK.
 
To install the Dial-Up Networking Server component, follow these steps:
 
NOTE: These steps assume that you have already installed Microsoft Plus!
for Windows 95.
 
1. In Control Panel, double-click the Add/Remove Programs icon.
 
2. On the Install/Uninstall tab, click Microsoft Plus! For Windows 95,
   and then click Add/Remove.
 
3. Click Add/Remove.
 
4. Click the Dial-Up Networking Server check box to select it, and then
   click Continue.
 
Configuring Your Computers' Network Properties
----------------------------------------------
 
To share resources using Dial-Up Networking, both computers need to use
the following network components:
 
   Client for Microsoft Networks
   Dial-Up Adapter
   A network protocol that is common to both computers
 
The common protocol can be either NetBEUI or IPX/SPX-compatible.
 
In addition, File and Printer Sharing for Microsoft Networks must be
enabled on the computer that is to be the server. To verify that this is
enabled, click File And Printer Sharing in Network properties.
 
Network Settings:
 
To make sure your computers are using the proper network settings, follow
these steps:
 
1. In Control Panel, double-click the Network icon.
 
2. Examine the list of installed network components. If any of the
   necessary components listed above are not installed, click Add to
   install them.
 
Computer Name:
 
After the necessary components are installed, click the Identification tab
and verify that the computer name is valid. It must be a unique name that
is no more than 14 characters long and does not contain spaces or any of
the following characters: / \ * , . ". Make sure that the workgroup name is
the same on both computers.
 
Enable the Server
-----------------
 
To configure a computer to be a Dial-Up Networking server, follow these
steps:
 
1. In My Computer, double-click the Dial-Up Networking folder.
 
2. On the Connections menu, click Dial-Up Server.
 
3. Click Allow Caller Access.
 
4. If you want to require remote users to enter a password when they
   connect to your computer using Dial-Up Networking, click Change
   Password and enter the password you want to use.
 
5. Click OK.
 
6. To allow others to use resources on your computer, you must share
   those resources. For information about sharing resources, follow
   these steps:
 
   a. Click the Start button, and then click Help.
 
   b. On the Contents tab, double-click How To, and then double-click
      the following topics:
 
       - Use a Network
 
       - Sharing a folder or printer
 
   c. Follow the instructions on the screen.
 
You computer and shared resources can now be accessed by Windows 95,
Windows NT 3.1 and 3.5, and Windows for Workgroups 3.11 clients.
 
Dial a Server (for Client Connection)
-------------------------------------
 
For information about configuring Dial-Up Networking to connect to a Dial-
Up Networking server, please see the following article in the Microsoft
Knowledge Base:
 
   ARTICLE-ID: Q145843
   TITLE     : How to Connect to a Remote Server
 
REFERENCES
==========
 
For additional information about Dial-Up Networking Server, please see the
following article in the Microsoft Knowledge Base:
 
   ARTICLE-ID: Q137820
   TITLE     : Microsoft Plus! Readme.txt File Contents (2 of 2)
 
KBCategory: kbnetwork kbhowto
KBSubcategory: win95 msnets dun
Additional reference words: 95 dialup rna
======================================================================
Keywords          : dun msnets win95 kbfaq
Version           : 95
Platform          : WINDOWS
=============================================================================
Copyright Microsoft Corporation 1998.


 

0
 

Author Comment

by:trickled
ID: 1414480
I'm looking for the API call that is used to log a user onto an NT Domain.  I just want to put an icon on the users desktop that they can click on to logon.  Basically I want the equivalent of: "net logon", but it has to run the users logon script that's defined in user manager as well as the "connect ?: to" for their home.
0
 
LVL 1

Accepted Solution

by:
BlackDeath earned 100 total points
ID: 1414481
try this:

The LogonUser function attempts to perform a user logon operation. You specify the user with a user name and domain, and authenticate the user with a clear-text password. If the function succeeds, you receive a handle to a token that represents the logged-on user. You can then use this token handle to impersonate the specified user, or to create a process running in the context of the specified user.

BOOL LogonUser(

    LPTSTR lpszUsername,      // string that specifies the user name
    LPTSTR lpszDomain,      // string that specifies the domain or servero
    LPTSTR lpszPassword,      // string that specifies the password
    DWORD dwLogonType,      // specifies the type of logon operation
    DWORD dwLogonProvider,      // specifies the logon provider
    PHANDLE phToken      // pointer to variable to receive token handle
   );      
Parameters

lpszUsername

Pointer to a zero-terminated string that specifies the user name. This is the name of the user account to log on to.

lpszDomain

Pointer to a zero-terminated string that specifies the domain or server to log on to.

lpszPasswordc

Pointer to a zero-terminated string that specifies the clear-text password for the user account specified by lpszUsername.

dwLogonType

Specifies the type of logon operation to perform. The following logon types are defined:

Value      Meaning
LOGON32_LOGON_BATCH      Indicates a batch-type logon. For example, this can be a logon without a user present on either the console or at the other end of a network connection.
LOGON32_LOGON_INTERACTIVE      Indicates a logon in which the user has an active connection of some type, either through a console or through a network connection, such as a telnet-style connection.
LOGON32_LOGON_SERVICE      Indicates a service-type logon. The account provided must have the service privilege enabled.
dwLogonProvider

Specifies the logon provider. The following logon providers are defined:

Value      Meaning
LOGON32_PROVIDER_DEFAULT      Use the standard logon provider. This is the recommended value for dwLogonProvider. It gives an application the maximum upward compatibility with future releases of Windows NT.  
phToken

Pointer to a HANDLE variable that receives a handle to a token that represents the specified user.
You can use this token handle in calls to the ImpersonateLoggedOnUser and CreateProcessAsUser functions.
When you no longer need this handle, close it by calling the CloseHandle function.

Return Value

If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To get extended error information, call GetLastError .

Remarks

The process that calls LogonUser must have the SeTcbPrivilege privilege. The privilege does not need to be enabled. The LogonUser function enables the privilege as necessary. The function fails if the calling process does not have the SeTcbPrivilege privilege, and GetLastError returns the error code ERROR_PRIVILEGE_NOT_HELD.  
A user is considered logged on as long as at least one token exists. If you call CreateProcessAsUser and then close the token, the system considers the user as still logged on until the process (and all child processes) have ended.

See Also

CreateProcessAsUser, ImpersonateLoggedOnUser

Black Death.
0
 

Author Comment

by:trickled
ID: 1414482
Nice cut and paste from MSDN.  Yes that works for NT but how 'bout 95.  Anyway I've stumbled across my answer(I think) so I'll post it here when I'm finished(do you know if can I answer my own question for points???).  I'll give you 5 points for the effort, though.
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1414483
hi.
it's from win32.hlp, not msdn.
you gave me 100.
do want me to post a backup_points_question for you?
no prob. just tell. when you've posted your answer to yourself.

cheers, Black Death.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now