Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passwords Tina Marie Excel Discussion (Misc queries) 2 March 17th 08 04:21 PM
Passwords Cathi Excel Discussion (Misc queries) 1 October 13th 06 06:01 PM
Passwords Black Jack Excel Programming 1 June 29th 05 03:03 AM
Passwords ammader Excel Programming 0 December 22nd 03 02:41 PM
VBA and Passwords? Pat Beck Excel Programming 0 August 25th 03 08:15 PM


All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"