Solution to non-domain Windows Authentication-VBForums
Results 1 to 17 of 17

Thread: Solution to non-domain Windows Authentication

  1. #1

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Exclamation Solution to non-domain Windows Authentication

    If any of you have ever tried to access a SQL box on a network, from a laptop for instance, that is not part of the domain.

    You will remember getting an error:

    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
    This problem also happens when you VPN connect to an outside network - and attempt access to the remote network through the VPN.

    You can get around this error, on WINDOWS XP PROFESSIONAL machines by:

    START>CONTROL PANEL>USER ACCOUNTS

    ADVANCED TAB...MANAGE PASSWORDS...

    Click Add and then load the SERVER NAME of the SQL BOX on the other network and the WINDOWS AUTHENTICATION username and password that would give you authentication on that network!

    From that point on you have credentials to access that server without actually logging in to that domain.

    I was very impressed!
    Last edited by szlamany; Oct 14th, 2005 at 01:07 PM.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,334

    Re: Solution to non-domain Windows Authentication

    You should send a PM to si_the_geek and ask him to make this a part of the Tutorials And Tips sticky thread at the top of the forum.

    This isn't something that should get lost in the thread shuffle.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Candon City, Ilocos Sur, Phils.
    Posts
    10,693

    Re: Solution to non-domain Windows Authentication

    Thanks a lot for sharing...
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  4. #4
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Re: Solution to non-domain Windows Authentication

    sorry..where did i get Advanced Tab?
    Attached Images Attached Images  

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

  5. #5

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Re: Solution to non-domain Windows Authentication

    Quote Originally Posted by erickwidya
    sorry..where did i get Advanced Tab?
    Is that PC currently in a domain, or simply a workgroup? You can find that out by right-clicking on MY COMPUTER and going to the COMPUTER NAME tab. Does it list a DOMAIN there?

    Did you switch to classic view in the CONTROL PANEL? You do have XP PROFESSIONAL - right?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  6. #6
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Re: Solution to non-domain Windows Authentication

    s that PC currently in a domain, or simply a workgroup? You can find that out by right-clicking on MY COMPUTER and going to the COMPUTER NAME tab. Does it list a DOMAIN there?

    Did you switch to classic view in the CONTROL PANEL? You do have XP PROFESSIONAL - right?
    yes..i have XP Proffesional SP1..the PC is in Workgroup not using domain..

    i think i switched it to Classic but can't find to restore it

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

  7. #7

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Re: Solution to non-domain Windows Authentication

    I don't have a non-domain computer, but MSDN says...

    How to Manage Stored User Names and Passwords
    To manage stored user names and passwords, follow these steps:
    1. Log on to the computer as the user whose account you want to change.
    2. Click Start, and then click Control Panel.
    3. In Control Panel, click User Accounts under Pick a category to open the User Accounts dialog box.
    4. Open the Stored User Names and Passwords dialog box; to do so, use the appropriate method: If you log on with a limited account:a. Under Related Tasks, click Manage my network passwords.

    If you log on with an account with administrative privileges:a. Under or pick an account to change, click your user account to open the What do you want to change about your account? dialog box.
    b. Under Related Tasks, click the Manage my network passwords.

    A list of stored user names and passwords similar to the following example is displayed:
    *.Microsoft.com
    Passport.Net\*(Passport)
    Does that work for you?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  8. #8
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818

    Re: Solution to non-domain Windows Authentication

    Does that work for you?
    yes i found one that simillar to this with some different :
    A list of stored user names and passwords similar to the following example is displayed:
    my_user_name@hotmail.com.com
    Passport.Net\*(Passport)
    i guess i need to add UserName and Password at Selected Window right?
    thx szlamany
    Attached Images Attached Images  

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

  9. #9

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Re: Solution to non-domain Windows Authentication

    Yes - that is it...

    I was on a windows 2003 terminal server system today and saw "Stored Usernames and Passwords" - that is the same dialog box that WinXP Pro has...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  10. #10
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Solution to non-domain Windows Authentication

    What about this on a Windows 2000 Professional workstation thats not logged on to the domain?

    ta

    kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  11. #11

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Re: Solution to non-domain Windows Authentication

    Quote Originally Posted by kaihirst
    What about this on a Windows 2000 Professional workstation thats not logged on to the domain?

    ta

    kai
    I am not 100% sure, but I believe all this came about with XP and 2003.

    I did some google searches and MSDN searches and could not find anything.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  12. #12
    Fanatic Member kaihirst's Avatar
    Join Date
    Jul 2005
    Location
    The Resaurant At the End of The Universe
    Posts
    633

    Re: Solution to non-domain Windows Authentication

    ok cheers.

    will give it a go next time ive got the opportunity and let you know.

    cheers

    kai
    As the information I give is useful in its nature, consider using the RATE POST feature located on the bottom left of this post please..

    A few things that make a good Developer a Great One.
    Methodical and a thorough approach to research and design inevitably leads to success.
    Forward thinking is the key to Flow of control.
    Never test in the design environment, always test in real time, you get the REAL results.
    CBSE & OOSE are the same animal, they just require different techniques, and thinking.
    SEO is a globe of objectives, SE rankings is an end to a means for these objectives, not part of them.
    The key to good design is explicit attention to both detail and response.
    Think Freely out of the "Box" you're in..... You will soar to better heights.

    Kai Hirst - MSCE, MCDBA, MCSD, MCP, MCAP, MSCT


  13. #13
    New Member
    Join Date
    Aug 2007
    Posts
    1

    Re: Solution to non-domain Windows Authentication

    I am trying to get this working on Sql 2005 Standard using a Vista non domain workstation.

    I can get this working on XP professional using these instructions. I am unable to get it working with VISTA. I have tried VISTA Business Edition.

    Anyone get this working?

  14. #14

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Re: Solution to non-domain Windows Authentication

    Welcome to the forum!

    I've not got Vista installed yet on any of our development machines.

    I'll PM someone who does and see if they can help.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  15. #15
    New Member
    Join Date
    Nov 2008
    Posts
    2

    Re: Solution to non-domain Windows Authentication

    Hi,

    sorry to bump such an old post, but I'm having the exact same problem using Vista Business as jon.vickers posted before me and was wondering if someone found a solution yet

  16. #16

    Thread Starter
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    15,647

    Re: Solution to non-domain Windows Authentication

    Welcome to the forum!

    I still don't have Vista installed on any workstations here - let's see who jumps into this thread with an answer.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  17. #17
    New Member
    Join Date
    Nov 2008
    Posts
    2

    Re: Solution to non-domain Windows Authentication

    What I've found/done so far:

    I've used the runas.exe to run the application as my domain user
    I've entered the server IP in "control userpasswords2" so it should always use those credentials connecting to the SQL server

    What I can't do:
    Enter the ODBC connector using the correct setting because Vista checks the current NT logon credentials against the SQL server and won't save the DSN unless it succeeds.

    I'm now trying to figure out how to manually edit the registry to add the DSN connection, in other words circumventing the check performed by the ODBC GUI.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.