2017-04-12 2 views
0

"cf passwd"를 사용하여 클라우드 파운드리 사용자 비밀번호를 자동으로 변경하려고합니다.cf passwd 명령을 사용할 때 자동으로 입력 할 수 있습니까?

printf '%s\n' "oldpasswd" "newpasswd" "newpasswd" | cf passwd test 

을하지만 여전히 실패 :

내가 사용하려고했습니다

Current Password> stty: standard input: Inappropriate ioctl for device 

stty: standard input: Inappropriate ioctl for device 

New Password> stty: standard input: Inappropriate ioctl for device 

stty: standard input: Inappropriate ioctl for device 

Verify Password> stty: standard input: Inappropriate ioctl for device 

stty: standard input: Inappropriate ioctl for device 
Changing password... 
OK 

는이 문제를 해결하기 위해 도와주세요.

감사합니다.

답변

1

uaac 시도해보십시오. https://github.com/cloudfoundry/cf-uaac. uaac을 사용하여 비밀번호를 변경하는 문서는 here입니다.

최악의 경우, API end point (어쨌든 암호 변경은 UAA로 이동합니다)이 경우 STDIN에서 입력하지 않아도 암호를 변경할 수 있습니다.

보조 노트로 uaac -t <cmd> 또는 CF_TRACE=true cf <cmd>을 실행하면 클라이언트에서 사용자를 대신하여 API 호출을 볼 수 있습니다. 이것은 CF API를 사용하는 방법을 정확하게 파악하는 가장 쉬운 방법 중 하나입니다.