hi,
how can i get the system admin password and user id into my asp using vb.net program.i need the code for it... can u give me the idea....

Dani AI

Generated

Short answer: an ASP.NET/VB.NET application cannot and should not retrieve a Windows Administrator's plaintext password. Windows does not store recoverable passwords; credentials are protected by the OS. Any technique that claims to "read" an admin password is a credential-dumping approach and is insecure and likely unlawful. was right to question the intent, and 's concern about misuse is valid.

Practical alternatives and patterns that work for web apps (note: 's Windows-user-management code is applicable to desktop/server tools, not to safely exposing OS credentials to a web app):

  • Use Integrated Windows Authentication in IIS so the web app gets the current Windows identity. The app can read the username and check group membership (it will not get a password):
    ' ASP.NET (VB.NET) — read current Windows identity and check Admin role
    Dim winId = TryCast(HttpContext.Current.User.Identity, System.Security.Principal.WindowsIdentity)
    Dim name As String = If(winId IsNot Nothing, winId.Name, String.Empty)
    Dim isAdmin As Boolean = False
    If winId IsNot Nothing Then
      Dim wp = New System.Security.Principal.WindowsPrincipal(winId)
      isAdmin = wp.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)
    End If
  • If automated remote access is required (for example, connecting to a Unix box as mentioned), use SSH key pairs or a dedicated service account. Store secrets in a secure vault (enterprise secret store, DPAPI/protected config, or OS credential manager). Do not hardcode plaintext credentials.

For validating credentials (not retrieving them), use AD/LDAP validation APIs such as PrincipalContext.ValidateCredentials (this checks a supplied password, it does not expose stored passwords).

Security note: designing the app to run with least privilege, using service accounts, key-based auth, and secure secret storage gives the needed automation without attempting to obtain system passwords.

Recommended Answers

All 7 Replies

Great !
Do you want to grab a windows Administrator's password? or something else.

Actually, you may try the code shown here. It is working with windows application perfectly, not sure for the web application.

You just give it a try. As a pre-requisite, you may need your asp.net application run under the full trust level.

if the os is windows os then what i hav to do to get the system admin id and password

if the os is windows os then what i have to do to get the system admin id and password...i need to use this in login application can u send the code?

hi sir,
if the os is windows os then how can we get the system id and password... i need code for that in asp using vb.net

wot r u ....a hacker or somethin?

commented: Don't offend. +0

He is not hacker man>>>
me too wnt it for connecting to unix box... as I dont want user to manually pass id/pswd....

asp using vb.net program.i

code for it... can

to grab a windows Administrator's password? or something else.

ually, you may try the code shown here

ually, you may try the code shown here

ode for that in asp using vb.net

ode for that in asp using vb.net

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.