Jump to content

Zimbra Get All User Info

From TetraWiki
Revision as of 13:33, 14 May 2015 by Amit (talk | contribs) (Created page with "category:Heromotocorp Biz category:Tetra Clients == Get Specific Information of all user in Zimbra == '''Objective''' To get the specified Information of all th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


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 !!!!