Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passwords etc
I have a sheet that makes use of security a fair bit. I need the ability for a user to be able to change the password. I currently store this in a global variable that is set in Auto_Open() This same password is used to protect some worksheets... The VB script is also password protected. There is a before save macro that protect & hides sheets. This is to ensure that if macros are disabled the sheets are not visible - ie the thing will only work with macros enabled. Anyway I need a way in VB to set all this - at the moment I have to get the user to change the protect password manually and then ediut the VB script to change the password definition. I'd like it to be the case that a user knowing the current password can easily change it via a macro. Maybe storinng the password in an encrypted way - but again I'd need to be abel to test user input against this. I need it such that without the password normal users cant discover it. I think I can achiueve what I need if there is a way to get one macro to change a line in a different macro I coudl carry on with my current method. I had thought about storing the passord in a hidden sheet, however it was then trivial to reference that cell from another sheet in another file and discover the password. Any help /advice appreciated. Teh sheet itself is not password protected on open - it doesnt need that - just some macros I restrict by prompting for a password and then checkign int he macros itself that it mateches the global variable. Regards Clive -- ccarmock ------------------------------------------------------------------------ ccarmock's Profile: http://www.excelforum.com/member.php...o&userid=27670 View this thread: http://www.excelforum.com/showthread...hreadid=497425 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passwords etc
Clive,
You could use a registry key with a default value and store an encrypted string. That removes any need to edit your code. e.g. 'to retrieve the saved password strPass = GetSetting("MyApp","Settings","Authentication","jj sudyydhsk") 'decrypt the password somehow when the user changes password strNewPass = 'whatever the user entered 'encrypt the password somehow SaveSetting "MyApp","Settings","Authentication",strNewPass Robin Hammond www.enhanceddatasystems.com "ccarmock" wrote in message ... I have a sheet that makes use of security a fair bit. I need the ability for a user to be able to change the password. I currently store this in a global variable that is set in Auto_Open() This same password is used to protect some worksheets... The VB script is also password protected. There is a before save macro that protect & hides sheets. This is to ensure that if macros are disabled the sheets are not visible - ie the thing will only work with macros enabled. Anyway I need a way in VB to set all this - at the moment I have to get the user to change the protect password manually and then ediut the VB script to change the password definition. I'd like it to be the case that a user knowing the current password can easily change it via a macro. Maybe storinng the password in an encrypted way - but again I'd need to be abel to test user input against this. I need it such that without the password normal users cant discover it. I think I can achiueve what I need if there is a way to get one macro to change a line in a different macro I coudl carry on with my current method. I had thought about storing the passord in a hidden sheet, however it was then trivial to reference that cell from another sheet in another file and discover the password. Any help /advice appreciated. Teh sheet itself is not password protected on open - it doesnt need that - just some macros I restrict by prompting for a password and then checkign int he macros itself that it mateches the global variable. Regards Clive -- ccarmock ------------------------------------------------------------------------ ccarmock's Profile: http://www.excelforum.com/member.php...o&userid=27670 View this thread: http://www.excelforum.com/showthread...hreadid=497425 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passwords etc
Thanks for that - I will see if that is acceptable. The snag I ca forsee is that for audit purposes I couldn't demonstrate that I coudln crack the password, given a machien it had been used on, which is why was hoping to store it with the workbook itself. Regards Cliv -- ccarmoc ----------------------------------------------------------------------- ccarmock's Profile: http://www.excelforum.com/member.php...fo&userid=2767 View this thread: http://www.excelforum.com/showthread.php?threadid=49742 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passwords etc
Clive,
That's a tougher question. If you are looking for uncrackable sheet protection, you will not find it, and it has nothing to do with where you store the password. (In fact, storing the password would make no difference). The reality is that most of us would be able to get past sheet protection in seconds, and with a bit of work you can get around vba project protection. Hard to believe, but true. The only moderately secure protection is at the workbook level, and even there you will find that there are commercial crackers available. Robin Hammond www.enhanceddatasystems.com "ccarmock" wrote in message ... Thanks for that - I will see if that is acceptable. The snag I can forsee is that for audit purposes I couldn't demonstrate that I coudlnt crack the password, given a machien it had been used on, which is why I was hoping to store it with the workbook itself. Regards Clive -- ccarmock ------------------------------------------------------------------------ ccarmock's Profile: http://www.excelforum.com/member.php...o&userid=27670 View this thread: http://www.excelforum.com/showthread...hreadid=497425 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Passwords etc
For audit purposes, worksheet, workbook and VBA project passwords are
useless for determining whether passwords are cracked, removed, or bypassed: http://www.mcgimpsey.com/excel/removepwords.html http://www.mcgimpsey.com/excel/fileandvbapwords.html Any auditor who opines that XL passwords afford any security whatsoever should be summarily fired. In article , ccarmock wrote: The snag I can forsee is that for audit purposes I couldn't demonstrate that I coudlnt crack the password, given a machien it had been used on, which is why I was hoping to store it with the workbook itself. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Passwords | Excel Discussion (Misc queries) | |||
Passwords | Excel Discussion (Misc queries) | |||
Passwords | Excel Programming | |||
Passwords | Excel Programming | |||
VBA and Passwords? | Excel Programming |