Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 256137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:59:20+00:00 2026-05-11T21:59:20+00:00

When getting the username and/or SID of the current user, what is the preferred

  • 0

When getting the username and/or SID of the current user, what is the preferred method?

Is it using:

WindowsIdentity.GetCurrent().Owner

Or:

WindowsIdentity.GetCurrent().User

What is the difference between the two? This would be a great question for SuperUser.com, but alas, it’s not live yet. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:59:21+00:00Added an answer on May 11, 2026 at 9:59 pm

    What you usually want is the User.

    Every security object in windows has permissions and owner. The user is also a security object so it has permissions and owner. The ownership means that the owner can change the permission on the user. And the permission (in case of the user object ) means things like delete the user, change group membership and such. And all of this is not intersting in most cases. So what you need is the ‘User’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I getting the leak in this method even the allocated nsstring is released. Now
I have problem with getting username form windows system. I tried using getlogin function
I'm getting a Null Pointer Exception when using my web app. This exception is
I'm running a update_user form through $user = ORM::factory('user', $id)->update_user($this->request->post(), array( 'username', 'password', 'email'
I am getting this error while trying to retrieve a user profile: An error
Im thinking of getting usernames of my site using this in my view(Razor syntax):
I'm getting this error Traceback (most recent call last): File /home/<username>/flup/server/fcgi_base.py, line 558, in
I'm succeeding with reading this site using simpleML in processing and getting the first
I'm looking for a cross platform solution for getting current login/username in Python. I
via server API's i'm getting contact information using member of structure: char displayName[USERNAME_MAX_SIZE]; One

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.