Zimbra Get All User Info
Appearance
Get Specific Information of all user in Zimbra
Objective
To get the specified Information of all the users under a domain.
1: hit the below command to get all the users information into a file of a particular domain.
# su - zimbra -c "zmprov -l gaa herofincorp.biz" > /tmp/alluserinfo.txt
2: Write the below script using the above file to get the desired output.
[root@mail ~]# cat /root/scripts/getuserinfo.sh #!/bin/sh for i in `cat /tmp/alluserinfo.txt` do echo "-------------------------This is the Information of user $i----------------------------------------" su - zimbra -c "zmprov ga $i" | awk '/displayName:|givenName:|mobile:|postalCode:|st:|street:/' echo "-----------------------------------------End-------------------------------------------------------" done
3: Change the parameter as per your need and enjoy !!!!