locked
Windows authentication with different user RRS feed

  • Question

  • Hi,

    Below is the scenario

    I have 2 users.

    User1 : have sql rights on database but dont have rights to login into windows

    User2 ; have rights to login into system but dont have access rights to database

    Now I have windows application and i have logged into system with User2 and want to run windows application with the rights of User1

    How can i achieve this.

    Thanks,

    Rajnikant


    Thursday, September 24, 2015 6:37 AM

Answers

  • Hi,

    I have resolved it with by impersonating user with system dll.

    Thanks,

    Rajnikant

    Wednesday, September 30, 2015 11:30 AM

All replies

  • Hello,

    You can use the Runas command to impersonate to User1 to run the application.


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, September 24, 2015 7:14 AM
  • Use runas, although it says run as administrator, you can use any credentials. I have also set this up as shortcuts in the past.

    Runas Command


    Gavin Clayton Claytabase Ltd www.claytabase.co.uk

    Thursday, September 24, 2015 7:53 AM
  • Hi,

    Thanks for the answer.

    I want to use domain user in connection string not logged in user with windows authentication.

    So how can i use.

    Thanks,

    Rajnikant

    Thursday, September 24, 2015 8:27 AM
  • You can not pass a different Windows credential within a connection string.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, September 24, 2015 9:00 AM
  • Hi,

    I have resolved it with by impersonating user with system dll.

    Thanks,

    Rajnikant

    Wednesday, September 30, 2015 11:30 AM