OK, so we are migrating to a new server and we have a lot of accounts to migrate. Here’s a quick and dirty one liner to make it happen:
grep -v “*: nobody” /etc/userdomains |cut -d: -f2 | sort | uniq | xargs /scripts/pkgacct {} \;
This will remove the generic (nobody) user from the list, separate the user from their respective domain, and execute the pkgacct command.
Counting on cPanel user checking you can do:
cd /home/; for i in *; do /scripts/pkgaccnt $i; done;
This has changed now with cpanel’s safe restore mode… thanks to me and Michael Denny!