Prompt User for Password

I am looking for a way to prompt a user for his password even though he is already logged in. One of the requirements our quality department has given us for using electronic signatures is forcing the user to enter their password prior to “signing” the document.

What I would like to happen is to have a button the user clicks, it prompts them for their password, and assuming they enter it correctly it populates a name and date field on the document.

Any suggestions on how to best accomplish this? Any third party solutions?

Subject: Forcing password verification

Hi,In LS you can use NotesRegistration.SwitchToID like this :

Sub Initialize

Dim session As New NotesSession

Dim reg As New NotesRegistration

Dim strIDPath as String '

… set value of strIDPath… eg c:\lotus\notes\user.id

Call reg.SwitchToID(strIDPath)

Messagebox "You got it right!"

End Sub

The idea is just to “switch” to the ID already being used, but Notes will prompt for the pw anyway. Obviously you need to know the path of the user’s ID file. In some organisations it’s always the same, otherwise maybe you can look it up somewhere or calculate from your installation policy rules.

This code will effectively block the script until the correct pw is supplied. If the Cancel button is used, the user will just be where he was before (session is not closed or locked).

Tested in R7, NOT in R8 but I expect it will work. NEVER run that on a server.

John

Subject: This works well except for…

Thank you very much for your response. This works exactly as I was hoping. The only issue I am running into now is most of our users are using single sign on. So, when I use the SwitchToID function to switch to the current ID it does not prompt for the password. Any ideas to get around this issue?

Subject: Prompting for password with Client Single Logon

I take it you’re referring to Client Single Logon.

Well, if your app is for a happy few you can always remove Client Single Logon and tell 'em they’re special. Or have the Quality people who are insisting on this pw prompt make a general announcement that in order to improve in-house security, single logon is being abandoned. If you take this seriously you can force a policy to lock clients after n minutes of inactivity. The number of workstations I see left with open sessions…

Read “Using Notes Client single logon to synchronize Notes and OS passwords” and related docs in Admin Help.

Also look at policies : there may be some way to deactivate single logon temporarily or for certain users.

Otherwise you might try copying the ID file to a fixed path (added advantage of knowing the path) and having them change the pw for that file. I don’t know what result you can expect (I’ve no machines configured for single logon right now). You may run into pw change problems with the OS account. You might be able to stop the new ID pw being set to the OS pw and vice-versa if the Notes pw quality is higher than the OS pw quality.

How does Jochen’s @Command work with SSO ? I was glad of his reminder of that possibility.

But if this is for general use I’m afraid it’s likely to be difficult to have your cake and eat it.

I would certainly be interested if you could post your final solution here.

John

Subject: @Command works best

I appreciate all of your help, John. Jochen’s suggestion to use the @Command actually seems to do exactly what I need. After using the command he suggested any subsequent command forces a password prompt regardless of whether Client Single Logon is enabled or not. Sometimes the simplest solution turns out to be the best. :slight_smile: Thanks again for everyone’s help.

Subject: you may also want to try this

In the formula for your button, sign off the user by calling @Command([ToolsUserLogoff]). Any subsequent attempt to access the server will then bring up a Login dialog. (I’m assuming the database is on a sever.)

Obvious caveat: The user will really be signed off temporarily. I’m not sure about any implications this may have.

Subject: Thank you

Thank you Jochen for pointing out this formula. It seems so simple but I believe this will allow me to do exactly what I want to do. Once I test it a little bit I will post my results.

Subject: check out SecurEsign from Extracomm

Looks like it meets your requirement.

Subject: Thank you

Thanks you for the link, Alex. This looks like it would do what I need and more. I think Jochen’s suggestion may work well for what I need now but this may be useful in the future.