명령줄에서 macOS Ventura의 특정 계정에 대한 "비밀번호 재설정" 옵션 트리거

명령줄에서 macOS Ventura의 특정 계정에 대한 "비밀번호 재설정" 옵션 트리거

먼저 이 명령을 실행하여 macOS Ventura에서 사용자 및 그룹 환경 설정을 열었습니다.

open /System/Library/PreferencePanes/Accounts.prefPane

다음으로, 현재 사용자가 해당 옵션을 선택할 필요가 없도록 특정 계정에 대해 "비밀번호 재설정" 옵션을 트리거하는 명령을 실행하고 싶습니다.

명령으로 다양한 방법을 시도했지만 sysadminctl작동하지 않습니다. 내가 시도해 볼 수 있는 제안이 더 있는 사람이 있나요?

답변1

pwpolicymacOS에서 비밀번호 정책을 관리하도록 특별히 설계된 명령줄 유틸리티입니다. 비밀번호 만료, 비밀번호 복잡성 요구 사항, 계정 잠금 등과 같은 비밀번호 정책을 설정하고 수정할 수 있습니다. pwpolicy별도의 비밀번호 정책 데이터베이스에서 실행됩니다.

Max la menace 사용자가 다음에 로그인할 때 비밀번호를 변경하도록 초대하려면 다음 명령을 입력하면 됩니다.

pwpolicy -u maxlamenace -setpolicy newPasswordRequired=1

답변2

올바른 sysadminctl 명령은 다음과 같습니다.

sysadminctl -adminUser <adminuser> -adminPassword <adminpassword> -resetPasswordFor <user> -newPassword <newpassword>

위 명령에서 자리 표시자를 바꿉니다.

<adminuser> - Should also posses the secure token
<adminpassword> - <adminuser>'s password
<user> - for which you want to reset password
<newpassword> - password you want to set for <user>

관련 정보