All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How can i reset root password and disable ufw via Kimsufi Rescue mode?
Hello,
after command "sudo ufw enable", Kimsufi server become inaccessible.
In Rescue mode there is:
df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 2.0G 0 2.0G 0% /dev
178.33.124.49:/home/pub/rescue.v8 1.9T 249G 1.6T 14% /nfs
tmpfs 2.0G 2.0M 2.0G 1% /rw
aufs 2.0G 2.0M 2.0G 1% /
178.33.124.49:/home/pub/pro-power 1.9T 249G 1.6T 14% /power
178.33.124.49:/home/pub/commonnfs 1.9T 249G 1.6T 14% /common
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 2.0G 9.7M 2.0G 1% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 2.0G 68K 2.0G 1% /tmp
How and which partition i need to mount/chroot/make writeable please?
What i should do so ufw is disabled at reboot and server can be connected again please?
Comments
Do a fdisk -l
thx for help. I tried to follow instructions at https://askubuntu.com/a/28100/456366
sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
cp /etc/resolv.conf /mnt/etc/resolv.conf
sudo chroot /mnt
apt-get purge ufw
exit
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt
reboot
and now server is accepting SSH connections..
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 40962047 40957952 19.5G 83 Linux
/dev/sda2 40962048 77111295 36149248 17.2G 83 Linux
/dev/sda3 77111296 78157823 1046528 511M 82 Linux swap / Solaris
Lol.. Install webmin or other server management tool before you messing with firewall setting
I see you solved the problem. Fdisk showed you three partitions that you could mount. So you could use the
mkdir /mnt/somefolder
mount /dev/sdaX /mnt/somefolder
Replace the X with the partiton you wanted to mount.
Best regards!
Not sure about root pass, there should be plenty of stuff about that on the web.
UFW stores its rules in /etc/ufw/ufw.conf, ENABLED=yes seems to be the thing you want to change in it.
Depending on the distro you can hash the new password and replace the root one in the shadow file. That's risky but can work. Google more about the structure of the shadow file and how to edit it.
Why not add a ssh key and just reset the password after logging in to the original system?