I got it. Thanks!

I used the following command to successfully change another user's password:

curl -uadmin:test -FoldPwd=temp -FnewPwd=test1 -FnewPwdConfirm=test1 
\http://loc8080/system/userManager/user/hjwang.changePassword.html

Nate was right: the old password could be anything.

Thanks, everyone!

Harry



On Sep 13, 2012, at 1:42 PM, Nate Angell wrote:

> The -uadmin:admin has to be the current root admin username:password to 
> authenticate to run whatever the rest of the command is doing. Perhaps your 
> admin user password is no longer "admin"?
> 
> = nate
> 
> On Sep 13, 2012, at 10:36 AM, Harry Wang <harryjw...@gmail.com> wrote:
> 
>> Hi Kent,
>> 
>> Thanks for the help but it does not work. I actually used the same command 
>> to try to change the admin password again and failed. I found the following 
>> warning in error.log in Sling folder:
>> 
>> 
>> 13.09.2012 13:33:05.202 *WARN* [287533643@qtp-337858693-8] 
>> org.sakaiproject.nakamura.http.usercontent.ServerProtectionServiceImpl XSS 
>> Protection is disabled [isMethodSafe]
>> 13.09.2012 13:33:05.202 *WARN* [287533643@qtp-337858693-8] 
>> org.sakaiproject.nakamura.http.usercontent.ServerProtectionServiceImpl XSS 
>> Protection is disabled [getTransferUserId]
>> 13.09.2012 13:33:05.202 *INFO* [287533643@qtp-337858693-8] 
>> org.apache.sling.auth.core.impl.SlingAuthenticator handleLoginFailure: 
>> Unable to authenticate admin: null
>> 13.09.2012 13:33:05.203 *WARN* [287533643@qtp-337858693-8] 
>> org.sakaiproject.nakamura.http.usercontent.ServerProtectionServiceImpl XSS 
>> Protection is disabled [getTransferUserId]
>> 13.09.2012 13:33:05.203 *INFO* [287533643@qtp-337858693-8] 
>> org.apache.sling.auth.core.impl.SlingAuthenticator handleLoginFailure: 
>> Unable to authenticate admin: null
>> 
>> The command I used was:
>> curl -uadmin:admin -FoldPwd=test -FnewPwd=testing -FnewPwdConfirm=testing 
>> \http://localhost:8080/system/userManager/user/admin.changePassword.html
>> 
>> I think  Unable to authenticate admin: null is causing the problem.
>> 
>> Any idea on how to solve this?
>> 
>> Thanks,
>> 
>> Harry
>> 
>> 
>> On Sep 13, 2012, at 1:17 PM, Nate Angell wrote:
>> 
>>> I believe kent is right. 
>>> 
>>> = nate
>>> 
>>> On Sep 13, 2012, at 9:55 AM, Kent Fitzgerald <kentf...@umich.edu> wrote:
>>> 
>>>> I believe the following format works, where USERID is the id of the
>>>> user you are changing. I haven't done it in a couple of versions
>>>> though
>>>> 
>>>> curl -u admin:admin -FoldPwd=oldpassword -FnewPwd=PASSWORD
>>>> -FnewPwdConfirm=PASSWORD
>>>> http://localhost:8080/system/userManager/user/USERID.changePassword.html
>>>> 
>>>> On Thu, Sep 13, 2012 at 12:48 PM, Harry Wang <harryjw...@gmail.com> wrote:
>>>>> While I changed the admin password successfully using the following 
>>>>> command:
>>>>> 
>>>>> $ curl -uadmin:admin -FoldPwd=admin -FnewPwd=test -FnewPwdConfirm=test
>>>>> \http://localhost:8080/system/userManager/user/admin.changePassword.html
>>>>> 
>>>>> 
>>>>> When I tried to change the password for another user named hjwang with the
>>>>> following command, it did not work. I guess I need another parameter to
>>>>> specify username.
>>>>> 
>>>>> $ curl -uadmin:hjwang -FoldPwd=test -FnewPwd=test1 -FnewPwdConfirm=test1
>>>>> \http://localhost:8080/system/userManager/user/admin.changePassword.html
>>>>> 
>>>>> Any help?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Harry
>>>>> 
>>>>> 
>>>>> On Sep 13, 2012, at 12:40 PM, Harry Wang wrote:
>>>>> 
>>>>> Thanks, Nate.
>>>>> 
>>>>> I succeeded by removing the space and used http instead https:
>>>>> 
>>>>> $ curl -uadmin:admin -FoldPwd=admin -FnewPwd=test -FnewPwdConfirm=test
>>>>> \http://localhost:8080/system/userManager/user/admin.changePassword.html
>>>>> 
>>>>> Harry
>>>>> 
>>>>> On Sep 13, 2012, at 12:37 PM, Nate Angell wrote:
>>>>> 
>>>>> Perhaps your instance is not set up for https? Try just http. Keep the 
>>>>> space
>>>>> or remove it, the slash, and any line break.
>>>>> 
>>>>> = nate
>>>>> 
>>>>> On Sep 13, 2012, at 9:34 AM, Harry Wang <harryjw...@gmail.com> wrote:
>>>>> 
>>>>> Hi Nate and Zach,
>>>>> 
>>>>> Thanks for the help. I just started a local OAE instance and tried the
>>>>> following command and got an error
>>>>> 
>>>>> $ curl -uadmin:admin -FoldPwd=admin -FnewPwd=test -FnewPwdConfirm=test
>>>>> \https://localhost:8080/system/userManager/user/admin.changePassword.html
>>>>> curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown
>>>>> protocol
>>>>> 
>>>>> I was not sure whether there should be a space between \ and https and 
>>>>> then
>>>>> try the command with a space and got another error:
>>>>> 
>>>>> $ curl -uadmin:admin -FoldPwd=admin -FnewPwd=test -FnewPwdConfirm=test \
>>>>> https://localhost:8080/system/userManager/user/admin.changePassword.html
>>>>> curl: (1) Protocol  https not supported or disabled in libcurl
>>>>> 
>>>>> I have disabled the server protection service.
>>>>> 
>>>>> Any help?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Harry
>>>>> 
>>>>> On Sep 12, 2012, at 4:45 PM, Nate Angell wrote:
>>>>> 
>>>>> In my experience you can put any value for the old password, but you must
>>>>> put a value. It does not need to match the users actual old password.
>>>>> 
>>>>> = nate
>>>>> 
>>>>> On Sep 12, 2012, at 12:59 PM, Harry Wang <harryjw...@gmail.com> wrote:
>>>>> 
>>>>> Thanks, Zach.
>>>>> 
>>>>> But the following command has  -FoldPwd to specify old password - what if 
>>>>> a
>>>>> user forgets his/her password?
>>>>> 
>>>>> curl -uadmin:admin -FoldPwd=admin -FnewPwd=newpass 
>>>>> -FnewPwdConfirm=newpass \
>>>>> https://example.com/system/userManager/user/admin.changePassword.html
>>>>> 
>>>>> Harry
>>>>> 
>>>>> On Sep 12, 2012, at 2:06 PM, Zach A. Thomas wrote:
>>>>> 
>>>>> Hi, Harry. The answer is on this page:
>>>>> https://confluence.sakaiproject.org/display/3AK/OAE+Configuration+and+Deployment
>>>>> 
>>>>> It says "Reset the Admin Password" but the instructions are the same for 
>>>>> any
>>>>> user.
>>>>> 
>>>>> best,
>>>>> Zach
>>>>> On Sep 12, 2012, at 12:56 PM, Harry Wang <harryjw...@gmail.com> wrote:
>>>>> 
>>>>> Hi All,
>>>>> 
>>>>> Given that the "retrieve lost password capability" feature is still under
>>>>> testing, I wonder how to reset/retrieve/change a user's password as OAE
>>>>> admin?
>>>>> 
>>>>> Thanks for your help.
>>>>> 
>>>>> Harry
>>>>> _______________________________________________
>>>>> oae-dev mailing list
>>>>> oae-dev@collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> oae-dev mailing list
>>>>> oae-dev@collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> oae-dev mailing list
>>>>> oae-dev@collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>>>> 
>> 

_______________________________________________
oae-dev mailing list
oae-dev@collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/oae-dev

Reply via email to