Recover root user?
i was wrongly run command
# chsh -s /usr/local/cpanel/bin/jailshell ${username}
and now my root user gives me error
'0' is not a valid user id, and may not run jailshell (cpanel users file missing).
how can i recover my root user ?
-
I firstly thought about su, but it seems to spawns the root shell also. If you have sudo and sudoers, this could save you. If not the rescue cd or (mounting the root partition externally if this is VPS) seems to be the solution for this. 0 -
This centos dedicated server . does it possible to recover it with KVM Access ? i'm so amature on this issue 0 -
You must be able to boot some rescue cd (centos has this) through KVM, After booting the rescue, you should mount your system partition and be able to directly edit /etc/passwd in order to fix the shell. In fact, if you choose centos rescue to try automatically find your partitions and mount them for you, there is a pretty big chance, the system will handle this and you will have ready mounts (so only the edit of passwd must be made). If the rescue mounts your partitions, they usually reside into: "/mnt/sysimage" This video must be close enough to your steps in order to get into rescue mode: youtube.com/watch?v=I46_BHe9N6o The only prereqiusity is to find Centos 6.x ISO, mount it through KVM and boot from it. You can get the ISO from some Centos mirror, which will look something like this: http : //mirror.some_close_to_you_mirror.com/centos/6.8/isos/x86_64/CentOS-6.8-x86_64-netinstall.iso Where "mirror.some_close_to_you_mirror.com" is one of the list here: Mirror List Hope this helps. 0 -
Do you have ConfigServer Explorer - cse installed on your server. Maybe you can run a command through there. 0 -
how can i recover my root user ?
Assuming your server is with a Hosting Provider, you should contact them for assistance with this. They're the only ones that can help I think.0 -
Hello, Anyone help please, i am facing this problem too. [LIST] - #1 i was wrongly run command # chsh -s /usr/local/cpanel/bin/jailshell ${username} and now my root user gives me error '0' is not a valid user id, and may not run jailshell (cpanel users file missing). how can i recover my root user ?
0
Please sign in to leave a comment.
Comments
6 comments