Microsoft/Windows Platform
qsuery 명령어를 이용하여 사용하지 않는 사용자 계정 찾는 법
リュちゃん
2011. 7. 13. 13:04
사용자 계정 중에 사용하지 않는 계정을 찾아야 한다면 아래와 같은 명령어로 확인이 가능 합니다.
dsquery user dc=dcryu,dc=com –disabled
만약 사용하지 않음으로 체크 된 계정이 아니라 계정이 생성 된 후 한번 도 로그온 한 적이 없는 사용자를 찾는 것이라면
dsquery * -filter (objectcategory=user) –attr distinguished name lastlogontimestamp –L –limit 0
명령어를 실행 하여 lastlogontimestamp 의 값이 0혹은 Null인 것을 찾으시면 됩니다.
[참고 자료]
Dsquery user
http://technet.microsoft.com/en-us/library/cc725702(WS.10).aspx
How to use the UserAccountControl flags to manipulate user account properties
http://support.microsoft.com/kb/305144/en-us
감사합니다.^^