This article shows how to use 'sed' to do an inline replacement of the SourceIPCheck variable in the cpanel configuration file. Changing this variable from 1 to 0 and restarting the cpsrvd the cpanel service daemon will disable the WHM security questions, re-enabling it can then be done by changing the 0 back to a 1 and restarting cpsrvd.
sed -i s/SourceIPCheck\=1/SourceIPCheck\=0/ /var/cpanel/cpanel.config /scripts/restartsrv_cpsrvd
sed -i s/SourceIPCheck\=0/SourceIPCheck\=1/ /var/cpanel/cpanel.config /scripts/restartsrv_cpsrvd