There are times where the server didn't have the correct name servers configured before transferring accounts to a new server and needs to be corrected. We don't have a utility to do this across all domains however we do have a script that can be looped to change them for each domain on a cPanel server.
Use the following to change all domains hosted on a cPanel server replacing ns1.example.com ns2.example.com with the needed name servers.
for user in `ls /var/cpanel/users |grep -v \/`; do /scripts/xfertool --changenameservers $user ns1.example.com ns2.example.com; done
ns1=ns1.domain.tld; ns2=ns2.domain.tld; reseller=reseller
for i in `grep -H ^OWNER=$reseller /var/cpanel/users/* |cut -d: -f1 |cut -d/ -f5 |sort`; do /scripts/xfertool --changenameservers $i $ns1 $ns2; done
If you want to change the name server suing this script for one single user then just simply use the incorporated script for that one user like this:
/scripts/xfertool --changenameservers user NS1 NS2 NS3