#!/usr/local/cpanel/3rdparty/bin/perl
# cpanel - scripts/restorecpuserfromcache Copyright 2022 cPanel, L.L.C.
# All rights reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
use Cpanel::FileUtils::Copy ();
use Cpanel::Rand ();
use Cpanel::Config::CpUserGuard ();
$| = 1;
my $user = $ARGV[0];
if ( !$user ) {
print "Enter the user to restore from /var/cpanel/users.cache to /var/cpanel/users? ";
$user =