FreeIPA¶
FreeIPA is a comprehensive suite of open source utilities providing an AD like service.
User Management¶
Add User
Add Group
Add User to Group
Reset User Password
1 | ipa user-mod john.smith --password |
Host Management¶
Misc.¶
Retrieve a list of all users in LDAP
1 | ipa user-find --sizelimit=0 | grep -i "user login" | awk '{print $3}' > ipausers |
Retrieve a list of all hosts in LDAP
1 | ipa host-find --sizelimit=0 | grep -i 'host name' | awk '{print $3}' |
Loop to determine last login dates from user list
1 2 3 | while read i; do echo "$i: $(/bin/ipa user-status $i | grep successful)" done < ipausers.txt |
Search for logins prior to $DATE
1 | awk '$NF < "20170201"' lastlogins
|
1 | awk ‘$NF < $(date -d “now -60 days”) |