發新話題

[分享] restore failed because the username is invalid or not an existing cPanel user.

本帖已經被作者加入個人空間

restore failed because the username is invalid or not an existing cPanel user.

Does the username exist in /etc/passwd or /etc/group after terminating it? EX:

Code:
grep user /etc/passwd
grep user /etc/group

---------------------------------
Error – Restore a Full Backup/cpmove File
1) finding the “rusac” user name in server ?

Use the below command to find-out whether the user is available at user home directory or any other location or any configuration file.

root@mycloudserver [~]# find / -name "rusac"
/var/spool/cron/rusac
/var/cagefs/16/rusac
/home/virtfs/jeyaprak/var/spool/cron/rusac
/home/virtfs/jeyaprak/var/cagefs/16/rusac
/etc/proftpd/rusac

The username is available above location and i’m going to delete it manually using rm See the output.

root@mycloudserver [~]# rm -Rf /var/spool/cron/rusac
root@mycloudserver [~]# rm -Rf /var/cagefs/16/rusac
root@mycloudserver [~]# rm -Rf /home/virtfs/jeyaprak/var/spool/cron/rusac
root@mycloudserver [~]# rm -Rf /home/virtfs/jeyaprak/var/cagefs/16/rusac
root@mycloudserver [~]# rm -Rf /etc/proftpd/rusac

Now, I’m going to try from cpanel, Again i’m getting the same error message.
2) I’m going to check /etc/passwd & /etc/group file ?

Use the below command to find-out whether the user is available at /etc/passwd & /etc/group file.

root@mycloudserver [~]# grep rusac /etc/passwd
rusac:x:616:617::/home/rusac:/sbin/nologin

root@mycloudserver [~]# grep rusac /etc/group
rusac:x:617:

I could found that, the user is available from /etc/passwd & /etc/group file.
3) How to delete the user from /etc/passwd file ?

I’m going to delete the user from /etc/passwd file manually. See below.

anjayahf:x:609:610::/home1/anjayahf:/usr/local/cpanel/bin/noshell
saplearn:x:611:612::/home1/saplearn:/usr/local/cpanel/bin/noshell
edwin:x:613:614::/home1/edwin:/usr/local/cpanel/bin/noshell
learnseo:x:614:615::/home/learnseo:/usr/local/cpanel/bin/noshell
pfcpan:x:615:616::/home1/pfcpan:/usr/local/cpanel/bin/noshell
rusac:x:616:617::/home/rusac:/sbin/nologin
subhamso:x:617:618::/home1/subhamso:/usr/local/cpanel/bin/noshell
adarsh:x:618:619::/home1/adarsh:/usr/local/cpanel/bin/noshell
anbu:x:619:620::/home1/anbu:/usr/local/cpanel/bin/noshell
berry:x:620:621::/home1/berry:/usr/local/cpanel/bin/noshell

Just open the /etc/passwd file and remove entire line of the user.
4) How to delete the user from /etc/group file ?

I’m going to delete the user from /etc/group file manually. See below.

acsgasca:x:609:
anjayahf:x:610:
saplearn:x:612:
edwin:x:614:
learnseo:x:615:
pfcpan:x:616:
rusac:x:617:
subhamso:x:618:
adarsh:x:619:
anbu:x:620:

Just open the /etc/group file and remove entire line of the user.
5) Trying restoration from cPanel/WHM >> Backup >> Restore a Full Backup/cpmove File ?

Now, I’m going to try from cPanel/WHM >> Backup >> Restore a Full Backup/cpmove and got success. See the output.

Restore for rusac

Searching /home....
Found cpmove-rusac.tar.gz !
Extracting tarball...................
Done

Extracting Domain....Done
.
.
.
Account Creation Status: ok (Account Creation Ok)

Checking input data......Done
.
.
Cleaning up extract directory

Done
.
.
.
Restore Complete
Account Restore Complete Unlocking password for user rusac.passwd: SuccessRunning postrestore script....Done
.
.
checked 107 files.....

6) Restoring account, if you avoided STEP – 3 & 4 ?

If you are not familiar or you haven’t got any awareness about importance of those file.what you may suggest to do is, use STEP 6 and avoid STEP 3 & 4 and you don’t want to remove the user from /etc/passwd & /etc/group file, you will be definitely get the same error message (Avoiding STEP – 3 & 4). If you still getting the error message from cPanel/WHM interface, just feel free and try it from SSH, using below command to do it.

root@mycloudserver [~]# /scripts/restorepkg --force learnseo
cPanel restorepkg 2
Force Mode: yes
Reseller Privs Restore: yes

Searching /home....
Found cpmove-learnseo.tar.gz !
Extracting tarball...................
DoneExtracting Domain....DoneGenerating Account....     groupadd: group 'learnseo' already exists
useradd: user 'learnseo' already exists
.
.
Account Creation Status: ok (Account Creation Ok)Checking input data......Done
.
.
DoneRebuilding Apache ConfRestoring SSL vhost(s)Cleaning up extract directory
DoneRestore CompleteAccount Restore Complete
Unlocking password for user learnseo.passwd: SuccessRunning postrestore script....Donechecked 179 files....

TOP

發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。