By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

Encrypting passwords in config files

P: n/a
Hello all. I have written a .Net .dll that edits properties in Active
Directory. I have to specify an Admin username and password in my LDAP
connection string when I bind to the Active Directory. I'm concerned about
hard coding an Admin password in my code or reading it from a config file for
obvious reasons. My first thought is to use encryption and hard code the
encrypted password in the .dll itself. Anyone know how to do this or anyone
have a better solution?
Nov 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
There's a step by step process on how to achieve this at
http://support.microsoft.com/default.aspx?scid=329290

- Shuvro

"CLEAR-RCIC" <CL*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
Hello all. I have written a .Net .dll that edits properties in Active
Directory. I have to specify an Admin username and password in my LDAP
connection string when I bind to the Active Directory. I'm concerned about hard coding an Admin password in my code or reading it from a config file for obvious reasons. My first thought is to use encryption and hard code the
encrypted password in the .dll itself. Anyone know how to do this or anyone have a better solution?

Nov 22 '05 #2

P: n/a
After reading your post more carefully, I noticed that you want to encode
atbitrary data with your DLL. In an application we use in-house, the
solution was to use a DLL to encrypt data in the registry (under HKLM or
HKCR depending on the scenario). You can add the keys to the registry using
the same DLL during install after prompting the user for the Admin
user/password values.

Hope this helps
Shuvro

"CLEAR-RCIC" <CL*******@discussions.microsoft.com> wrote in message
news:14**********************************@microsof t.com...
Hello all. I have written a .Net .dll that edits properties in Active
Directory. I have to specify an Admin username and password in my LDAP
connection string when I bind to the Active Directory. I'm concerned about hard coding an Admin password in my code or reading it from a config file for obvious reasons. My first thought is to use encryption and hard code the
encrypted password in the .dll itself. Anyone know how to do this or anyone have a better solution?

Nov 22 '05 #3

P: n/a
Hi,

There have been a lot of discussions on similar topics in the newsgroups.
Consider searching the groups.

One method that might be useful is by using DPAPI
http://msdn.microsoft.com/library/de...SecNetHT08.asp

HTH,
Rakesh Rajan

"CLEAR-RCIC" wrote:
Hello all. I have written a .Net .dll that edits properties in Active
Directory. I have to specify an Admin username and password in my LDAP
connection string when I bind to the Active Directory. I'm concerned about
hard coding an Admin password in my code or reading it from a config file for
obvious reasons. My first thought is to use encryption and hard code the
encrypted password in the .dll itself. Anyone know how to do this or anyone
have a better solution?

Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.