Book a Demo

Author Topic: Set user password?  (Read 6109 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Set user password?
« on: October 17, 2011, 11:05:13 pm »
Hi all,

I'm wondering if there's a way to set a user's password through the API? I can't find an API call to do it, and the passwords are encrypted when stored in t_secusers.

Cheers,

/Uffe
My theories are always correct, just apply them to the right reality.

Stefan Bolleininger

  • EA User
  • **
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: Set user password?
« Reply #1 on: October 17, 2011, 11:57:16 pm »
You can set the password through the normal EA-Security

Click "Project->Security->Manage Users", selct the user  and use the "Change Password"

Of course you need the security priviledges to do this.
Enterprise Architect in "safetycritical development" like medical device industry. My free Add-in at my Website

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Set user password?
« Reply #2 on: October 18, 2011, 01:24:27 am »
Why would you set the password via API? What's your use case?

q.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Set user password?
« Reply #3 on: October 18, 2011, 02:06:09 am »
I have a large number of users to be imported, and need to set a default password so users can log in after the (DBMS) repository has been transferred to an .EAP.

Or do users get assigned a default password I am unaware of? I haven't tested this in 9.0, but if I remember correctly, you have to set a password explicitly if you want to be able to log into the project after you've taken an .EAP off-line (no AD connection).
My theories are always correct, just apply them to the right reality.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Set user password?
« Reply #4 on: October 18, 2011, 04:52:21 am »
Hmm. I haven't even found a way to create a user via the API. However, you can set the password to null (or blank) in t_secuser. In that case the user can log on with no password. Which is kind of the same as having a default password.

Maybe you can try setting a password and use the crypt value for someone else and see whether the logon works.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Set user password?
« Reply #5 on: October 18, 2011, 06:23:58 pm »
In fact I can confirm that it works.
Two users with the same password have the same hash in the t_secuser.Password table.
So and update/insert statement passed on to Repository.Execute() should do the trick.

Geert