Can anyone tell me where to find fetch CSV from SSH? thanks, johndoe cPanel.net Support Ticket Number:
I see the account info in the /var/cpanel/accts.db. Can you tell me where the email addresses are stored for the contacts?
account information including email contact found them /home/accountname/.contactemail Here is a script I wrote to send me the information in a spreadsheet. Code: #!/bin/sh # getaccts.sh # create a spreadsheet of user accounts - domain, userid, contact_email # # get a copy of the users info ACCOUNTS=/var/cpanel/accts.db # create temp file with domain,userid in it cat $ACCOUNTS | awk -F"," '{printf "%s,%s\n",$1,$2}' > tmpaccts # create temp file with email addresses, one from each line in tmpaccts for i in `awk -F"," '{print $2}' tmpaccts` do cat /home/$i/.contactemail >> tmpemails echo " " >> tmpemails done # build the first row ot the spreadsheet echo "Domain,User Id,Email Address" > accounts.csv # combine the temp files to make our spreadsheet paste tmpaccts tmpusers tmpemails | sed -e 's| |,|g' >> accounts.csv # filenm is the name of the file to send # emailto is the address to send it to filenm=accounts.csv emailto=someemail@domainname uuencode $filenm $filenm | mail -s "Accounts Filename: $filenm" $emailto rm tmpaccts tmpemails rm accounts.csv # comment out if you do not want to remove file # # End #
whre does the accouint list live now as accts.db tells me to use cpanel accounting now??? i need a list of all the accts data on one file