R rotame Verified User Joined Jul 4, 2019 Messages 52 Jul 17, 2019 #1 Hi, I want to make a report for User , Contact Email, domain(s), Package, Reseller How can do that ? Which command to execute ? BR Antonis
Hi, I want to make a report for User , Contact Email, domain(s), Package, Reseller How can do that ? Which command to execute ? BR Antonis
zEitEr Super Moderator Joined Apr 11, 2005 Messages 13,889 Location GMT +7.00 Jul 18, 2019 #2 Hello Antonis, All the requested information is stored in text files: /usr/local/directadmin/data/users/*/user.conf So you will need to do a loop and collect all needed data and format it. Something like this: Code: for USER in $(cat /usr/local/directadmin/data/users/*/users.list | sort | uniq); do \ echo "${USER};$(grep ^email= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);\ $(cat /usr/local/directadmin/data/users/${USER}/domains.list | xargs);\ $(grep ^package= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);\ $(grep ^creator= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);"; \ done;
Hello Antonis, All the requested information is stored in text files: /usr/local/directadmin/data/users/*/user.conf So you will need to do a loop and collect all needed data and format it. Something like this: Code: for USER in $(cat /usr/local/directadmin/data/users/*/users.list | sort | uniq); do \ echo "${USER};$(grep ^email= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);\ $(cat /usr/local/directadmin/data/users/${USER}/domains.list | xargs);\ $(grep ^package= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);\ $(grep ^creator= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);"; \ done;
R rotame Verified User Joined Jul 4, 2019 Messages 52 Jul 18, 2019 #3 Dear Alex, Thanks a lot you are great