Database Login - expiration date

jackiesjackies Member Posts: 114
Hi!

I have a question regarding the expiration date field under Database login. Is there a way I can automate this to ask the user for password change every 90 days? (i.e. similar to our windows password change policy)

Thanks :D

Comments

  • matttraxmatttrax Member Posts: 2,309
    Why not just use Windows Authentication?
  • themavethemave Member Posts: 1,058
    matttrax wrote:
    Why not just use Windows Authentication?
    I am not sure of his reasons, but we have terminals setup on sales counters, shipping counters, etc. They autologin to a terminal server session with a screen that has Navision.

    Who ever is using the terminal at any given time, then uses the database login to get into Navision, with his/her own menus and premissions.
  • garakgarak Member Posts: 3,263
    yes it's possible.

    Do folliwing:

    1. Create a new function in CU 1 like CheckUserPWExpDate()
    2. add in this function 2 Variables
    Name	DataType	Subtype	Length
    DatabaseUser	Record	User	
    WSHShell	Automation	'Windows Script Host Object Model'.WshShell	
    

    3. Wrote in this function something like this (not tested, code is not from nav, here written, but it should work)
    if DatabaseUser.get(UserID) then begin
      //Make here a check if the Exir. is in the 90 day interval
      if confirm('Your Expiration Date for your password is = %1\' +
                   'Do you want to change it now?',false,DatabaseUser."Expiration Date") then begin
        if isclear(WSHShell) then
          create(WSHShell);
        WSHShell.SendKeys('%tsp'); //<-- it's for ALT+T(ools) + S(ecurity) + P(assword)
      end;
    end;
    

    4. Call this function in function LoginStart() in CU 1

    5. Test it
    6. if u have an other language then english (like german, poland, french, spain,etc.) u must send other keys. Here a link for how to use sendkey: viewtopic.php?f=5&t=25712&hilit=Sendkey

    Regards
    Do you make it right, it works too!
  • jackiesjackies Member Posts: 114
    @matttrax, this is not for us. One of our clients wants to use a secondary authentication i.e. windows login to pc and then database login to Navision.

    Thanks garak for the help! :D
Sign In or Register to comment.