Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications

Post new topic   Reply to topic
Retrieve domain password for a user
View previous topic :: View next topic  
Author Message
ourspt
Freshman


Joined: 14 Dec 2004
Posts: 34

PostPosted: Nov 3rd, 2005 07:27 AM    Post subject: Retrieve domain password for a user Reply with quote

Hi,

How do i retrieve the domain password for a valid domain username from the Active Directory?

I need some thing like below, where i will pass the valid domain username and domain names to the function and thus the function should retrieve me the domain password.

strpassword = getPassword("iamJade","MyDomain")

Please help me in this regard.

Thanks and Regards
ourspt
Back to top
View user's profile Send private message
ourspt
Freshman


Joined: 14 Dec 2004
Posts: 34

PostPosted: Nov 7th, 2005 12:49 AM    Post subject: Re: Retrieve domain password for a user Reply with quote

Actually I am writing a small vb application with below code to connect to remote desktop machine without inputting the username and password, so that if I click on my application it should directly logon to my remote desktop server taking the current login information.

Dim TS_OBJECT As New ActiveDs.WinNTSystemInfo

Dim TS_USER As String
Dim TS_PASSWORD As String
Dim TS_DOMAIN As String
Dim TS_SERVER As String

TS_USER = TS_OBJECT.UserName

TS_PASSWORD = “mypassword”

TS_DOMAIN = TS_OBJECT.DomainName

TS_SERVER = "MyRemoteServerName"

Set TS_OBJECT = Nothing

MsRdpClient.Server = TS_SERVER
MsRdpClient.UserName = TS_USER
MsRdpClient.AdvancedSettings2.ClearTextPassword = TS_PASSWORD
MsRdpClient.Domain = TS_DOMAIN

MsRdpClient.SecuredSettings.StartProgram = "C:\Windows\notepad.exe"
MsRdpClient.SecuredSettings.WorkDir = "C:\Windows"

MsRdpClient.FullScreen = False
MsRdpClient.DesktopWidth = 1024
MsRdpClient.DesktopHeight = 768

MsRdpClient.Width = Form1.Width
MsRdpClient.Height = Form1.Height

MsRdpClient.AdvancedSettings2.RedirectDrives = False
MsRdpClient.AdvancedSettings2.RedirectPrinters = True
MsRdpClient.AdvancedSettings2.RedirectPorts = False
MsRdpClient.AdvancedSettings2.RedirectSmartCards = False

Form1.Caption = "Microsoft Remote Desktop Client Connection....."

MsRdpClient.Connect

Now in the line
TS_PASSWORD = “mypassword” , I need to get the password for the current logged in user automatically, so that I can execute the above source code then i will be placed directly to my remote server.

As of now, I need to enter the password once again in the remote desktop session, but username and domain will be populated automatically by using the ActiveDS object.

I hope you understood my requirement.

Thanks and Regards
ourspt
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Visual Basic for Applications All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic