Issue Type: | New Feature |
---|---|
Priority: | 4 - Normal |
Status: | Open |
Created at: | 2014-08-01T01:16:06.000Z |
Updated at: | 2019-11-11T21:46:42.975Z |
Created by: | Michael Zeller |
---|---|
Reported by: | Michael Zeller |
It would be great to be able to reset the adminui password via sdc-useradm.
Context:
Michael Zeller 5:57 how does one set a user/password for admin ui in COAL? .. tRent 6:12 Michael Zeller: a TOOLS ticket to add passwd reset facility to sdc-useradm would be good
something like 'sdc-useradm reset-password [login|uuid]'.
Michael, if you are motivated you'd start by writing a CLI.prototype.do_reset_password function here: https://mo.joyent.com/sdc/blob/master/lib/sdc-useradm.js#L1315
Copy one of the other CLI.prototype.do_* functions there.
sdc-ufds modify --attribute userpassword --type replace --value myNewPassw4rd "uuid=7088a356-0416-11e2-b842-375959f5289d, ou=users, o=smartdc"
Hi,
We can do this via attributes using sdc-useradm
; but it would be nice if we could either pass in a json file or do a non-echoing prompt so we didn't wind up with passwords potentially in shell history files.
This is what it looks like now:
[root@headnode (swdemo03) /var/tmp]# sdc-useradm get jay.schmidt { "dn": "uuid=a4470ba1-f1b2-4631-a4f3-3c0e877a4cf9, ou=users, o=smartdc", "approved_for_provisioning": "true", "cn": "Jason Schmidt", "created_at": "1483641616160", "email": "jason.schmidt@joyent.com", "givenname": "Jason", "login": "jay.schmidt", "objectclass": "sdcperson", "sn": "Schmidt", "triton_cns_enabled": "true", "updated_at": "1483641616160", "uuid": "a4470ba1-f1b2-4631-a4f3-3c0e877a4cf9", "pwdchangedtime": "1483641616375", "pwdendtime": "253406372841616400", "memberof": [ "cn=operators, ou=groups, o=smartdc" ] } [root@headnode (swdemo03) /var/tmp]# sdc-useradm replace-attr jay.schmidt userpassword JoyPass1234 Replaced attribute on user a4470ba1-f1b2-4631-a4f3-3c0e877a4cf9 (jay.schmidt): userpassword=JoyPass1234 [root@headnode (swdemo03) /var/tmp]# sdc-useradm get jay.schmidt { "dn": "uuid=a4470ba1-f1b2-4631-a4f3-3c0e877a4cf9, ou=users, o=smartdc", "approved_for_provisioning": "true", "cn": "Jason Schmidt", "created_at": "1483641616160", "email": "jason.schmidt@joyent.com", "givenname": "Jason", "login": "jay.schmidt", "objectclass": "sdcperson", "sn": "Schmidt", "triton_cns_enabled": "true", "updated_at": "1483642485259", "uuid": "a4470ba1-f1b2-4631-a4f3-3c0e877a4cf9", "pwdchangedtime": "1483642485239", "pwdendtime": "253406372842485250", "pwdhistory": "1483641616375#1.3.6.1.4.1.1466.115.121.1.40#40#{sha}1b9d0ef7c06bcfd99d10e841c1be20dc1cfa7c20", "memberof": [ "cn=operators, ou=groups, o=smartdc" ] }
Jay