Home > Uncategorized > Cool One Liners #2; The one line cpanel packaging

Cool One Liners #2; The one line cpanel packaging

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.

Categories: Uncategorized Tags:
  1. July 20th, 2013 at 12:28 | #1

    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!

  1. No trackbacks yet.

highslide wordpress