mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-28 18:01:23 -06:00
b73fc6e550
The user details page was modified to show the password expiration date next to the existing password field. Fixed problem resetting password in self-service mode. The JSON interface for the passwd command requires the username to be specified although the equivalent CLI command doesn't require it. Ticket #2064
54 lines
1.0 KiB
Bash
Executable File
54 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
FIXTURE_DIR=$1
|
|
|
|
INIT_FILE=$FIXTURE_DIR/ipa_init.json
|
|
|
|
usage(){
|
|
echo "$0 {FIXTURE_DIR}"
|
|
exit 1
|
|
}
|
|
|
|
if [ ! -f $INIT_FILE ]
|
|
then
|
|
usage
|
|
exit 1
|
|
fi
|
|
|
|
json="{
|
|
\"method\": \"batch\",
|
|
\"params\": [
|
|
[
|
|
{
|
|
\"method\": \"i18n_messages\",
|
|
\"params\": [[], {}]
|
|
},
|
|
{
|
|
\"method\": \"user_find\",
|
|
\"params\":[[], { \"whoami\": true, \"all\": true }]
|
|
},
|
|
{
|
|
\"method\": \"env\",
|
|
\"params\": [[], {}]
|
|
},
|
|
{
|
|
\"method\": \"dns_is_enabled\",
|
|
\"params\": [[], {}]
|
|
}
|
|
],
|
|
{}
|
|
]
|
|
}"
|
|
|
|
curl -v\
|
|
-H "Content-Type: application/json"\
|
|
-H "Accept: applicaton/json"\
|
|
-H "Referer: https://`hostname`/ipa/xml"\
|
|
--negotiate\
|
|
--delegation always\
|
|
-u :\
|
|
--cacert /etc/ipa/ca.crt\
|
|
-d "$json"\
|
|
-X POST\
|
|
https://`hostname`/ipa/json | sed 's/[ \t]*$//' > $INIT_FILE
|