我試圖顯示從該命令的所有禁用帳戶的所有行:命令grep的輸出和顯示匹配的字符串
ipa user-find --all
命令的基本輸出顯示是這樣的:
dn: uid=johnd,cn=users,cn=accounts,dc=mydomain,dc=com
User login: johnd
First Name: John
Last Name: Doe
Full Name: John Doe
Home directory: /home/johnd
GECOS field: John Doe
Login shell: /bin/bash
Kerberos principal: [email protected]
Email address: [email protected]
UID: 501
GID: 1022
Account disabled: True
Password: True
Member of groups: ipausers
Kerberos keys available: False
ipauniqueid: 75732ha-482x82l-13xa-d820-0120xbba142
objectclass: ipaobject, krbticketpolicyaux, etc.
如果我運行:
ipa user-find --all | grep "Account disabled: True"
我會得到:
Account disabled: True
Account disabled: True
Account disabled: True
Account disabled: True
對於所有禁用的帳戶。有沒有辦法讓它顯示所有匹配"Account disabled: True"
的字段?
這效果最好。謝謝! –