+ Reply to Thread
Results 1 to 5 of 5

Passwords etc

  1. #1
    Registered User
    Join Date
    09-29-2005
    Posts
    11

    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

  2. #2
    Robin Hammond
    Guest

    Re: 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","jjsudyydhsk")
    '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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #3
    Registered User
    Join Date
    09-29-2005
    Posts
    11
    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

  4. #4
    Robin Hammond
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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. #5
    JE McGimpsey
    Guest

    Re: 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 <[email protected]>,
    ccarmock <[email protected]>
    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1